Skip to content

Commit eb81e6e

Browse files
committed
Add Blobs method for AK
1 parent 0ea71a1 commit eb81e6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

attest/attest.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ type ak interface {
105105
quote(t tpmBase, nonce []byte, alg HashAlg) (*Quote, error)
106106
attestationParameters() AttestationParameters
107107
certify(tb tpmBase, handle interface{}, qualifyingData []byte) (*CertificationParameters, error)
108+
blobs() ([]byte, []byte, error)
108109
}
109110

110111
// AK represents a key which can be used for attestation.
@@ -155,6 +156,11 @@ func (k *AK) Certify(tpm *TPM, handle interface{}) (*CertificationParameters, er
155156
return k.ak.certify(tpm.tpm, handle, nil)
156157
}
157158

159+
// Blobs returns public and private blobs to be used by tpm2.Load().
160+
func (k *AK) Blobs() (pub, priv []byte, err error) {
161+
return k.ak.blobs()
162+
}
163+
158164
// AKConfig encapsulates parameters for minting keys. This type is defined
159165
// now (despite being empty) for future interface compatibility.
160166
type AKConfig struct {

0 commit comments

Comments
 (0)