Skip to content

Commit a26fda6

Browse files
committed
A note for Linux clients of tpm.EKs().
Fix the doc for attest.ActivateCredentialWithEK() as well.
1 parent 5b37630 commit a26fda6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

attest/attest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (k *AK) ActivateCredential(tpm *TPM, in EncryptedCredential) (secret []byte
147147
return k.ak.activateCredential(tpm.tpm, in, nil)
148148
}
149149

150-
// ActivateCredential decrypts the secret using the key to prove that the AK
150+
// ActivateCredentialWithEK decrypts the secret using the key to prove that the AK
151151
// was generated on the same TPM as the EK. This method can be used with TPMs
152152
// that have an ECC EK. The 'ek' argument must be one of EKs returned from
153153
// TPM.EKs() or TPM.EKCertificates().

attest/tpm.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ func (t *TPM) Close() error {
365365
}
366366

367367
// EKs returns the endorsement keys burned-in to the platform.
368+
// Note for Linux clients: for historical reasons, the method assumes that
369+
// the TPM has a single EK, and the EK's type is RSA. If the EK's type is ECC
370+
// and the TPM contains an ECC EK Certificate, the EKCertificates() method
371+
// should be used to retrieve the EKs.
368372
func (t *TPM) EKs() ([]EK, error) {
369373
return t.tpm.eks()
370374
}

0 commit comments

Comments
 (0)