-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FAPI: Fix usage of endorsement handle #2711
FAPI: Fix usage of endorsement handle #2711
Conversation
e9f1178
to
65f82da
Compare
In several cases the wrong handle TPM2_RH_EK was used instead of TPM2_RH_ENDORSEMENT. This caused a wrong recreation of keys (except the EK) under the endorsement hierarchy. Now the correct hierarchy handle is used and a check whether the recreated public key of the recreated primary corresponds to the keystore. Addresses: tpm2-software#2709 Signed-off-by: Juergen Repp <juergen_repp@web.de>
65f82da
to
fb191f4
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2711 +/- ##
==========================================
- Coverage 82.60% 82.58% -0.02%
==========================================
Files 368 368
Lines 43001 43006 +5
==========================================
- Hits 35519 35517 -2
- Misses 7482 7489 +7 ☔ View full report in Codecov by Sentry. |
context->ek_persistent = true; | ||
} else { | ||
} else if (strcmp("/SRK", | ||
&pkey_object->rel_path[strlen(pkey_object->rel_path)-4]) == 0) { | ||
context->srk_persistent = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the no else possible after these two cases ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it's possible. ek_persistent
and srk_persistent
are only used in the provisioning cleanup for the EK and SRK and in the cleanup for sessions where the SRK is used as TPM key.
In several cases the wrong handle TPM2_RH_EK was used instead of TPM2_RH_ENDORSEMENT.
This caused a wrong recreation of keys (except the EK) under the endorsement hierarchy.
Addresses: #2709
Signed-off-by: Juergen Repp juergen_repp@web.de