diff options
| author | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
|---|---|---|
| committer | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
| commit | ee04221ea8063435416c7e6369e6eae76843aa71 (patch) | |
| tree | 821921a1dd0a5a3cece91121e121cc63c4b68128 /src/lib/libssl/test/testss | |
| parent | adf6731f6e1d04718aee00cb93435143046aee9a (diff) | |
| download | openbsd-eric_g2k12.tar.gz openbsd-eric_g2k12.tar.bz2 openbsd-eric_g2k12.zip | |
This commit was manufactured by cvs2git to create tag 'eric_g2k12'.eric_g2k12
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/test/testss | 163 | ||||
| -rw-r--r-- | src/lib/libssl/test/testss.com | 123 | ||||
| -rw-r--r-- | src/lib/libssl/test/testssl | 151 | ||||
| -rw-r--r-- | src/lib/libssl/test/testssl.com | 208 | ||||
| -rw-r--r-- | src/lib/libssl/test/testsslproxy | 10 |
5 files changed, 0 insertions, 655 deletions
diff --git a/src/lib/libssl/test/testss b/src/lib/libssl/test/testss deleted file mode 100644 index 1a426857d3..0000000000 --- a/src/lib/libssl/test/testss +++ /dev/null | |||
| @@ -1,163 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | digest='-sha1' | ||
| 4 | reqcmd="../util/shlib_wrap.sh ../apps/openssl req" | ||
| 5 | x509cmd="../util/shlib_wrap.sh ../apps/openssl x509 $digest" | ||
| 6 | verifycmd="../util/shlib_wrap.sh ../apps/openssl verify" | ||
| 7 | dummycnf="../apps/openssl.cnf" | ||
| 8 | |||
| 9 | CAkey="keyCA.ss" | ||
| 10 | CAcert="certCA.ss" | ||
| 11 | CAreq="reqCA.ss" | ||
| 12 | CAconf="CAss.cnf" | ||
| 13 | CAreq2="req2CA.ss" # temp | ||
| 14 | |||
| 15 | Uconf="Uss.cnf" | ||
| 16 | Ukey="keyU.ss" | ||
| 17 | Ureq="reqU.ss" | ||
| 18 | Ucert="certU.ss" | ||
| 19 | |||
| 20 | P1conf="P1ss.cnf" | ||
| 21 | P1key="keyP1.ss" | ||
| 22 | P1req="reqP1.ss" | ||
| 23 | P1cert="certP1.ss" | ||
| 24 | P1intermediate="tmp_intP1.ss" | ||
| 25 | |||
| 26 | P2conf="P2ss.cnf" | ||
| 27 | P2key="keyP2.ss" | ||
| 28 | P2req="reqP2.ss" | ||
| 29 | P2cert="certP2.ss" | ||
| 30 | P2intermediate="tmp_intP2.ss" | ||
| 31 | |||
| 32 | echo | ||
| 33 | echo "make a certificate request using 'req'" | ||
| 34 | |||
| 35 | echo "string to make the random number generator think it has entropy" >> ./.rnd | ||
| 36 | |||
| 37 | if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then | ||
| 38 | req_new='-newkey dsa:../apps/dsa512.pem' | ||
| 39 | else | ||
| 40 | req_new='-new' | ||
| 41 | fi | ||
| 42 | |||
| 43 | $reqcmd -config $CAconf -out $CAreq -keyout $CAkey $req_new #>err.ss | ||
| 44 | if [ $? != 0 ]; then | ||
| 45 | echo "error using 'req' to generate a certificate request" | ||
| 46 | exit 1 | ||
| 47 | fi | ||
| 48 | echo | ||
| 49 | echo "convert the certificate request into a self signed certificate using 'x509'" | ||
| 50 | $x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey -extfile $CAconf -extensions v3_ca >err.ss | ||
| 51 | if [ $? != 0 ]; then | ||
| 52 | echo "error using 'x509' to self sign a certificate request" | ||
| 53 | exit 1 | ||
| 54 | fi | ||
| 55 | |||
| 56 | echo | ||
| 57 | echo "convert a certificate into a certificate request using 'x509'" | ||
| 58 | $x509cmd -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 >err.ss | ||
| 59 | if [ $? != 0 ]; then | ||
| 60 | echo "error using 'x509' convert a certificate to a certificate request" | ||
| 61 | exit 1 | ||
| 62 | fi | ||
| 63 | |||
| 64 | $reqcmd -config $dummycnf -verify -in $CAreq -noout | ||
| 65 | if [ $? != 0 ]; then | ||
| 66 | echo first generated request is invalid | ||
| 67 | exit 1 | ||
| 68 | fi | ||
| 69 | |||
| 70 | $reqcmd -config $dummycnf -verify -in $CAreq2 -noout | ||
| 71 | if [ $? != 0 ]; then | ||
| 72 | echo second generated request is invalid | ||
| 73 | exit 1 | ||
| 74 | fi | ||
| 75 | |||
| 76 | $verifycmd -CAfile $CAcert $CAcert | ||
| 77 | if [ $? != 0 ]; then | ||
| 78 | echo first generated cert is invalid | ||
| 79 | exit 1 | ||
| 80 | fi | ||
| 81 | |||
| 82 | echo | ||
| 83 | echo "make a user certificate request using 'req'" | ||
| 84 | $reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss | ||
| 85 | if [ $? != 0 ]; then | ||
| 86 | echo "error using 'req' to generate a user certificate request" | ||
| 87 | exit 1 | ||
| 88 | fi | ||
| 89 | |||
| 90 | echo | ||
| 91 | echo "sign user certificate request with the just created CA via 'x509'" | ||
| 92 | $x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -extfile $Uconf -extensions v3_ee >err.ss | ||
| 93 | if [ $? != 0 ]; then | ||
| 94 | echo "error using 'x509' to sign a user certificate request" | ||
| 95 | exit 1 | ||
| 96 | fi | ||
| 97 | |||
| 98 | $verifycmd -CAfile $CAcert $Ucert | ||
| 99 | echo | ||
| 100 | echo "Certificate details" | ||
| 101 | $x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert | ||
| 102 | |||
| 103 | echo | ||
| 104 | echo "make a proxy certificate request using 'req'" | ||
| 105 | $reqcmd -config $P1conf -out $P1req -keyout $P1key $req_new >err.ss | ||
| 106 | if [ $? != 0 ]; then | ||
| 107 | echo "error using 'req' to generate a proxy certificate request" | ||
| 108 | exit 1 | ||
| 109 | fi | ||
| 110 | |||
| 111 | echo | ||
| 112 | echo "sign proxy certificate request with the just created user certificate via 'x509'" | ||
| 113 | $x509cmd -CAcreateserial -in $P1req -days 30 -req -out $P1cert -CA $Ucert -CAkey $Ukey -extfile $P1conf -extensions v3_proxy >err.ss | ||
| 114 | if [ $? != 0 ]; then | ||
| 115 | echo "error using 'x509' to sign a proxy certificate request" | ||
| 116 | exit 1 | ||
| 117 | fi | ||
| 118 | |||
| 119 | cat $Ucert > $P1intermediate | ||
| 120 | $verifycmd -CAfile $CAcert -untrusted $P1intermediate $P1cert | ||
| 121 | echo | ||
| 122 | echo "Certificate details" | ||
| 123 | $x509cmd -subject -issuer -startdate -enddate -noout -in $P1cert | ||
| 124 | |||
| 125 | echo | ||
| 126 | echo "make another proxy certificate request using 'req'" | ||
| 127 | $reqcmd -config $P2conf -out $P2req -keyout $P2key $req_new >err.ss | ||
| 128 | if [ $? != 0 ]; then | ||
| 129 | echo "error using 'req' to generate another proxy certificate request" | ||
| 130 | exit 1 | ||
| 131 | fi | ||
| 132 | |||
| 133 | echo | ||
| 134 | echo "sign second proxy certificate request with the first proxy certificate via 'x509'" | ||
| 135 | $x509cmd -CAcreateserial -in $P2req -days 30 -req -out $P2cert -CA $P1cert -CAkey $P1key -extfile $P2conf -extensions v3_proxy >err.ss | ||
| 136 | if [ $? != 0 ]; then | ||
| 137 | echo "error using 'x509' to sign a second proxy certificate request" | ||
| 138 | exit 1 | ||
| 139 | fi | ||
| 140 | |||
| 141 | cat $Ucert $P1cert > $P2intermediate | ||
| 142 | $verifycmd -CAfile $CAcert -untrusted $P2intermediate $P2cert | ||
| 143 | echo | ||
| 144 | echo "Certificate details" | ||
| 145 | $x509cmd -subject -issuer -startdate -enddate -noout -in $P2cert | ||
| 146 | |||
| 147 | echo | ||
| 148 | echo The generated CA certificate is $CAcert | ||
| 149 | echo The generated CA private key is $CAkey | ||
| 150 | |||
| 151 | echo The generated user certificate is $Ucert | ||
| 152 | echo The generated user private key is $Ukey | ||
| 153 | |||
| 154 | echo The first generated proxy certificate is $P1cert | ||
| 155 | echo The first generated proxy private key is $P1key | ||
| 156 | |||
| 157 | echo The second generated proxy certificate is $P2cert | ||
| 158 | echo The second generated proxy private key is $P2key | ||
| 159 | |||
| 160 | /bin/rm err.ss | ||
| 161 | #/bin/rm $P1intermediate | ||
| 162 | #/bin/rm $P2intermediate | ||
| 163 | exit 0 | ||
diff --git a/src/lib/libssl/test/testss.com b/src/lib/libssl/test/testss.com deleted file mode 100644 index 32a74d0fc2..0000000000 --- a/src/lib/libssl/test/testss.com +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | $! TESTSS.COM | ||
| 2 | $ | ||
| 3 | $ __arch = "VAX" | ||
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | ||
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | ||
| 6 | $ if __arch .eqs. "" then __arch = "UNK" | ||
| 7 | $! | ||
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 11 | $ | ||
| 12 | $ digest="-md5" | ||
| 13 | $ reqcmd = "mcr ''exe_dir'openssl req" | ||
| 14 | $ x509cmd = "mcr ''exe_dir'openssl x509 ''digest'" | ||
| 15 | $ verifycmd = "mcr ''exe_dir'openssl verify" | ||
| 16 | $ dummycnf = "sys$disk:[-.apps]openssl-vms.cnf" | ||
| 17 | $ | ||
| 18 | $ CAkey="""keyCA.ss""" | ||
| 19 | $ CAcert="""certCA.ss""" | ||
| 20 | $ CAreq="""reqCA.ss""" | ||
| 21 | $ CAconf="""CAss.cnf""" | ||
| 22 | $ CAreq2="""req2CA.ss""" ! temp | ||
| 23 | $ | ||
| 24 | $ Uconf="""Uss.cnf""" | ||
| 25 | $ Ukey="""keyU.ss""" | ||
| 26 | $ Ureq="""reqU.ss""" | ||
| 27 | $ Ucert="""certU.ss""" | ||
| 28 | $ | ||
| 29 | $ write sys$output "" | ||
| 30 | $ write sys$output "make a certificate request using 'req'" | ||
| 31 | $ | ||
| 32 | $ set noon | ||
| 33 | $ define/user sys$output nla0: | ||
| 34 | $ mcr 'exe_dir'openssl no-rsa | ||
| 35 | $ save_severity=$SEVERITY | ||
| 36 | $ set on | ||
| 37 | $ if save_severity | ||
| 38 | $ then | ||
| 39 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" | ||
| 40 | $ else | ||
| 41 | $ req_new="-new" | ||
| 42 | $ endif | ||
| 43 | $ | ||
| 44 | $ 'reqcmd' -config 'CAconf' -out 'CAreq' -keyout 'CAkey' 'req_new' ! -out err.ss | ||
| 45 | $ if $severity .ne. 1 | ||
| 46 | $ then | ||
| 47 | $ write sys$output "error using 'req' to generate a certificate request" | ||
| 48 | $ exit 3 | ||
| 49 | $ endif | ||
| 50 | $ write sys$output "" | ||
| 51 | $ write sys$output "convert the certificate request into a self signed certificate using 'x509'" | ||
| 52 | $ define /user sys$output err.ss | ||
| 53 | $ 'x509cmd' "-CAcreateserial" -in 'CAreq' -days 30 -req -out 'CAcert' -signkey 'CAkey' | ||
| 54 | $ if $severity .ne. 1 | ||
| 55 | $ then | ||
| 56 | $ write sys$output "error using 'x509' to self sign a certificate request" | ||
| 57 | $ exit 3 | ||
| 58 | $ endif | ||
| 59 | $ | ||
| 60 | $ write sys$output "" | ||
| 61 | $ write sys$output "convert a certificate into a certificate request using 'x509'" | ||
| 62 | $ define /user sys$output err.ss | ||
| 63 | $ 'x509cmd' -in 'CAcert' -x509toreq -signkey 'CAkey' -out 'CAreq2' | ||
| 64 | $ if $severity .ne. 1 | ||
| 65 | $ then | ||
| 66 | $ write sys$output "error using 'x509' convert a certificate to a certificate request" | ||
| 67 | $ exit 3 | ||
| 68 | $ endif | ||
| 69 | $ | ||
| 70 | $ 'reqcmd' -config 'dummycnf' -verify -in 'CAreq' -noout | ||
| 71 | $ if $severity .ne. 1 | ||
| 72 | $ then | ||
| 73 | $ write sys$output "first generated request is invalid" | ||
| 74 | $ exit 3 | ||
| 75 | $ endif | ||
| 76 | $ | ||
| 77 | $ 'reqcmd' -config 'dummycnf' -verify -in 'CAreq2' -noout | ||
| 78 | $ if $severity .ne. 1 | ||
| 79 | $ then | ||
| 80 | $ write sys$output "second generated request is invalid" | ||
| 81 | $ exit 3 | ||
| 82 | $ endif | ||
| 83 | $ | ||
| 84 | $ 'verifycmd' "-CAfile" 'CAcert' 'CAcert' | ||
| 85 | $ if $severity .ne. 1 | ||
| 86 | $ then | ||
| 87 | $ write sys$output "first generated cert is invalid" | ||
| 88 | $ exit 3 | ||
| 89 | $ endif | ||
| 90 | $ | ||
| 91 | $ write sys$output "" | ||
| 92 | $ write sys$output "make another certificate request using 'req'" | ||
| 93 | $ define /user sys$output err.ss | ||
| 94 | $ 'reqcmd' -config 'Uconf' -out 'Ureq' -keyout 'Ukey' 'req_new' | ||
| 95 | $ if $severity .ne. 1 | ||
| 96 | $ then | ||
| 97 | $ write sys$output "error using 'req' to generate a certificate request" | ||
| 98 | $ exit 3 | ||
| 99 | $ endif | ||
| 100 | $ | ||
| 101 | $ write sys$output "" | ||
| 102 | $ write sys$output "sign certificate request with the just created CA via 'x509'" | ||
| 103 | $ define /user sys$output err.ss | ||
| 104 | $ 'x509cmd' "-CAcreateserial" -in 'Ureq' -days 30 -req -out 'Ucert' "-CA" 'CAcert' "-CAkey" 'CAkey' | ||
| 105 | $ if $severity .ne. 1 | ||
| 106 | $ then | ||
| 107 | $ write sys$output "error using 'x509' to sign a certificate request" | ||
| 108 | $ exit 3 | ||
| 109 | $ endif | ||
| 110 | $ | ||
| 111 | $ 'verifycmd' "-CAfile" 'CAcert' 'Ucert' | ||
| 112 | $ write sys$output "" | ||
| 113 | $ write sys$output "Certificate details" | ||
| 114 | $ 'x509cmd' -subject -issuer -startdate -enddate -noout -in 'Ucert' | ||
| 115 | $ | ||
| 116 | $ write sys$output "" | ||
| 117 | $ write sys$output "The generated CA certificate is ",CAcert | ||
| 118 | $ write sys$output "The generated CA private key is ",CAkey | ||
| 119 | $ | ||
| 120 | $ write sys$output "The generated user certificate is ",Ucert | ||
| 121 | $ write sys$output "The generated user private key is ",Ukey | ||
| 122 | $ | ||
| 123 | $ if f$search("err.ss;*") .nes. "" then delete err.ss;* | ||
diff --git a/src/lib/libssl/test/testssl b/src/lib/libssl/test/testssl deleted file mode 100644 index b55364ae88..0000000000 --- a/src/lib/libssl/test/testssl +++ /dev/null | |||
| @@ -1,151 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 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="../util/shlib_wrap.sh ./ssltest -key $key -cert $cert -c_key $key -c_cert $cert" | ||
| 14 | |||
| 15 | if ../util/shlib_wrap.sh ../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 | |||
| 35 | echo test sslv2 | ||
| 36 | $ssltest -ssl2 $extra || exit 1 | ||
| 37 | |||
| 38 | echo test sslv2 with server authentication | ||
| 39 | $ssltest -ssl2 -server_auth $CA $extra || exit 1 | ||
| 40 | |||
| 41 | if [ $dsa_cert = NO ]; then | ||
| 42 | echo test sslv2 with client authentication | ||
| 43 | $ssltest -ssl2 -client_auth $CA $extra || exit 1 | ||
| 44 | |||
| 45 | echo test sslv2 with both client and server authentication | ||
| 46 | $ssltest -ssl2 -server_auth -client_auth $CA $extra || exit 1 | ||
| 47 | fi | ||
| 48 | |||
| 49 | echo test sslv3 | ||
| 50 | $ssltest -ssl3 $extra || exit 1 | ||
| 51 | |||
| 52 | echo test sslv3 with server authentication | ||
| 53 | $ssltest -ssl3 -server_auth $CA $extra || exit 1 | ||
| 54 | |||
| 55 | echo test sslv3 with client authentication | ||
| 56 | $ssltest -ssl3 -client_auth $CA $extra || exit 1 | ||
| 57 | |||
| 58 | echo test sslv3 with both client and server authentication | ||
| 59 | $ssltest -ssl3 -server_auth -client_auth $CA $extra || exit 1 | ||
| 60 | |||
| 61 | echo test sslv2/sslv3 | ||
| 62 | $ssltest $extra || exit 1 | ||
| 63 | |||
| 64 | echo test sslv2/sslv3 with server authentication | ||
| 65 | $ssltest -server_auth $CA $extra || exit 1 | ||
| 66 | |||
| 67 | echo test sslv2/sslv3 with client authentication | ||
| 68 | $ssltest -client_auth $CA $extra || exit 1 | ||
| 69 | |||
| 70 | echo test sslv2/sslv3 with both client and server authentication | ||
| 71 | $ssltest -server_auth -client_auth $CA $extra || exit 1 | ||
| 72 | |||
| 73 | echo test sslv2 via BIO pair | ||
| 74 | $ssltest -bio_pair -ssl2 $extra || exit 1 | ||
| 75 | |||
| 76 | echo test sslv2 with server authentication via BIO pair | ||
| 77 | $ssltest -bio_pair -ssl2 -server_auth $CA $extra || exit 1 | ||
| 78 | |||
| 79 | if [ $dsa_cert = NO ]; then | ||
| 80 | echo test sslv2 with client authentication via BIO pair | ||
| 81 | $ssltest -bio_pair -ssl2 -client_auth $CA $extra || exit 1 | ||
| 82 | |||
| 83 | echo test sslv2 with both client and server authentication via BIO pair | ||
| 84 | $ssltest -bio_pair -ssl2 -server_auth -client_auth $CA $extra || exit 1 | ||
| 85 | fi | ||
| 86 | |||
| 87 | echo test sslv3 via BIO pair | ||
| 88 | $ssltest -bio_pair -ssl3 $extra || exit 1 | ||
| 89 | |||
| 90 | echo test sslv3 with server authentication via BIO pair | ||
| 91 | $ssltest -bio_pair -ssl3 -server_auth $CA $extra || exit 1 | ||
| 92 | |||
| 93 | echo test sslv3 with client authentication via BIO pair | ||
| 94 | $ssltest -bio_pair -ssl3 -client_auth $CA $extra || exit 1 | ||
| 95 | |||
| 96 | echo test sslv3 with both client and server authentication via BIO pair | ||
| 97 | $ssltest -bio_pair -ssl3 -server_auth -client_auth $CA $extra || exit 1 | ||
| 98 | |||
| 99 | echo test sslv2/sslv3 via BIO pair | ||
| 100 | $ssltest $extra || exit 1 | ||
| 101 | |||
| 102 | if [ $dsa_cert = NO ]; then | ||
| 103 | echo 'test sslv2/sslv3 w/o (EC)DHE via BIO pair' | ||
| 104 | $ssltest -bio_pair -no_dhe -no_ecdhe $extra || exit 1 | ||
| 105 | fi | ||
| 106 | |||
| 107 | echo test sslv2/sslv3 with 1024bit DHE via BIO pair | ||
| 108 | $ssltest -bio_pair -dhe1024dsa -v $extra || exit 1 | ||
| 109 | |||
| 110 | echo test sslv2/sslv3 with server authentication | ||
| 111 | $ssltest -bio_pair -server_auth $CA $extra || exit 1 | ||
| 112 | |||
| 113 | echo test sslv2/sslv3 with client authentication via BIO pair | ||
| 114 | $ssltest -bio_pair -client_auth $CA $extra || exit 1 | ||
| 115 | |||
| 116 | echo test sslv2/sslv3 with both client and server authentication via BIO pair | ||
| 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 | if ../util/shlib_wrap.sh ../apps/openssl no-dh; then | ||
| 125 | echo skipping anonymous DH tests | ||
| 126 | else | ||
| 127 | echo test tls1 with 1024bit anonymous DH, multiple handshakes | ||
| 128 | $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1 | ||
| 129 | fi | ||
| 130 | |||
| 131 | if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then | ||
| 132 | echo skipping RSA tests | ||
| 133 | else | ||
| 134 | echo 'test tls1 with 1024bit RSA, no (EC)DHE, multiple handshakes' | ||
| 135 | ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -no_ecdhe -num 10 -f -time $extra || exit 1 | ||
| 136 | |||
| 137 | if ../util/shlib_wrap.sh ../apps/openssl no-dh; then | ||
| 138 | echo skipping RSA+DHE tests | ||
| 139 | else | ||
| 140 | echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes | ||
| 141 | ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 | ||
| 142 | fi | ||
| 143 | fi | ||
| 144 | |||
| 145 | echo test tls1 with PSK | ||
| 146 | $ssltest -tls1 -cipher PSK -psk abc123 $extra || exit 1 | ||
| 147 | |||
| 148 | echo test tls1 with PSK via BIO pair | ||
| 149 | $ssltest -bio_pair -tls1 -cipher PSK -psk abc123 $extra || exit 1 | ||
| 150 | |||
| 151 | exit 0 | ||
diff --git a/src/lib/libssl/test/testssl.com b/src/lib/libssl/test/testssl.com deleted file mode 100644 index f19edc4719..0000000000 --- a/src/lib/libssl/test/testssl.com +++ /dev/null | |||
| @@ -1,208 +0,0 @@ | |||
| 1 | $! TESTSSL.COM | ||
| 2 | $ | ||
| 3 | $ __arch = "VAX" | ||
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | ||
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | ||
| 6 | $ if __arch .eqs. "" then __arch = "UNK" | ||
| 7 | $! | ||
| 8 | $ if (p4 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ texe_dir = "sys$disk:[-.''__arch'.exe.test]" | ||
| 11 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 12 | $ | ||
| 13 | $ if p1 .eqs. "" | ||
| 14 | $ then | ||
| 15 | $ key="[-.apps]server.pem" | ||
| 16 | $ else | ||
| 17 | $ key=p1 | ||
| 18 | $ endif | ||
| 19 | $ if p2 .eqs. "" | ||
| 20 | $ then | ||
| 21 | $ cert="[-.apps]server.pem" | ||
| 22 | $ else | ||
| 23 | $ cert=p2 | ||
| 24 | $ endif | ||
| 25 | $ ssltest = "mcr ''texe_dir'ssltest -key ''key'"+ - | ||
| 26 | " -cert ''cert' -c_key ''key' -c_cert ''cert'" | ||
| 27 | $! | ||
| 28 | $ set noon | ||
| 29 | $ define/user sys$output testssl-x509-output. | ||
| 30 | $ define/user sys$error nla0: | ||
| 31 | $ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout | ||
| 32 | $ define/user sys$error nla0: | ||
| 33 | $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact | ||
| 34 | $ if $severity .eq. 1 | ||
| 35 | $ then | ||
| 36 | $ dsa_cert = "YES" | ||
| 37 | $ else | ||
| 38 | $ dsa_cert = "NO" | ||
| 39 | $ endif | ||
| 40 | $ delete testssl-x509-output.;* | ||
| 41 | $ | ||
| 42 | $ if p3 .eqs. "" | ||
| 43 | $ then | ||
| 44 | $ copy/concatenate [-.certs]*.pem certs.tmp | ||
| 45 | $ CA = """-CAfile"" certs.tmp" | ||
| 46 | $ else | ||
| 47 | $ CA = """-CAfile"" "+p3 | ||
| 48 | $ endif | ||
| 49 | $ | ||
| 50 | $!########################################################################### | ||
| 51 | $ | ||
| 52 | $ write sys$output "test sslv2" | ||
| 53 | $ 'ssltest' -ssl2 | ||
| 54 | $ if $severity .ne. 1 then goto exit3 | ||
| 55 | $ | ||
| 56 | $ write sys$output "test sslv2 with server authentication" | ||
| 57 | $ 'ssltest' -ssl2 -server_auth 'CA' | ||
| 58 | $ if $severity .ne. 1 then goto exit3 | ||
| 59 | $ | ||
| 60 | $ if .not. dsa_cert | ||
| 61 | $ then | ||
| 62 | $ write sys$output "test sslv2 with client authentication" | ||
| 63 | $ 'ssltest' -ssl2 -client_auth 'CA' | ||
| 64 | $ if $severity .ne. 1 then goto exit3 | ||
| 65 | $ | ||
| 66 | $ write sys$output "test sslv2 with both client and server authentication" | ||
| 67 | $ 'ssltest' -ssl2 -server_auth -client_auth 'CA' | ||
| 68 | $ if $severity .ne. 1 then goto exit3 | ||
| 69 | $ endif | ||
| 70 | $ | ||
| 71 | $ write sys$output "test sslv3" | ||
| 72 | $ 'ssltest' -ssl3 | ||
| 73 | $ if $severity .ne. 1 then goto exit3 | ||
| 74 | $ | ||
| 75 | $ write sys$output "test sslv3 with server authentication" | ||
| 76 | $ 'ssltest' -ssl3 -server_auth 'CA' | ||
| 77 | $ if $severity .ne. 1 then goto exit3 | ||
| 78 | $ | ||
| 79 | $ write sys$output "test sslv3 with client authentication" | ||
| 80 | $ 'ssltest' -ssl3 -client_auth 'CA' | ||
| 81 | $ if $severity .ne. 1 then goto exit3 | ||
| 82 | $ | ||
| 83 | $ write sys$output "test sslv3 with both client and server authentication" | ||
| 84 | $ 'ssltest' -ssl3 -server_auth -client_auth 'CA' | ||
| 85 | $ if $severity .ne. 1 then goto exit3 | ||
| 86 | $ | ||
| 87 | $ write sys$output "test sslv2/sslv3" | ||
| 88 | $ 'ssltest' | ||
| 89 | $ if $severity .ne. 1 then goto exit3 | ||
| 90 | $ | ||
| 91 | $ write sys$output "test sslv2/sslv3 with server authentication" | ||
| 92 | $ 'ssltest' -server_auth 'CA' | ||
| 93 | $ if $severity .ne. 1 then goto exit3 | ||
| 94 | $ | ||
| 95 | $ write sys$output "test sslv2/sslv3 with client authentication" | ||
| 96 | $ 'ssltest' -client_auth 'CA' | ||
| 97 | $ if $severity .ne. 1 then goto exit3 | ||
| 98 | $ | ||
| 99 | $ write sys$output "test sslv2/sslv3 with both client and server authentication" | ||
| 100 | $ 'ssltest' -server_auth -client_auth 'CA' | ||
| 101 | $ if $severity .ne. 1 then goto exit3 | ||
| 102 | $ | ||
| 103 | $ write sys$output "test sslv2 via BIO pair" | ||
| 104 | $ 'ssltest' -bio_pair -ssl2 | ||
| 105 | $ if $severity .ne. 1 then goto exit3 | ||
| 106 | $ | ||
| 107 | $ write sys$output "test sslv2 with server authentication via BIO pair" | ||
| 108 | $ 'ssltest' -bio_pair -ssl2 -server_auth 'CA' | ||
| 109 | $ if $severity .ne. 1 then goto exit3 | ||
| 110 | $ | ||
| 111 | $ if .not. dsa_cert | ||
| 112 | $ then | ||
| 113 | $ write sys$output "test sslv2 with client authentication via BIO pair" | ||
| 114 | $ 'ssltest' -bio_pair -ssl2 -client_auth 'CA' | ||
| 115 | $ if $severity .ne. 1 then goto exit3 | ||
| 116 | $ | ||
| 117 | $ write sys$output "test sslv2 with both client and server authentication via BIO pair" | ||
| 118 | $ 'ssltest' -bio_pair -ssl2 -server_auth -client_auth 'CA' | ||
| 119 | $ if $severity .ne. 1 then goto exit3 | ||
| 120 | $ endif | ||
| 121 | $ | ||
| 122 | $ write sys$output "test sslv3 via BIO pair" | ||
| 123 | $ 'ssltest' -bio_pair -ssl3 | ||
| 124 | $ if $severity .ne. 1 then goto exit3 | ||
| 125 | $ | ||
| 126 | $ write sys$output "test sslv3 with server authentication via BIO pair" | ||
| 127 | $ 'ssltest' -bio_pair -ssl3 -server_auth 'CA' | ||
| 128 | $ if $severity .ne. 1 then goto exit3 | ||
| 129 | $ | ||
| 130 | $ write sys$output "test sslv3 with client authentication via BIO pair" | ||
| 131 | $ 'ssltest' -bio_pair -ssl3 -client_auth 'CA' | ||
| 132 | $ if $severity .ne. 1 then goto exit3 | ||
| 133 | |||
| 134 | $ write sys$output "test sslv3 with both client and server authentication via BIO pair" | ||
| 135 | $ 'ssltest' -bio_pair -ssl3 -server_auth -client_auth 'CA' | ||
| 136 | $ if $severity .ne. 1 then goto exit3 | ||
| 137 | $ | ||
| 138 | $ write sys$output "test sslv2/sslv3 via BIO pair" | ||
| 139 | $ 'ssltest' | ||
| 140 | $ if $severity .ne. 1 then goto exit3 | ||
| 141 | $ | ||
| 142 | $ if .not. dsa_cert | ||
| 143 | $ then | ||
| 144 | $ write sys$output "test sslv2/sslv3 w/o DHE via BIO pair" | ||
| 145 | $ 'ssltest' -bio_pair -no_dhe | ||
| 146 | $ if $severity .ne. 1 then goto exit3 | ||
| 147 | $ endif | ||
| 148 | $ | ||
| 149 | $ write sys$output "test sslv2/sslv3 with 1024 bit DHE via BIO pair" | ||
| 150 | $ 'ssltest' -bio_pair -dhe1024dsa -v | ||
| 151 | $ if $severity .ne. 1 then goto exit3 | ||
| 152 | $ | ||
| 153 | $ write sys$output "test sslv2/sslv3 with server authentication" | ||
| 154 | $ 'ssltest' -bio_pair -server_auth 'CA' | ||
| 155 | $ if $severity .ne. 1 then goto exit3 | ||
| 156 | $ | ||
| 157 | $ write sys$output "test sslv2/sslv3 with client authentication via BIO pair" | ||
| 158 | $ 'ssltest' -bio_pair -client_auth 'CA' | ||
| 159 | $ if $severity .ne. 1 then goto exit3 | ||
| 160 | $ | ||
| 161 | $ write sys$output "test sslv2/sslv3 with both client and server authentication via BIO pair" | ||
| 162 | $ 'ssltest' -bio_pair -server_auth -client_auth 'CA' | ||
| 163 | $ if $severity .ne. 1 then goto exit3 | ||
| 164 | $ | ||
| 165 | $!########################################################################### | ||
| 166 | $ | ||
| 167 | $ define/user sys$output nla0: | ||
| 168 | $ mcr 'exe_dir'openssl no-rsa | ||
| 169 | $ no_rsa=$SEVERITY | ||
| 170 | $ define/user sys$output nla0: | ||
| 171 | $ mcr 'exe_dir'openssl no-dh | ||
| 172 | $ no_dh=$SEVERITY | ||
| 173 | $ | ||
| 174 | $ if no_dh | ||
| 175 | $ then | ||
| 176 | $ write sys$output "skipping anonymous DH tests" | ||
| 177 | $ else | ||
| 178 | $ write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes" | ||
| 179 | $ 'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time | ||
| 180 | $ if $severity .ne. 1 then goto exit3 | ||
| 181 | $ endif | ||
| 182 | $ | ||
| 183 | $ if no_rsa | ||
| 184 | $ then | ||
| 185 | $ write sys$output "skipping RSA tests" | ||
| 186 | $ else | ||
| 187 | $ write sys$output "test tls1 with 1024bit RSA, no DHE, multiple handshakes" | ||
| 188 | $ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -no_dhe -num 10 -f -time | ||
| 189 | $ if $severity .ne. 1 then goto exit3 | ||
| 190 | $ | ||
| 191 | $ if no_dh | ||
| 192 | $ then | ||
| 193 | $ write sys$output "skipping RSA+DHE tests" | ||
| 194 | $ else | ||
| 195 | $ write sys$output "test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes" | ||
| 196 | $ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -dhe1024dsa -num 10 -f -time | ||
| 197 | $ if $severity .ne. 1 then goto exit3 | ||
| 198 | $ endif | ||
| 199 | $ endif | ||
| 200 | $ | ||
| 201 | $ RET = 1 | ||
| 202 | $ goto exit | ||
| 203 | $ exit3: | ||
| 204 | $ RET = 3 | ||
| 205 | $ exit: | ||
| 206 | $ if p3 .eqs. "" then delete certs.tmp;* | ||
| 207 | $ set on | ||
| 208 | $ exit 'RET' | ||
diff --git a/src/lib/libssl/test/testsslproxy b/src/lib/libssl/test/testsslproxy deleted file mode 100644 index 58bbda8ab7..0000000000 --- a/src/lib/libssl/test/testsslproxy +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | |||
| 3 | echo 'Testing a lot of proxy conditions.' | ||
| 4 | echo 'Some of them may turn out being invalid, which is fine.' | ||
| 5 | for auth in A B C BC; do | ||
| 6 | for cond in A B C 'A|B&!C'; do | ||
| 7 | sh ./testssl $1 $2 $3 "-proxy -proxy_auth $auth -proxy_cond $cond" | ||
| 8 | if [ $? = 3 ]; then exit 1; fi | ||
| 9 | done | ||
| 10 | done | ||
