Skip to content

Commit 3cd524c

Browse files
committed
use swtpm instead of ibmswtpm
1 parent d16236e commit 3cd524c

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/tpm-ssh.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
sudo apt-get update
3535
sudo apt-get install -y libtool automake autoconf
36-
sudo apt-get install -y ibmswtpm2
36+
sudo apt-get install -y swtpm
3737
3838
# Build and install wolfSSL
3939
- name: Build wolfSSL
@@ -71,7 +71,9 @@ jobs:
7171
# Start TPM simulator
7272
- name: Start TPM Simulator
7373
run: |
74-
tpm_server &
74+
mkdir -p /tmp/tpmdir
75+
chmod 777 /tmp/tpmdir
76+
swtpm socket --tpmstate dir=/tmp/tpmdir --tpm2 --ctrl type=tcp,port=2322 --server type=tcp,port=2321 &
7577
sleep 2 # Give the simulator time to start
7678
7779
# Test TPM SSH Default Password
@@ -106,9 +108,11 @@ jobs:
106108
run: |
107109
kill $SERVER_PID
108110
sleep 2
109-
pkill -f tpm_server
111+
pkill -f swtpm
110112
sleep 2
111-
tpm_server &
113+
mkdir -p /tmp/tpmdir
114+
chmod 777 /tmp/tpmdir
115+
swtpm socket --tpmstate dir=/tmp/tpmdir --tpm2 --ctrl type=tcp,port=2322 --server type=tcp,port=2321 &
112116
sleep 2 # Give the simulator time to start
113117
114118
# Test the TPM SSH Custom Password
@@ -140,7 +144,7 @@ jobs:
140144
141145
# Cleanup
142146
kill $SERVER_PID
143-
pkill -f tpm_server
147+
pkill -f swtpm
144148
145149
# Archive artifacts for debugging
146150
- name: Archive test artifacts

0 commit comments

Comments
 (0)