The TSS test suite or tpm-tools link with the TSS. These are user applications that connect to tcsd through a socket.
Trousers includes a server, tcsd, which must be started as root. It connects through one socket to the TSS application and another socket to the TPM.
The TPM runs as a non-root server. It connects to tcsd through a socket.
See its INSTALL file for install and run instructions. They are not repeated here.
The environment variable TPM_PORT is the socket port that the TPM listens on.
Begin provisioning the TPM using the SW TPM utilities as per the INSTALL instructions. Additional steps are required if the TPM is disabled or deactivated.
> tpmbios (each time the TPM is started)
> createek (only required once)
> ./nv_definespace -in ffffffff -sz 0 (only required once)
DO NOT take ownership using the SW TPM utilities.
# export TCSD_TCP_DEVICE_PORT=6543
# /usr/sbin/tcsd -e -f
Caution: One cannot set the port as a user and then run "sudo tcsd". The environment variable is not inherited by sudo. The result will be the error "TCSD TDDL ERROR: Could not find a device to open!". The environment variable must be set after becoming root.
Note: These error messages are expected and can be ignored
TCSD TDDL ioctl: (22) Invalid argument
TCSD TDDL Falling back to Read/Write device support.
ownerAuth (example passwords)
> createkey -kt e -pwdp srkAuth -pwdk key -pwdm key -ok stkey -hp 40000000
> loadmanumaintpub stkey.key
> ./tsstests.sh -v 1.2 &> error.log
The test suite will not yet run without errors, but it should not