aboutsummaryrefslogtreecommitdiff
path: root/openssl/test/testssl
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/test/testssl')
-rw-r--r--openssl/test/testssl38
1 files changed, 34 insertions, 4 deletions
diff --git a/openssl/test/testssl b/openssl/test/testssl
index 9fb89a3dd..b9b86b3b6 100644
--- a/openssl/test/testssl
+++ b/openssl/test/testssl
@@ -119,10 +119,9 @@ $ssltest -bio_pair -server_auth -client_auth $CA $extra || exit 1
echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify
$ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1
-echo "Testing ciphersuites"
-for protocol in TLSv1.2 SSLv3; do
- echo "Testing ciphersuites for $protocol"
- for cipher in `../util/shlib_wrap.sh ../apps/openssl ciphers "RSA+$protocol" | tr ':' ' '`; do
+test_cipher() {
+ local cipher=$1
+ local protocol=$2
echo "Testing $cipher"
prot=""
if [ $protocol = "SSLv3" ] ; then
@@ -133,7 +132,38 @@ for protocol in TLSv1.2 SSLv3; do
echo "Failed $cipher"
exit 1
fi
+}
+
+echo "Testing ciphersuites"
+for protocol in TLSv1.2 SSLv3; do
+ echo "Testing ciphersuites for $protocol"
+ for cipher in `../util/shlib_wrap.sh ../apps/openssl ciphers "RSA+$protocol" | tr ':' ' '`; do
+ test_cipher $cipher $protocol
done
+ if ../util/shlib_wrap.sh ../apps/openssl no-dh; then
+ echo "skipping RSA+DHE tests"
+ else
+ for cipher in `../util/shlib_wrap.sh ../apps/openssl ciphers "EDH+aRSA+$protocol:-EXP" | tr ':' ' '`; do
+ test_cipher $cipher $protocol
+ done
+ echo "testing connection with weak DH, expecting failure"
+ if [ $protocol = "SSLv3" ] ; then
+ $ssltest -cipher EDH -dhe512 -ssl3
+ else
+ $ssltest -cipher EDH -dhe512
+ fi
+ if [ $? -eq 0 ]; then
+ echo "FAIL: connection with weak DH succeeded"
+ exit 1
+ fi
+ fi
+ if ../util/shlib_wrap.sh ../apps/openssl no-ec; then
+ echo "skipping RSA+ECDHE tests"
+ else
+ for cipher in `../util/shlib_wrap.sh ../apps/openssl ciphers "EECDH+aRSA+$protocol:-EXP" | tr ':' ' '`; do
+ test_cipher $cipher $protocol
+ done
+ fi
done
#############################################################################