From b664cea735a3b0e59351b88587d9a8c103ff0a5a Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Tue, 24 May 2022 13:13:53 +0200 Subject: [PATCH] Typo in testing script --- scripts/ocsp-stapling.test | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/ocsp-stapling.test b/scripts/ocsp-stapling.test index dc634a2d9..3b817a5c6 100755 --- a/scripts/ocsp-stapling.test +++ b/scripts/ocsp-stapling.test @@ -234,8 +234,12 @@ if [ ! -f "$ready_file" ]; then exit 1 else # should fail if ocspstapling is also enabled - echo "hi" | openssl s_client -status $V4V6_FLAG -connect ${LOCALHOST}:$port1 -cert ./certs/client-cert.pem -key ./certs/client-key.pem -CAfile ./certs/ocsp/root-ca-cert.pem 2>&1 | tee /dev/stderr | fgrep -q 'self signed certificate in certificate chain' - if [ $? -neq 0 ]; then + OPENSSL_OUTPUT=$(echo "hi" | openssl s_client -status "$V4V6_FLAG" -connect "${LOCALHOST}:$port1" -cert ./certs/client-cert.pem -key ./certs/client-key.pem -CAfile ./certs/ocsp/root-ca-cert.pem 2>&1) + OPENSSL_RESULT=$? + echo "$OPENSSL_OUTPUT" + fgrep -q 'self signed certificate in certificate chain' <<< "$OPENSSL_OUTPUT" + FGREP_RESULT=$? + if [ $OPENSSL_RESULT -eq 0 -a $FGREP_RESULT -ne 0 ]; then printf '%s\n' "Expected verification error from s_client is missing." remove_single_rF "$ready_file" exit 1