diff options
| author | cvs2svn <admin@example.com> | 2018-11-07 01:08:50 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2018-11-07 01:08:50 +0000 |
| commit | 2035faf3f8aa95b888d9416c3cc7328c0ea18beb (patch) | |
| tree | f08a08d357c5d30455c569890f747c1d9b241316 /src/regress/lib/libssl/ssl/testssl | |
| parent | be03b61c1b8f59ccdd34dbe5f6c6b30de697d28b (diff) | |
| download | openbsd-bluhm_20181106.tar.gz openbsd-bluhm_20181106.tar.bz2 openbsd-bluhm_20181106.zip | |
This commit was manufactured by cvs2git to create tag 'bluhm_20181106'.bluhm_20181106
Diffstat (limited to 'src/regress/lib/libssl/ssl/testssl')
| -rw-r--r-- | src/regress/lib/libssl/ssl/testssl | 138 |
1 files changed, 0 insertions, 138 deletions
diff --git a/src/regress/lib/libssl/ssl/testssl b/src/regress/lib/libssl/ssl/testssl deleted file mode 100644 index 3563d13607..0000000000 --- a/src/regress/lib/libssl/ssl/testssl +++ /dev/null | |||
| @@ -1,138 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | key="$1" | ||
| 4 | cert="$2" | ||
| 5 | CA="-CAfile $3" | ||
| 6 | ssltest="${4-./ssltest} -key $key -cert $cert -c_key $key -c_cert $cert" | ||
| 7 | openssl=${5-openssl} | ||
| 8 | extra="$6" | ||
| 9 | |||
| 10 | $openssl version || exit 1 | ||
| 11 | |||
| 12 | if $openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then | ||
| 13 | dsa_cert=YES | ||
| 14 | else | ||
| 15 | dsa_cert=NO | ||
| 16 | fi | ||
| 17 | |||
| 18 | ############################################################################# | ||
| 19 | |||
| 20 | echo test sslv2/sslv3 | ||
| 21 | $ssltest $extra || exit 1 | ||
| 22 | |||
| 23 | echo test sslv2/sslv3 with server authentication | ||
| 24 | $ssltest -server_auth $CA $extra || exit 1 | ||
| 25 | |||
| 26 | echo test sslv2/sslv3 with client authentication | ||
| 27 | $ssltest -client_auth $CA $extra || exit 1 | ||
| 28 | |||
| 29 | echo test sslv2/sslv3 with both client and server authentication | ||
| 30 | $ssltest -server_auth -client_auth $CA $extra || exit 1 | ||
| 31 | |||
| 32 | echo test sslv2/sslv3 via BIO pair | ||
| 33 | $ssltest $extra || exit 1 | ||
| 34 | |||
| 35 | if [ $dsa_cert = NO ]; then | ||
| 36 | echo 'test sslv2/sslv3 w/o (EC)DHE via BIO pair' | ||
| 37 | $ssltest -bio_pair -no_dhe -no_ecdhe $extra || exit 1 | ||
| 38 | fi | ||
| 39 | |||
| 40 | echo test sslv2/sslv3 with 1024bit DHE via BIO pair | ||
| 41 | $ssltest -bio_pair -dhe1024dsa -v $extra || exit 1 | ||
| 42 | |||
| 43 | echo test sslv2/sslv3 with server authentication | ||
| 44 | $ssltest -bio_pair -server_auth $CA $extra || exit 1 | ||
| 45 | |||
| 46 | echo test sslv2/sslv3 with client authentication via BIO pair | ||
| 47 | $ssltest -bio_pair -client_auth $CA $extra || exit 1 | ||
| 48 | |||
| 49 | echo test sslv2/sslv3 with both client and server authentication via BIO pair | ||
| 50 | $ssltest -bio_pair -server_auth -client_auth $CA $extra || exit 1 | ||
| 51 | |||
| 52 | echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify | ||
| 53 | $ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1 | ||
| 54 | |||
| 55 | echo "Testing ciphersuites" | ||
| 56 | for protocol in TLSv1.2; do | ||
| 57 | echo "Testing ciphersuites for $protocol" | ||
| 58 | for cipher in `$openssl ciphers "$protocol+aRSA" | tr ':' ' '`; do | ||
| 59 | echo "Testing $cipher" | ||
| 60 | $ssltest -cipher $cipher | ||
| 61 | if [ $? -ne 0 ] ; then | ||
| 62 | echo "Failed $cipher" | ||
| 63 | exit 1 | ||
| 64 | fi | ||
| 65 | done | ||
| 66 | done | ||
| 67 | |||
| 68 | ############################################################################# | ||
| 69 | |||
| 70 | if $openssl no-dh; then | ||
| 71 | echo skipping anonymous DH tests | ||
| 72 | else | ||
| 73 | echo test tls1 with 1024bit anonymous DH, multiple handshakes | ||
| 74 | $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1 | ||
| 75 | fi | ||
| 76 | |||
| 77 | #if $openssl no-rsa; then | ||
| 78 | # echo skipping RSA tests | ||
| 79 | #else | ||
| 80 | # echo 'test tls1 with 1024bit RSA, no (EC)DHE, multiple handshakes' | ||
| 81 | # ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -no_ecdhe -num 10 -f -time $extra || exit 1 | ||
| 82 | # | ||
| 83 | # if $openssl no-dh; then | ||
| 84 | # echo skipping RSA+DHE tests | ||
| 85 | # else | ||
| 86 | # echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes | ||
| 87 | # ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 | ||
| 88 | # fi | ||
| 89 | #fi | ||
| 90 | |||
| 91 | # | ||
| 92 | # DTLS tests | ||
| 93 | # | ||
| 94 | |||
| 95 | echo test dtlsv1 | ||
| 96 | $ssltest -dtls1 $extra || exit 1 | ||
| 97 | |||
| 98 | echo test dtlsv1 with server authentication | ||
| 99 | $ssltest -dtls1 -server_auth $CA $extra || exit 1 | ||
| 100 | |||
| 101 | echo test dtlsv1 with client authentication | ||
| 102 | $ssltest -dtls1 -client_auth $CA $extra || exit 1 | ||
| 103 | |||
| 104 | echo test dtlsv1 with both client and server authentication | ||
| 105 | $ssltest -dtls1 -server_auth -client_auth $CA $extra || exit 1 | ||
| 106 | |||
| 107 | echo "Testing DTLS ciphersuites" | ||
| 108 | for protocol in SSLv3; do | ||
| 109 | echo "Testing ciphersuites for $protocol" | ||
| 110 | for cipher in `$openssl ciphers "RSA+$protocol" | tr ':' '\n' | | ||
| 111 | grep -v RC4`; do | ||
| 112 | echo "Testing $cipher" | ||
| 113 | $ssltest -cipher $cipher -dtls1 | ||
| 114 | if [ $? -ne 0 ] ; then | ||
| 115 | echo "Failed $cipher" | ||
| 116 | exit 1 | ||
| 117 | fi | ||
| 118 | done | ||
| 119 | done | ||
| 120 | |||
| 121 | # | ||
| 122 | # ALPN tests | ||
| 123 | # | ||
| 124 | echo "Testing ALPN..." | ||
| 125 | $ssltest -bio_pair -tls1 -alpn_client foo -alpn_server bar || exit 1 | ||
| 126 | $ssltest -bio_pair -tls1 -alpn_client foo -alpn_server foo \ | ||
| 127 | -alpn_expected foo || exit 1 | ||
| 128 | $ssltest -bio_pair -tls1 -alpn_client foo,bar -alpn_server foo \ | ||
| 129 | -alpn_expected foo || exit 1 | ||
| 130 | $ssltest -bio_pair -tls1 -alpn_client bar,foo -alpn_server foo \ | ||
| 131 | -alpn_expected foo || exit 1 | ||
| 132 | $ssltest -bio_pair -tls1 -alpn_client bar,foo -alpn_server foo,bar \ | ||
| 133 | -alpn_expected foo || exit 1 | ||
| 134 | $ssltest -bio_pair -tls1 -alpn_client bar,foo -alpn_server bar,foo \ | ||
| 135 | -alpn_expected bar || exit 1 | ||
| 136 | $ssltest -bio_pair -tls1 -alpn_client foo,bar -alpn_server bar,foo \ | ||
| 137 | -alpn_expected bar || exit 1 | ||
| 138 | $ssltest -bio_pair -tls1 -alpn_client baz -alpn_server bar,foo || exit 1 | ||
