azure

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package azure implements SecureBoot/PCR signers via Azure Key Vault.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeySigner

type KeySigner struct {
	// contains filtered or unexported fields
}

KeySigner implements measure.RSAKey interface.

KeySigner wraps Azure APIs to provide public key and crypto.Signer interface out of Azure Key Vault RSA key.

func NewPCRSigner

func NewPCRSigner(ctx context.Context, vaultURL, keyID, keyVersion string) (*KeySigner, error)

NewPCRSigner creates a new PCR signer from Azure settings.

func (*KeySigner) Public

func (s *KeySigner) Public() crypto.PublicKey

Public returns the public key.

func (*KeySigner) PublicRSAKey

func (s *KeySigner) PublicRSAKey() *rsa.PublicKey

PublicRSAKey returns the public key.

func (*KeySigner) Sign

func (s *KeySigner) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)

Sign implements the crypto.Signer interface.

type SecureBootSigner

type SecureBootSigner struct {
	// contains filtered or unexported fields
}

SecureBootSigner implements pesign.CertificateSigner interface.

func NewSecureBootSigner

func NewSecureBootSigner(ctx context.Context, vaultURL, certificateID, certificateVersion string) (*SecureBootSigner, error)

NewSecureBootSigner creates a new SecureBootSigner.

func (*SecureBootSigner) Certificate

func (s *SecureBootSigner) Certificate() *x509.Certificate

Certificate returns the certificate.

func (*SecureBootSigner) Signer

func (s *SecureBootSigner) Signer() crypto.Signer

Signer returns the signer.

Jump to

Keyboard shortcuts

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