randombit / botan

Cryptography Toolkit
https://botan.randombit.net
BSD 2-Clause "Simplified" License
2.59k stars 569 forks source link

Feature: Support external ESYS_CONTEXT in TPM2 #4430

Closed atreiber94 closed 1 week ago

atreiber94 commented 2 weeks ago

(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 an ESYS_CONTEXT that is not created via Botan's interface.

This results in 2 major use cases:

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 by TPM2::Context, and are therefore not finalized in its destructor.

coveralls commented 2 weeks ago

Coverage Status

coverage: 91.064% (-0.009%) from 91.073% when pulling 9fcff47a2215c19c541cee347173e3d0ab033b90 on Rohde-Schwarz:feature/tpm2_external_ctx into d35b793df317051c5f317e52fa59eb8ca5e0c681 on randombit:master.