Commit 52cdcdc
committed
examples/keygen: align keygen SRK default with keyload/seal
keygen defaulted srkAlg = TPM_ALG_ECC and only switched to RSA for
RSA keys, so SYMCIPHER and KEYEDHASH blobs were created under the
ECC SRK. After the prior keyload fix made keyload default to RSA
(matching seal.c), a sym/keyedhash blob produced by keygen could
not round-trip through keyload without a parent mismatch.
Invert the default to RSA (matching seal.c and keyload.c) and only
switch to the ECC SRK when the stored key itself is ECC. Keeps all
three tools aligned so any blob round-trips without callers having
to specify a parent.1 parent 34108a8 commit 52cdcdc
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
0 commit comments