Skip to content
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

ESYS: Add reference counting for Esys_TR_FromTPMPublic #2707

Conversation

JuergenReppSIT
Copy link
Member

For every call of Esys_TR_FromTPMPublic the reference counter is incremented
to ensure that the created esys object is only freed by Esys_Close if the reference
count will be zero or decreased to zero.
An integration test was extended to test the reference counting.
Fixes: #2693

Signed-off-by: Juergen Repp juergen_repp@web.de

For every call of Esys_TR_FromTPMPublic the reference counter is incremented
to ensure that the created esys object is only freed by Esys_Close if
the reference count will be zero or decreased to zero.
Fixes: tpm2-software#2693

Signed-off-by: Juergen Repp <juergen_repp@web.de>
The test esys-tr-fromTpmPublic-key is extended.
It is tested whether an esys object can be still used after
two calls of Esys_TR_FromTPMPublic and one Esys_Close for this object.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
@JuergenReppSIT JuergenReppSIT added this to the 4.0.2 milestone Nov 16, 2023
@AndreasFuchsTPM AndreasFuchsTPM merged commit 9b8988a into tpm2-software:master Nov 29, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Esys_TR_Close needs to reference count
2 participants