-
Notifications
You must be signed in to change notification settings - Fork 145
Using the IBM TSS with swtpm
Stefan Berger edited this page Nov 14, 2019
·
12 revisions
To use the IBM TSS for TPM 2 directly with swtpm, you can use the following commands:
Start swtpm in one terminal:
mkdir /tmp/myvtpm
swtpm socket --tpmstate dir=/tmp/myvtpm --tpm2 --ctrl type=tcp,port=2322 --server type=tcp,port=2321 --flags not-need-init
Do some operations with the TSS stack in another terminal:
export TPM_COMMAND_PORT=2321 TPM_PLATFORM_PORT=2322 TPM_SERVER_NAME=localhost TPM_SERVER_TYPE=raw
tssstartup
tsspcrread -ha 10
count 1 pcrUpdateCounter 21
digest length 32
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
To reset swtpm run the following command:
swtpm_ioctl -i --tcp :2322