keys

package
v0.0.0-...-a70b9b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AzureKeyVaultTimeout = 10 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}
var AzureHttpRequestDoer HttpRequestDoer = http.DefaultClient

type JWKSigningKey

type JWKSigningKey struct {
	JWK jwk.Key
}

func (JWKSigningKey) KeyID

func (j JWKSigningKey) KeyID() string

func (JWKSigningKey) Public

func (j JWKSigningKey) Public() crypto.PublicKey

func (JWKSigningKey) Sign

func (j JWKSigningKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)

func (JWKSigningKey) SigningAlgorithm

func (j JWKSigningKey) SigningAlgorithm() string

type SigningKey

type SigningKey interface {
	crypto.Signer
	SigningAlgorithm() string
	KeyID() string
}

func SigningKeyFromAzureKeyVault

func SigningKeyFromAzureKeyVault(keyVaultURL, keyName string) (SigningKey, error)

SigningKeyFromAzureKeyVault reads a key from Azure KeyVault and returns it as SigningKey. It must be an Elliptic Curve key.

func SigningKeyFromJWKFile

func SigningKeyFromJWKFile(jwkFile string) (SigningKey, error)

SigningKeyFromJWKFile reads a JWK file and returns a SigningKey

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL