Skip to content

Commit dabfad9

Browse files
julek-wolfsslrizlik
authored andcommitted
Fix ocsp stapling test 2
1 parent 3206637 commit dabfad9

1 file changed

Lines changed: 23 additions & 13 deletions

File tree

scripts/ocsp-stapling2.test

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,19 @@ openssl ocsp -port $port3 -nmin 1 \
334334
"$@" \
335335
&
336336

337+
# NEW: openssl isn't being cleaned up, invoke directly in script for cleanup
338+
# purposes!
339+
openssl ocsp -port $port4 -nmin 1 \
340+
-index certs/ocsp/index-ca-and-intermediate-cas.txt \
341+
-rsigner certs/ocsp/ocsp-responder-cert.pem \
342+
-rkey certs/ocsp/ocsp-responder-key.pem \
343+
-CA certs/ocsp/root-ca-cert.pem \
344+
"$@" \
345+
&
346+
337347
sleep 0.1
338348
# "jobs" is not portable for posix. Must use bash interpreter!
339-
[ $(jobs -r | wc -l) -ne 3 ] && printf '\n\n%s\n' "Setup ocsp responder failed, skipping" && exit 0
349+
[ $(jobs -r | wc -l) -ne 4 ] && printf '\n\n%s\n' "Setup ocsp responder failed, skipping" && exit 0
340350

341351
printf '\n\n%s\n\n' "All OCSP responders started successfully!"
342352
printf '%s\n\n' "------------- TEST CASE 1 SHOULD PASS ------------------------"
@@ -352,18 +362,18 @@ RESULT=$?
352362
[ $RESULT -ne 0 ] && printf '\n\n%s\n' "Client connection 1 failed" && exit 1
353363
printf '%s\n\n' "Test PASSED!"
354364

355-
printf '%s\n\n' "TEST CASE 2 DISABLED PENDING REVIEW"
356-
#printf '%s\n\n' "------------- TEST CASE 2 SHOULD PASS ------------------------"
357-
#remove_single_rF $ready_file5
358-
#./examples/server/server -c certs/ocsp/server3-cert.pem \
359-
# -k certs/ocsp/server3-key.pem -R $ready_file5 \
360-
# -p $port5 &
361-
#wait_for_readyFile $ready_file5 $server_pid5 $port5
362-
#./examples/client/client -C -A certs/ocsp/root-ca-cert.pem -W 3 -v 3 \
363-
# -p $port5
364-
#RESULT=$?
365-
#[ $RESULT -ne 0 ] && printf '\n\n%s\n' "Client connection 2 failed" && exit 1
366-
#printf '%s\n\n' "Test PASSED!"
365+
printf '%s\n\n' "------------- TEST CASE 2 SHOULD PASS ------------------------"
366+
remove_single_rF $ready_file5
367+
./examples/server/server -c certs/ocsp/server3-cert.pem \
368+
-k certs/ocsp/server3-key.pem -R $ready_file5 \
369+
-p $port5 &
370+
server_pid5=$!
371+
wait_for_readyFile $ready_file5 $server_pid5 $port5
372+
./examples/client/client -C -A certs/ocsp/root-ca-cert.pem -W 3 -v 3 \
373+
-p $port5
374+
RESULT=$?
375+
[ $RESULT -ne 0 ] && printf '\n\n%s\n' "Client connection 2 failed" && exit 1
376+
printf '%s\n\n' "Test PASSED!"
367377

368378
printf '%s\n\n' "------------- TEST CASE 3 SHOULD REVOKE ----------------------"
369379
# client test against our own server - REVOKED SERVER CERT

0 commit comments

Comments
 (0)