diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-06-05 21:09:46 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-06-05 21:09:46 +0200 |
commit | cf20fa0f09c6ba7737b41d6e64764e2f8a607839 (patch) | |
tree | e3fe481c9906fe59abc0c7c5c508ece4257cb001 /tests/suite | |
parent | c66f5d4daa8bd81b662486b76a022db118869b5e (diff) | |
download | gnutls-cf20fa0f09c6ba7737b41d6e64764e2f8a607839.tar.gz |
Corrected fail() shell function. Reported by Andreas Metzler.
Diffstat (limited to 'tests/suite')
-rwxr-xr-x | tests/suite/testcompat-main | 44 | ||||
-rwxr-xr-x | tests/suite/testsrn | 26 |
2 files changed, 35 insertions, 35 deletions
diff --git a/tests/suite/testcompat-main b/tests/suite/testcompat-main index a6b5ab952c..abf6a43d67 100755 --- a/tests/suite/testcompat-main +++ b/tests/suite/testcompat-main @@ -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 diff --git a/tests/suite/testsrn b/tests/suite/testsrn index 68993b5d78..f11a89af3d 100755 --- a/tests/suite/testsrn +++ b/tests/suite/testsrn @@ -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 |