Closed kreijack closed 3 years ago
I tried also an ubuntu package (swtpm_0.5.0-1_amd64.deb), and I found that the ubuntu binary still fails the test
$ SWTPM_EXE=/usr/bin/swtpm ./test_tpm2_ctrlchannel2
OK
Error: (1) Did not get expected result from TPM_PCRRead(17)
expected: 80 01 00 00 00 3e 00 00 00 00 00 00 00 18 00 00 00 01 00 0b 03 00 00 02 00 00 00 01 00 20 e5 17 e3 9b 10 a3 5b 3b b7 29 95 79 4b c6 4a 07 f8 bc b0 bd e6 bb 31 ad 35 27 fb 6f 64 f8 4c b9
received: 80 01 00 00 00 3e 00 00 00 00 00 00 00 19 00 00 00 01 00 0b 03 00 00 02 00 00 00 01 00 20 e5 17 e3 9b 10 a3 5b 3b b7 29 95 79 4b c6 4a 07 f8 bc b0 bd e6 bb 31 ad 35 27 fb 6f 64 f8 4c b9
$ /usr/bin/swtpm -v
TPM emulator version 0.5.0, Copyright (c) 2014 IBM Corp.
$ dpkg --list | egrep swtpm
ii libtss2-tcti-swtpm0:amd64 3.0.3-2 amd64 TPM2 Software stack library - TSS and TCTI libraries
ii swtpm 0.5.0-1 amd64 Libtpms-based TPM emulator
ii swtpm-libs:amd64 0.5.0-1 amd64 Common libraries for TPM emulators
So I am thinking that it is a dependency problem... Do you have any suggestion ?
You need to update your libtpms installation to 0.7.4 or master.
With the v0.7.4, everything goes well.
I have to point out that before (when the tests failed) I was using the standard debian package v0.8.0...
$ dpkg --list "libtpm*" Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-=================-============-=============================> ii libtpms-dev 0.8.0~dev1-1.2+b1 amd64 libtpms header files and man > ii libtpms0:amd64 0.8.0~dev1-1.2+b1 amd64 TPM emulation library
I don't know if debian adds some patches on top of your "master" which prevents swtpm to work.
Debian took an older version of libtpms 0.8.0, which is still under development. That version was taken before I had to make a change that would alter the results the tests you ran got. So if you update to libtpms master or 0.7.4 or later you should be fine.
Is your issue resolved? If so, please close it.
Yes I can confirm that updating libtpms to v0.7.5 solved my issue (all tests passed).
However I suggest to add a note about the minimum version library required.
Anyway this issue is solved.
There's at least a note in CHANGES for libtpms but an explicit note is missing for swtpm:
version 0.7.3
- Fixed the set of PCRs belonging to the TCB group. This affects the
pcrUpdateCounter in TPM2_Pcrread() responses, thus needs latest `swtpm`
(master, stable branches) for test cases to succeed there.
Describe the bug when I perform make check, some test failed
To Reproduce
Expected behavior make check ends with all tests passed
Desktop (please complete the following information):
Versions of relevant components
Additional context My goal is to use swtpm with qemu. However it seems to not work. Doing make check I discovered that some tests fail.