|
44 | 44 | cd ibmswtpm2/src |
45 | 45 | make |
46 | 46 | ./tpm_server & |
47 | | - sleep 5 |
| 47 | + sleep 2 |
48 | 48 | cd ../.. |
49 | 49 |
|
50 | 50 | # Build and install wolfSSL |
@@ -94,46 +94,60 @@ jobs: |
94 | 94 | cd .. |
95 | 95 |
|
96 | 96 | # Start echoserver and wait for it to be ready |
| 97 | + echo "Starting echoserver..." |
97 | 98 | cd wolfssh |
98 | | - ./examples/echoserver/echoserver -1 -s key.ssh |
| 99 | + ./examples/echoserver/echoserver -1 -s key.ssh & || { echo "Echoserver failed to start"; exit 1; } |
| 100 | + echo "Echoserver started with PID: $!" |
| 101 | + sleep 2 |
99 | 102 | cd .. |
100 | 103 |
|
101 | 104 | # Test client connection with default password |
| 105 | + echo "Testing client connection..." |
102 | 106 | cd wolfssh |
103 | | - ./examples/client/client -i ../wolftpm/keyblob.bin -u hansel -K ThisIsMyKeyAuth |
| 107 | + ./examples/client/client -i ../wolftpm/keyblob.bin -u hansel -K ThisIsMyKeyAuth || { echo "Client connection failed"; exit 1; } |
104 | 108 | cd .. |
105 | 109 |
|
106 | 110 | # Kill the server and simulator and restart them |
107 | 111 | - name: Kill server and simulator and restart |
108 | 112 | run: | |
| 113 | + echo "Killing server and simulator..." |
109 | 114 | pkill -f tpm_server |
110 | | - sleep 2 |
| 115 | + sleep 2 # Wait for the server to be killed |
| 116 | + echo "Restarting server and simulator..." |
111 | 117 | cd ibmswtpm2/src |
112 | 118 | ./tpm_server & |
| 119 | + sleep 2 # Wait for the server to be restarted |
113 | 120 | cd ../.. |
114 | 121 |
|
115 | 122 | # Test the TPM SSH Custom Password |
116 | 123 | - name: Test TPM SSH Custom Password |
117 | 124 | run: | |
118 | 125 | # Test with custom password |
119 | 126 | cd wolftpm |
120 | | - ./examples/keygen/keygen keyblob2.bin -rsa -t -pem -eh -auth=custompassword |
| 127 | + echo "Generating key with custom password..." |
| 128 | + ./examples/keygen/keygen keyblob2.bin -rsa -t -pem -eh -auth=custompassword || { echo "Keygen failed"; exit 1; } |
121 | 129 |
|
122 | 130 | # Convert key to SSH format |
123 | | - ssh-keygen -f key.pem -i -m PKCS8 > ../wolfssh/key.ssh |
| 131 | + echo "Converting to SSH key format..." |
| 132 | + ssh-keygen -f key.pem -i -m PKCS8 > ../wolfssh/key.ssh || { echo "SSH keygen failed"; exit 1; } |
124 | 133 | cd .. |
125 | 134 |
|
126 | 135 | # Start echoserver and wait for it to be ready |
| 136 | + echo "Starting echoserver..." |
127 | 137 | cd wolfssh |
128 | | - ./examples/echoserver/echoserver -1 -s key.ssh |
| 138 | + ./examples/echoserver/echoserver -1 -s key.ssh & || { echo "Echoserver failed to start"; exit 1; } |
| 139 | + echo "Echoserver started with PID: $!" |
| 140 | + sleep 2 |
129 | 141 | cd .. |
130 | 142 |
|
131 | 143 | # Test with custom password |
| 144 | + echo "Testing client connection with custom password..." |
132 | 145 | cd wolfssh |
133 | | - ./examples/client/client -i ../wolftpm/keyblob2.bin -u hansel -K custompassword |
| 146 | + ./examples/client/client -i ../wolftpm/keyblob2.bin -u hansel -K custompassword || { echo "Client connection failed"; exit 1; } |
134 | 147 | cd .. |
135 | 148 |
|
136 | 149 | # Cleanup |
| 150 | + echo "Cleaning up..." |
137 | 151 | pkill -f tpm_server |
138 | 152 | sleep 2 |
139 | 153 |
|
|
0 commit comments