]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Corrected fail() shell function. Reported by Andreas Metzler.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 5 Jun 2011 19:09:46 +0000 (21:09 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 5 Jun 2011 19:09:46 +0000 (21:09 +0200)
tests/dsa/testdsa
tests/openpgp-certs/testcerts
tests/scripts/common.sh
tests/suite/testcompat-main
tests/suite/testsrn

index ba9aeff65f772907bcac8dd4a5215c1230060185..3d6a2f0e9d7759a0ba77ff7ef4aeaaaf16a8a4b8 100755 (executable)
@@ -43,25 +43,25 @@ launch_server $$ --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" --x509certfile $
 wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null || \
-  fail "Failed connection to a server with DSA 1024 key and TLS 1.0!"
+  fail $PID "Failed connection to a server with DSA 1024 key and TLS 1.0!"
 
 echo "Checking server DSA-1024 with client DSA-1024 and TLS 1.0"
 
 #try with client key of 1024 bits (should succeed) 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure --x509certfile $srcdir/cert.dsa.1024.pem --x509keyfile $srcdir/dsa.1024.pem </dev/null >/dev/null || \
-  fail "Failed connection to a server with DSA 1024 key and TLS 1.0!"
+  fail $PID "Failed connection to a server with DSA 1024 key and TLS 1.0!"
 
 echo "Checking server DSA-1024 with client DSA-2048 and TLS 1.0"
 
 #try with client key of 2048 bits (should fail) 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure --x509certfile $srcdir/cert.dsa.2048.pem --x509keyfile $srcdir/dsa.2048.pem </dev/null >/dev/null 2>&1 && \
-  fail "Succeeded connection to a server with a client DSA 2048 key and TLS 1.0!"
+  fail $PID "Succeeded connection to a server with a client DSA 2048 key and TLS 1.0!"
 
 echo "Checking server DSA-1024 with client DSA-3072 and TLS 1.0"
 
 #try with client key of 3072 bits (should fail) 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure --x509certfile $srcdir/cert.dsa.3072.pem --x509keyfile $srcdir/dsa.3072.pem </dev/null >/dev/null 2>&1 && \
-  fail "Succeeded connection to a server with a client DSA 3072 key and TLS 1.0!"
+  fail $PID "Succeeded connection to a server with a client DSA 3072 key and TLS 1.0!"
 
 kill $PID
 wait
@@ -74,25 +74,25 @@ launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" --x509certfile
 wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null || \
-  fail "Failed connection to a server with DSA 1024 key and TLS 1.2!"
+  fail $PID "Failed connection to a server with DSA 1024 key and TLS 1.2!"
 
 echo "Checking server DSA-1024 with client DSA-1024 and TLS 1.2"
 
 #try with client key of 1024 bits (should succeed) 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure --x509certfile $srcdir/cert.dsa.1024.pem --x509keyfile $srcdir/dsa.1024.pem </dev/null >/dev/null || \
-  fail "Failed connection to a server with DSA 1024 key and TLS 1.2!"
+  fail $PID "Failed connection to a server with DSA 1024 key and TLS 1.2!"
 
 echo "Checking server DSA-1024 with client DSA-2048 and TLS 1.2"
 
 #try with client key of 2048 bits (should succeed) 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure --x509certfile $srcdir/cert.dsa.2048.pem --x509keyfile $srcdir/dsa.2048.pem </dev/null >/dev/null || \
-  fail "Failed connection to a server with a client DSA 2048 key and TLS 1.2!"
+  fail $PID "Failed connection to a server with a client DSA 2048 key and TLS 1.2!"
 
 echo "Checking server DSA-1024 with client DSA-3072 and TLS 1.2"
 
 #try with client key of 3072 bits (should succeed) 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure --x509certfile $srcdir/cert.dsa.3072.pem --x509keyfile $srcdir/dsa.3072.pem </dev/null >/dev/null || \
-  fail "Failed connection to a server with a client DSA 3072 key and TLS 1.2!"
+  fail $PID "Failed connection to a server with a client DSA 3072 key and TLS 1.2!"
 
 
 kill $PID
@@ -106,7 +106,7 @@ launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" --x509certfile
 wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null 2>&1 && \
-  fail "Succeeded connection to a server with DSA 2048 key and TLS 1.0. Should have failed!"
+  fail $PID "Succeeded connection to a server with DSA 2048 key and TLS 1.0. Should have failed!"
 
 kill $PID
 wait
@@ -119,7 +119,7 @@ launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" --x509certfile
 wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null || \
-  fail "Failed connection to a server with DSA 2048 key and TLS 1.2!"
+  fail $PID "Failed connection to a server with DSA 2048 key and TLS 1.2!"
 
 kill $PID
 wait
@@ -132,7 +132,7 @@ launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0" --x509certfile
 wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null 2>&1 && \
-  fail "Succeeded connection to a server with DSA 3072 key and TLS 1.0. Should have failed!"
+  fail $PID "Succeeded connection to a server with DSA 3072 key and TLS 1.0. Should have failed!"
 
 kill $PID
 wait
@@ -145,7 +145,7 @@ launch_server $$  --priority "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2" --x509certfile
 wait_server $PID
 
 $CLI $DEBUG -p $PORT 127.0.0.1 --insecure </dev/null >/dev/null || \
-  fail "Failed connection to a server with DSA 3072 key and TLS 1.2!"
+  fail $PID "Failed connection to a server with DSA 3072 key and TLS 1.2!"
 
 kill $PID
 wait
index f9dbf23b5d1b3afd4ec0a931ad562c6110c59340..3ae5065e1af8f343bab1842ad56fb12db40c6097 100755 (executable)
@@ -47,10 +47,10 @@ wait_server $PID
 #  fail "Connection to verified IP address should have succeeded! (error code $?)" $?
 
 $CLI $DEBUG -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null 2>&1 && \
-  fail "Connection to unrecognized IP address should have failed!"
+  fail $PID "Connection to unrecognized IP address should have failed!"
 
 $CLI $DEBUG -p $PORT localhost --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null 2>&1 && \
-  fail "Connection to unverified (but present) 'localhost' should have failed!"
+  fail $PID "Connection to unverified (but present) 'localhost' should have failed!"
 
 kill $PID
 wait
@@ -59,14 +59,14 @@ launch_server $$ --pgpcertfile $srcdir/srv-public-localhost-signed.gpg --pgpkeyf
 wait_server $PID
 
 echo | $CLI $DEBUG -p $PORT 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null 2>&1 && \
-  fail "Connection to unverified IP address should have failed! (error code $?)" $?
+  fail $PID "Connection to unverified IP address should have failed! (error code $?)" $?
 
 $CLI $DEBUG -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null 2>&1 && \
-  fail "Connection to unrecognized IP address should have failed!"
+  fail $PID "Connection to unrecognized IP address should have failed!"
 
 #see reason above
 #$CLI -p $PORT localhost --pgpkeyring ca-public.gpg </dev/null >/dev/null || \
-#  fail "Connection to verified 'localhost' should have succeded! (error code $?)" $?
+#  fail $PID "Connection to verified 'localhost' should have succeded! (error code $?)" $?
 
 kill $PID
 wait
@@ -76,10 +76,10 @@ wait_server $PID
 
 # give the server a chance to initialize
 echo | $CLI $DEBUG -p $PORT 127.0.0.1 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null || \
-  fail "Connection to signed PGP certificate should have succeeded! (error code $?)" $?
+  fail $PID "Connection to signed PGP certificate should have succeeded! (error code $?)" $?
 
 $CLI $DEBUG -p $PORT 127.0.0.2 --pgpkeyring $srcdir/ca-public.gpg </dev/null >/dev/null && \
-  fail "Connection to unrecognized IP address should have failed!"
+  fail $PID "Connection to unrecognized IP address should have failed!"
 
 kill $PID
 wait
index 18c321fa1481f31566e3ed821b34ba745718f87b..dd616f361ca48a2fb68943a3126c614968a6cd2c 100644 (file)
@@ -19,6 +19,8 @@
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 fail() {
+   PID=$1
+   shift;
    echo "Failure: $1" >&2
    kill $PID
    exit 1
index a6b5ab952cff5eb11f99b1b7c38b94e7321723fb..abf6a43d67fd53bd46529779c119e4c5a0ee0254 100755 (executable)
@@ -72,17 +72,17 @@ wait_server $PID
 # Test SSL 3.0 with RSA ciphersuite
 echo "Checking SSL 3.0 with RSA..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 # Test SSL 3.0 with DHE-RSA ciphersuite
 echo "Checking SSL 3.0 with DHE-RSA..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+DHE-RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 # Test SSL 3.0 with DHE-DSS ciphersuite
 echo "Checking SSL 3.0 with DHE-DSS..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-SSL3.0:+DHE-DSS" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -95,26 +95,26 @@ wait_server $PID
 # Test TLS 1.0 with RSA ciphersuite
 echo "Checking TLS 1.0 with RSA..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 # Test TLS 1.0 with DHE-RSA ciphersuite
 echo "Checking TLS 1.0 with DHE-RSA..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+DHE-RSA" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 if test $SV = 0;then
 
 # Test TLS 1.0 with DHE-RSA ciphersuite
 echo "Checking TLS 1.0 with ECDHE-RSA..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-RSA:+CURVE-ALL" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 fi
 
 # Test TLS 1.0 with DHE-DSS ciphersuite
 echo "Checking TLS 1.0 with DHE-DSS..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+DHE-DSS" --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -129,7 +129,7 @@ wait_server $PID
 # Test TLS 1.0 with ECDHE-ECDSA ciphersuite
 echo "Checking TLS 1.0 with ECDHE-ECDSA..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-TLS1.0:+ECDHE-ECDSA:+CURVE-ALL" --insecure --x509certfile $ECC_CERT --x509keyfile $ECC_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -145,7 +145,7 @@ if test $SV = 0;then
 # Test DTLS 1.0 with RSA ciphersuite
 echo "Checking DTLS 1.0 with RSA..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+RSA" --udp --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -157,7 +157,7 @@ wait_server $PID
 # Test DTLS 1.0 with DHE-RSA ciphersuite
 echo "Checking DTLS 1.0 with DHE-RSA..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+DHE-RSA" --udp --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -169,7 +169,7 @@ wait_server $PID
 # Test DTLS 1.0 with DHE-DSS ciphersuite
 echo "Checking DTLS 1.0 with DHE-DSS..." 
 $CLI $DEBUG -p $PORT 127.0.0.1 --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VERS-DTLS1.0:+DHE-DSS" --udp --insecure --x509certfile $CLI_CERT --x509keyfile $CLI_KEY </dev/null >/dev/null || \
-  fail "Failed"
+  fail $PID "Failed"
 
 fi
 
@@ -193,7 +193,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $OPENSSL_CLI s_client  -host localhost -port $PORT -ssl3 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -203,7 +203,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $OPENSSL_CLI s_client  -host localhost -port $PORT -ssl3 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -213,7 +213,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $OPENSSL_CLI s_client  -host localhost -port $PORT -ssl3 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -225,7 +225,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $OPENSSL_CLI s_client  -host localhost -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -235,7 +235,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $OPENSSL_CLI s_client  -host localhost -tls1 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -245,7 +245,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $OPENSSL_CLI s_client  -host localhost -tls1 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -258,7 +258,7 @@ wait_server $PID
 
 #-cipher ECDHE-RSA-AES128-SHA 
 $OPENSSL_CLI s_client  -host localhost -tls1 -port $PORT -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -269,7 +269,7 @@ wait_server $PID
 
 #-cipher ECDHE-ECDSA-AES128-SHA 
 $OPENSSL_CLI s_client  -host localhost -tls1 -port $PORT -cert $ECC_CERT -key $ECC_KEY -CAfile $CA_ECC_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -280,7 +280,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $OPENSSL_CLI s_client  -host localhost -port $PORT -dtls1 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -290,7 +290,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $CLI s_client  -host localhost -port $PORT -dtls1 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
@@ -300,7 +300,7 @@ launch_server $$  --priority "NONE:+CIPHER-ALL:+SIGN-ALL:+COMP-NULL:+MAC-ALL:+VE
 wait_server $PID
 
 $CLI s_client  -host localhost -port $PORT -dtls1 -cert $CLI_CERT -key $CLI_KEY -CAfile $CA_CERT </dev/null 2>&1 | grep "\:error\:" && \
-  fail "Failed"
+  fail $PID "Failed"
 
 kill $PID
 wait
index 68993b5d78839775a5d3707e4ed727b9f52dcea8..f11a89af3db85649afbf5cbc92937ba1f01a15ce 100755 (executable)
@@ -39,19 +39,19 @@ PID=$!
 wait_server $PID
 
 $CLI -p $PORT 127.0.0.1 --rehandshake --priority NONE:+AES-128-CBC:+MD5:+SHA1:+VERS-SSL3.0:+ANON-DH:+COMP-NULL:%SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "0. Renegotiation should have succeeded!"
+  fail $PID "0. Renegotiation should have succeeded!"
 
 $CLI -p $PORT 127.0.0.1 --rehandshake --priority NORMAL:+ANON-DH:%SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "1. Safe rehandshake should have succeeded!"
+  fail $PID "1. Safe rehandshake should have succeeded!"
 
 $CLI -p $PORT 127.0.0.1 --rehandshake --priority NORMAL:+ANON-DH:%UNSAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "2. Unsafe rehandshake should have succeeded!"
+  fail $PID "2. Unsafe rehandshake should have succeeded!"
 
 $CLI -p $PORT 127.0.0.1 --priority NORMAL:+ANON-DH:%DISABLE_SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "3. Unsafe negotiation should have succeeded!"
+  fail $PID "3. Unsafe negotiation should have succeeded!"
 
 $CLI -p $PORT 127.0.0.1 --rehandshake --priority NORMAL:+ANON-DH:%DISABLE_SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 && \
-  fail "4. Unsafe renegotiation should have failed!"
+  fail $PID "4. Unsafe renegotiation should have failed!"
 
 
 kill $PID
@@ -62,16 +62,16 @@ PID=$!
 wait_server $PID
 
 $CLI -p $PORT 127.0.0.1 --rehandshake --priority NORMAL:+ANON-DH:%SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "5. Safe rehandshake should have succeeded!"
+  fail $PID "5. Safe rehandshake should have succeeded!"
 
 $CLI -p $PORT 127.0.0.1 --rehandshake --priority NORMAL:+ANON-DH:%UNSAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "6. Unsafe rehandshake should have succeeded!"
+  fail $PID "6. Unsafe rehandshake should have succeeded!"
 
 $CLI -p $PORT 127.0.0.1 --priority NORMAL:+ANON-DH:%DISABLE_SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 && \
-  fail "7. Unsafe negotiation should have failed!"
+  fail $PID "7. Unsafe negotiation should have failed!"
 
 $CLI -p $PORT 127.0.0.1 --rehandshake --priority NORMAL:+ANON-DH:%DISABLE_SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 && \
-  fail "8. Unsafe renegotiation should have failed!"
+  fail $PID "8. Unsafe renegotiation should have failed!"
 
 kill $PID
 wait
@@ -81,16 +81,16 @@ PID=$!
 wait_server $PID
 
 $CLI -p $PORT 127.0.0.1 --priority NORMAL:+ANON-DH:%SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 && \
-  fail "9. Initial connection should have failed!"
+  fail $PID "9. Initial connection should have failed!"
 
 $CLI -p $PORT 127.0.0.1 --priority NORMAL:+ANON-DH:%UNSAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "10. Unsafe connection should have succeeded!"
+  fail $PID "10. Unsafe connection should have succeeded!"
 
 $CLI -p $PORT 127.0.0.1 --priority NORMAL:+ANON-DH:%DISABLE_SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "11. Unsafe negotiation should have succeeded!"
+  fail $PID "11. Unsafe negotiation should have succeeded!"
 
 $CLI -p $PORT 127.0.0.1 --rehandshake --priority NORMAL:+ANON-DH:%DISABLE_SAFE_RENEGOTIATION </dev/null >/dev/null 2>&1 || \
-  fail "12. Unsafe renegotiation should have succeeded!"
+  fail $PID "12. Unsafe renegotiation should have succeeded!"
 
 kill $PID
 wait