diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libssl/test/testssl | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libssl/test/testssl')
-rw-r--r-- | src/lib/libssl/test/testssl | 120 |
1 files changed, 88 insertions, 32 deletions
diff --git a/src/lib/libssl/test/testssl b/src/lib/libssl/test/testssl index a88e290c57..ba5e41c861 100644 --- a/src/lib/libssl/test/testssl +++ b/src/lib/libssl/test/testssl | |||
@@ -1,81 +1,137 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | if [ "$1" = "" ]; then | ||
4 | key=../apps/server.pem | ||
5 | else | ||
6 | key="$1" | ||
7 | fi | ||
8 | if [ "$2" = "" ]; then | ||
9 | cert=../apps/server.pem | ||
10 | else | ||
11 | cert="$2" | ||
12 | fi | ||
13 | ssltest="./ssltest -key $key -cert $cert -c_key $key -c_cert $cert" | ||
14 | |||
15 | if ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then | ||
16 | dsa_cert=YES | ||
17 | else | ||
18 | dsa_cert=NO | ||
19 | fi | ||
20 | |||
21 | if [ "$3" = "" ]; then | ||
22 | CA="-CApath ../certs" | ||
23 | else | ||
24 | CA="-CAfile $3" | ||
25 | fi | ||
26 | |||
27 | if [ "$4" = "" ]; then | ||
28 | extra="" | ||
29 | else | ||
30 | extra="$4" | ||
31 | fi | ||
32 | |||
33 | ############################################################################# | ||
34 | |||
3 | echo test sslv2 | 35 | echo test sslv2 |
4 | ./ssltest -ssl2 || exit 1 | 36 | $ssltest -ssl2 $extra || exit 1 |
5 | 37 | ||
6 | echo test sslv2 with server authentication | 38 | echo test sslv2 with server authentication |
7 | ./ssltest -ssl2 -server_auth -CApath ../certs || exit 1 | 39 | $ssltest -ssl2 -server_auth $CA $extra || exit 1 |
8 | 40 | ||
9 | echo test sslv2 with client authentication | 41 | if [ $dsa_cert = NO ]; then |
10 | ./ssltest -ssl2 -client_auth -CApath ../certs || exit 1 | 42 | echo test sslv2 with client authentication |
43 | $ssltest -ssl2 -client_auth $CA $extra || exit 1 | ||
11 | 44 | ||
12 | echo test sslv2 with both client and server authentication | 45 | echo test sslv2 with both client and server authentication |
13 | ./ssltest -ssl2 -server_auth -client_auth -CApath ../certs || exit 1 | 46 | $ssltest -ssl2 -server_auth -client_auth $CA $extra || exit 1 |
47 | fi | ||
14 | 48 | ||
15 | echo test sslv3 | 49 | echo test sslv3 |
16 | ./ssltest -ssl3 || exit 1 | 50 | $ssltest -ssl3 $extra || exit 1 |
17 | 51 | ||
18 | echo test sslv3 with server authentication | 52 | echo test sslv3 with server authentication |
19 | ./ssltest -ssl3 -server_auth -CApath ../certs || exit 1 | 53 | $ssltest -ssl3 -server_auth $CA $extra || exit 1 |
20 | 54 | ||
21 | echo test sslv3 with client authentication | 55 | echo test sslv3 with client authentication |
22 | ./ssltest -ssl3 -client_auth -CApath ../certs || exit 1 | 56 | $ssltest -ssl3 -client_auth $CA $extra || exit 1 |
23 | 57 | ||
24 | echo test sslv3 with both client and server authentication | 58 | echo test sslv3 with both client and server authentication |
25 | ./ssltest -ssl3 -server_auth -client_auth -CApath ../certs || exit 1 | 59 | $ssltest -ssl3 -server_auth -client_auth $CA $extra || exit 1 |
26 | 60 | ||
27 | echo test sslv2/sslv3 | 61 | echo test sslv2/sslv3 |
28 | ./ssltest || exit 1 | 62 | $ssltest $extra || exit 1 |
29 | 63 | ||
30 | echo test sslv2/sslv3 with server authentication | 64 | echo test sslv2/sslv3 with server authentication |
31 | ./ssltest -server_auth -CApath ../certs || exit 1 | 65 | $ssltest -server_auth $CA $extra || exit 1 |
32 | 66 | ||
33 | echo test sslv2/sslv3 with client authentication | 67 | echo test sslv2/sslv3 with client authentication |
34 | ./ssltest -client_auth -CApath ../certs || exit 1 | 68 | $ssltest -client_auth $CA $extra || exit 1 |
35 | 69 | ||
36 | echo test sslv2/sslv3 with both client and server authentication | 70 | echo test sslv2/sslv3 with both client and server authentication |
37 | ./ssltest -server_auth -client_auth -CApath ../certs || exit 1 | 71 | $ssltest -server_auth -client_auth $CA $extra || exit 1 |
38 | 72 | ||
39 | echo test sslv2 via BIO pair | 73 | echo test sslv2 via BIO pair |
40 | ./ssltest -bio_pair -ssl2 || exit 1 | 74 | $ssltest -bio_pair -ssl2 $extra || exit 1 |
41 | 75 | ||
42 | echo test sslv2 with server authentication via BIO pair | 76 | echo test sslv2 with server authentication via BIO pair |
43 | ./ssltest -bio_pair -ssl2 -server_auth -CApath ../certs || exit 1 | 77 | $ssltest -bio_pair -ssl2 -server_auth $CA $extra || exit 1 |
44 | 78 | ||
45 | echo test sslv2 with client authentication via BIO pair | 79 | if [ $dsa_cert = NO ]; then |
46 | ./ssltest -bio_pair -ssl2 -client_auth -CApath ../certs || exit 1 | 80 | echo test sslv2 with client authentication via BIO pair |
81 | $ssltest -bio_pair -ssl2 -client_auth $CA $extra || exit 1 | ||
47 | 82 | ||
48 | echo test sslv2 with both client and server authentication via BIO pair | 83 | echo test sslv2 with both client and server authentication via BIO pair |
49 | ./ssltest -bio_pair -ssl2 -server_auth -client_auth -CApath ../certs || exit 1 | 84 | $ssltest -bio_pair -ssl2 -server_auth -client_auth $CA $extra || exit 1 |
85 | fi | ||
50 | 86 | ||
51 | echo test sslv3 via BIO pair | 87 | echo test sslv3 via BIO pair |
52 | ./ssltest -bio_pair -ssl3 || exit 1 | 88 | $ssltest -bio_pair -ssl3 $extra || exit 1 |
53 | 89 | ||
54 | echo test sslv3 with server authentication via BIO pair | 90 | echo test sslv3 with server authentication via BIO pair |
55 | ./ssltest -bio_pair -ssl3 -server_auth -CApath ../certs || exit 1 | 91 | $ssltest -bio_pair -ssl3 -server_auth $CA $extra || exit 1 |
56 | 92 | ||
57 | echo test sslv3 with client authentication via BIO pair | 93 | echo test sslv3 with client authentication via BIO pair |
58 | ./ssltest -bio_pair -ssl3 -client_auth -CApath ../certs || exit 1 | 94 | $ssltest -bio_pair -ssl3 -client_auth $CA $extra || exit 1 |
59 | 95 | ||
60 | echo test sslv3 with both client and server authentication via BIO pair | 96 | echo test sslv3 with both client and server authentication via BIO pair |
61 | ./ssltest -bio_pair -ssl3 -server_auth -client_auth -CApath ../certs || exit 1 | 97 | $ssltest -bio_pair -ssl3 -server_auth -client_auth $CA $extra || exit 1 |
62 | 98 | ||
63 | echo test sslv2/sslv3 via BIO pair | 99 | echo test sslv2/sslv3 via BIO pair |
64 | ./ssltest || exit 1 | 100 | $ssltest $extra || exit 1 |
65 | 101 | ||
66 | echo test sslv2/sslv3 w/o DHE via BIO pair | 102 | if [ $dsa_cert = NO ]; then |
67 | ./ssltest -bio_pair -no_dhe || exit 1 | 103 | echo test sslv2/sslv3 w/o DHE via BIO pair |
104 | $ssltest -bio_pair -no_dhe $extra || exit 1 | ||
105 | fi | ||
68 | 106 | ||
69 | echo test sslv2/sslv3 with 1024bit DHE | 107 | echo test sslv2/sslv3 with 1024bit DHE via BIO pair |
70 | ./ssltest -bio_pair -dhe1024 -v || exit 1 | 108 | $ssltest -bio_pair -dhe1024dsa -v $extra || exit 1 |
71 | 109 | ||
72 | echo test sslv2/sslv3 with server authentication | 110 | echo test sslv2/sslv3 with server authentication |
73 | ./ssltest -bio_pair -server_auth -CApath ../certs || exit 1 | 111 | $ssltest -bio_pair -server_auth $CA $extra || exit 1 |
74 | 112 | ||
75 | echo test sslv2/sslv3 with client authentication via BIO pair | 113 | echo test sslv2/sslv3 with client authentication via BIO pair |
76 | ./ssltest -bio_pair -client_auth -CApath ../certs || exit 1 | 114 | $ssltest -bio_pair -client_auth $CA $extra || exit 1 |
77 | 115 | ||
78 | echo test sslv2/sslv3 with both client and server authentication via BIO pair | 116 | echo test sslv2/sslv3 with both client and server authentication via BIO pair |
79 | ./ssltest -bio_pair -server_auth -client_auth -CApath ../certs || exit 1 | 117 | $ssltest -bio_pair -server_auth -client_auth $CA $extra || exit 1 |
118 | |||
119 | echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify | ||
120 | $ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1 | ||
121 | |||
122 | ############################################################################# | ||
123 | |||
124 | echo test tls1 with 1024bit anonymous DH, multiple handshakes | ||
125 | $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1 | ||
126 | |||
127 | if ../apps/openssl no-rsa; then | ||
128 | echo skipping RSA tests | ||
129 | else | ||
130 | echo test tls1 with 1024bit RSA, no DHE, multiple handshakes | ||
131 | ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1 | ||
132 | |||
133 | echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes | ||
134 | ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 | ||
135 | fi | ||
80 | 136 | ||
81 | exit 0 | 137 | exit 0 |