irtimmer / tpm2-pk11

[DEPRECATED] PKCS#11 Module for TPM 2.0
BSD 2-Clause "Simplified" License
68 stars 24 forks source link

Fix tpm_set_session_password to compile with recent tpm2-tss and tpm2-abrmd 2.0 versions #79

Closed diabonas closed 6 years ago

diabonas commented 6 years ago

Currently this project does not compile with the released versions of tpm2-tss 2.0 and tpm2-abrmd 2.0, instead the older versions 1.4 and 1.3, respectively: the problem is that the already existing compatibility layer for the differences between these versions has not been applied to the tpm_set_session_password function.

Namely, the following three changes affect the tpm_set_session_password:

This pull request makes these changes in three separate commits in the order listed, while retaining compatibility with tpm-tss and tpm2-abrmd 1.X. I confirm that the code compiles with both 1.X and 2.X, however some feedback would be greatly appreciated (especially for the third commit) as I do not know how to actually test the correct behaviour of the modified tpm_set_session_password function.

irtimmer commented 6 years ago

Due to a lack of time, I haven't spend much time on tpm2-pk11 lately. Like the missing changes for recent versions of tpm2-tss or missing OpenSSL updates in the travis build. Therefore can you rebase your commits on the latest commit in the master branch? That would hopefully fix the failed check but at least makes it a little easier for me to check for potential compile errors.

diabonas commented 6 years ago

Sure :) The code of tpm2-pk11 itself seems to build fine, but there are still problems with the CI configuration: in test/bat/test_util.bash, -C should be changed to -o for tpm2_createprimary for the tpm2-tools master branch, I don't know what to do about the clang build error, though.

irtimmer commented 6 years ago

Thanks for bringing tpm2-pk11 up-to-date again. I've rebased the branch onto your other pull request and pushed it to master.