Commit 34108a8
committed
examples/keygen: pick SRK algorithm from stored key type
keyload defaulted srkAlg = TPM_ALG_ECC and only switched to RSA
for TPM_ALG_RSA keys. A sealed KEYEDHASH blob (produced by
examples/seal, which always uses the RSA SRK) therefore tried to
load under the ECC SRK and failed with TPM_RC_INTEGRITY. SYMCIPHER
blobs had the same issue.
Invert the default to RSA (matching seal.c) and only switch to the
ECC SRK when the stored key itself is ECC.1 parent eea8741 commit 34108a8
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| |||
0 commit comments