tpm2-software / tpm2-pkcs11

A PKCS#11 interface for TPM2 hardware
https://tpm2-software.github.io
Other
273 stars 107 forks source link

DB upgrade fails #817

Open tynsh opened 1 year ago

tynsh commented 1 year ago

There is a double conversion to int during DB upgrade to version 8. But I can't figure out what should be done instead. Just removing the second conversion does seem to work, but then using the shared library fails and p11tool shows an error:

WARNING: Needed CKA_VALUE but didn't find encrypted blob

Here are the corresponding lines:

https://github.com/tpm2-software/tpm2-pkcs11/blob/3987372f607a7fbce879c956cb5e5aa234af1c51/tools/tpm2_pkcs11/db.py#L559-L560

tynsh commented 1 year ago

Nevermind. It works as expected. The warning does not seem to be relevant and using the keys works as expected. I've opened PR #816 .