You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/endorsement/README.md
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,27 @@
1
1
# TPM Endorsement Certificates
2
2
3
-
The `get_ek_certs` example will enumerate and validate the Endorsement Key Certificates stored in the NV TCG region.
4
-
5
3
TPM manufactures provision Endorsement Certificates based on a TPM key. This certificate can be used for signing/endorsement.
6
4
5
+
The `get_ek_certs` example will enumerate and validate the Endorsement Key Certificates stored in the NV TCG region.
6
+
7
7
We have loaded some of the root and intermediate CA's into the trusted_certs.h file.
8
8
9
-
## Infineon SLB9672 EK Certificate Chain
9
+
## Example Detail
10
+
11
+
1) Get handles in the TCG NV range using `wolfTPM2_GetHandles` with `TPM_20_TCG_NV_SPACE`.
12
+
2) Get size of the certificate by reading the public NV information using `wolfTPM2_NVReadPublic`.
13
+
3) Read the NV data (certificate DER/ASN.1) from the NV index using `wolfTPM2_NVReadAuth`.
14
+
4) Get the EK public template using the NV index by calling `wolfTPM2_GetKeyTemplate_EKIndex` or `wolfTPM2_GetKeyTemplate_EK`.
15
+
5) Create the primary endorsement key with public template and TPM_RH_ENDORSEMENT hierarchy using `wolfTPM2_CreatePrimaryKey`.
16
+
6) Parse the ASN.1/DER certificate using `wc_ParseCert` to extract issuer, serial number, etc...
17
+
7) The URI for the CA issuer certificate can be obtained in `extAuthInfoCaIssuer`.
18
+
8) Import the certificate public key and compare it against the primary EK public unique area.
19
+
9) Use the wolfSSL Certificate Manager to validate the EK certificate. Trusted certificates are loaded using `wolfSSL_CertManagerLoadCABuffer` and the EK certificate is validated using `wolfSSL_CertManagerVerifyBuffer`.
20
+
10) Optionally covert to PEM and export using `wc_DerToPem`.
21
+
22
+
## Example certificate chains
23
+
24
+
### Infineon SLB9672
10
25
11
26
Infineon certificates for TPM 2.0 can be downloaded from the following URLs (replace xxx with 3-digit CA number):
0 commit comments