-
Notifications
You must be signed in to change notification settings - Fork 570
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
Feature: Support external ESYS_CONTEXT in TPM2 #4430
Feature: Support external ESYS_CONTEXT in TPM2 #4430
Conversation
…ONTEXT* Co-Authored-By: René Meusel <[email protected]>
The ESYS_CONTEXT is managed by the application and will not be finalized by the TPM2::Context. Co-Authored-By: René Meusel <[email protected]>
7055d9d
to
131d29e
Compare
Co-Authored-By: René Meusel <[email protected]>
Co-Authored-By: René Meusel <[email protected]>
131d29e
to
eb74a85
Compare
Co-Authored-By: René Meusel <[email protected]>
eb74a85
to
c9e47b6
Compare
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.
Looks fine to me but @reneme has a lot more context here so I’d like his review if possible
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.
I was involved in the development of this patch, pair-programming with @atreiber94. Nevertheless, we forgot to test this with --disabled-modules=tpm2_crypto_backend
😨. Needs a little #ifdef
fairy dust, therefore.
Co-authored-by: René Meusel <[email protected]>
192e4dc
to
9fcff47
Compare
(Don't be scared, the large diff is due to file renaming...)
Certain applications may want the flexibilty to do more than currently possible within
Botan::TPM2
and therefore may rely on anESYS_CONTEXT
that is not created via Botan's interface.This results in 2 major use cases:
TPM2::Context
from anESYS_CONTEXT
managed by the applicationThis is useful to selectively benefit from wrapped functionality in Botan while maintaining the flexibility to use all of ESAPI
Unfortunately there is some added complexity because of the different kinds of memory management involved between the different APIs. Externally provided
ESYS_CONTEXT
objects are not retained byTPM2::Context
, and are therefore not finalized in its destructor.