occlum/demos/swtpm/run_client.sh
Devki Jha b0989b6d46 add swtpm demo
add tss script
2023-08-24 16:12:26 +08:00

19 lines
445 B
Bash
Executable File

#!/bin/bash
# Download and install TSS
wget https://sourceforge.net/projects/ibmtpm20tss/files/ibmtss1.5.0.tar.gz/download -O ibmtss1.5.0.tar.gz
mkdir ibmtss
cd ibmtss
tar zxvf ../ibmtss1.5.0.tar.gz
cd utils
make -f makefiletpmc
# Set the TPM variables for TSS
export TPM_COMMAND_PORT=2321 TPM_PLATFORM_PORT=2322 TPM_SERVER_NAME=localhost TPM_INTERFACE_TYPE=socsim TPM_SERVER_TYPE=raw
# Start the TPM and test
./startup
./getrandom -by 128