signer

package module
v0.0.0-...-5c176a9 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PCRSession

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

for pcr sessions

func NewPCRSession

func NewPCRSession(rwr transport.TPM, sel []tpm2.TPMSPCRSelection) (PCRSession, error)

func (PCRSession) GetSession

func (p PCRSession) GetSession() (auth tpm2.Session, closer func() error, err error)

type PasswordSession

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

for password sessions

func NewPasswordSession

func NewPasswordSession(rwr transport.TPM, password []byte) (PasswordSession, error)

func (PasswordSession) GetSession

func (p PasswordSession) GetSession() (auth tpm2.Session, closer func() error, err error)

type Session

type Session interface {
	GetSession() (auth tpm2.Session, closer func() error, err error) // this supplies the session handle to the library
}

type TPMConfig

type TPMConfig struct {
	TPMDevice        io.ReadWriteCloser
	NamedHandle      tpm2.NamedHandle
	AuthSession      Session          // If the key needs a session, supply one as the `tpmjwt.Session`
	EncryptionHandle tpm2.TPMHandle   // (optional) handle to use for transit encryption
	EncryptionPub    *tpm2.TPMTPublic // (optional) public key to use for transit encryption
}

type TPMSigner

type TPMSigner struct {
	TPMConfig    TPMConfig
	AccessKeyID  string
	SessionToken string
	// contains filtered or unexported fields
}

func NewTPMSigner

func NewTPMSigner(cfg *TPMSignerConfig) (*TPMSigner, error)

func (*TPMSigner) MAC

func (ts *TPMSigner) MAC(msg []byte) ([]byte, error)

type TPMSignerConfig

type TPMSignerConfig struct {
	TPMConfig    TPMConfig
	AccessKeyID  string
	SessionToken string
}

Jump to

Keyboard shortcuts

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