Commit 88c40e5
committed
examples/native: flush unused EK before CreateLoaded
native_test creates an EK primary and an SRK primary, then calls
TPM2_CreateLoaded under the SRK. The EK is unused between creation
and the common cleanup path, so it just sits in TPM object memory.
On TPMs with tight transient-object limits (Nations NS350 at
RSA-4096 only holds two transient objects), the third object made
by CreateLoaded returns TPM_RC_OBJECT_MEMORY.
Flush the EK right after the SRK is created. No behavior change on
TPMs with spare object memory; fixes the OOM on constrained parts.1 parent ebb98f1 commit 88c40e5
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1055 | 1055 | | |
1056 | 1056 | | |
1057 | 1057 | | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1058 | 1068 | | |
1059 | 1069 | | |
1060 | 1070 | | |
| |||
0 commit comments