Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrValidatingNonce = errors.New("error validating nonce")
Functions ¶
func GetAttestationDoc ¶
func GetRootAWSCert ¶
func GetRootAWSCert() (*x509.Certificate, error)
Types ¶
type AttestationDoc ¶
type AttestationDoc struct { ModuleID string `cbor:"module_id"` Timestamp uint64 Digest string PCRs map[int][]byte Certificate []byte Cabundle [][]byte PublicKey []byte `cbor:"public_key"` UserData []byte `cbor:"user_data"` Nonce []byte `cbor:"nonce"` }
func ParseAttestationDocument ¶
func ParseAttestationDocument(attestation []byte) (*AttestationDoc, error)
ParseAttestationDocument is a utility method to return a Attestation Document without actually verifying it. Useful for if you need some info out of the document but you don't need to verify it.
type Manager ¶
type Manager struct {
PublicKey []byte
}
func (Manager) GetAttestationDocWithPublicKey ¶
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
func NewVerifier ¶
func NewVerifier(opts ...VerifierOpt) *Verifier
type VerifierOpt ¶
type VerifierOpt func(*Verifier)
func WithCurrentTime ¶
func WithCurrentTime(time time.Time) VerifierOpt
func WithRootCert ¶
func WithRootCert(rootCert *x509.Certificate) VerifierOpt
WithRootCert sets the root certificate to use. By default attestation uses the aws root certificate.
Click to show internal directories.
Click to hide internal directories.