Skip to content

Commit 74a4079

Browse files
authored
Merge pull request #10093 from lealem47/ocsp_hang
Fix hang in OCSP Stapling test
2 parents c8415c4 + 49003f8 commit 74a4079

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/ocsp-stapling.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ get_first_free_port() {
272272
if [[ "$ret" -ge 65536 ]]; then
273273
ret=1024
274274
fi
275-
if ! nc -z "$V4V6_FLAG" $LOCALHOST_FOR_NC "$ret"; then
275+
if ! nc -z $V4V6_FLAG $LOCALHOST_FOR_NC "$ret"; then
276276
break
277277
fi
278278
ret=$((ret+1))
@@ -298,7 +298,7 @@ if [ ! -f "$ready_file" ]; then
298298
exit 1
299299
else
300300
# should fail if ocspstapling is also enabled
301-
OPENSSL_OUTPUT=$(echo "hi" | openssl s_client -status "$V4V6_FLAG" -legacy_renegotiation -connect "${LOCALHOST}:$port1" -cert ./certs/client-cert.pem -key ./certs/client-key.pem -CAfile ./certs/ocsp/root-ca-cert.pem 2>&1)
301+
OPENSSL_OUTPUT=$(echo "hi" | openssl s_client -status $V4V6_FLAG -legacy_renegotiation -connect "${LOCALHOST}:$port1" -cert ./certs/client-cert.pem -key ./certs/client-key.pem -CAfile ./certs/ocsp/root-ca-cert.pem 2>&1)
302302
OPENSSL_RESULT=$?
303303
echo "$OPENSSL_OUTPUT"
304304
grep -F -q 'self signed certificate in certificate chain' <<< "$OPENSSL_OUTPUT"
@@ -534,7 +534,7 @@ generate_port() {
534534

535535
# Start OpenSSL server that has no OCSP responses to return
536536
generate_port
537-
openssl s_server "$V4V6_FLAG" -cert ./certs/server-cert.pem -key certs/server-key.pem -www -port "$port" &
537+
openssl s_server $V4V6_FLAG -cert ./certs/server-cert.pem -key certs/server-key.pem -www -port "$port" &
538538
MAX_TIMEOUT=10
539539
until nc -z localhost "$port" # Wait for openssl to be ready
540540
do

0 commit comments

Comments
 (0)