file

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package file implements SecureBoot/PCR signers via plain filesystem files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PCRSigner

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

PCRSigner implements measure.RSAKey interface.

func NewPCRSigner

func NewPCRSigner(keyPath string) (*PCRSigner, error)

NewPCRSigner creates a new PCR signer from the private key file.

func (*PCRSigner) Public

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

Public returns the public key.

func (*PCRSigner) PublicRSAKey

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

PublicRSAKey returns the public key.

func (*PCRSigner) Sign

func (s *PCRSigner) Sign(rand 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(certPath, keyPath 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