diff options
author | djm <> | 2005-04-29 05:37:34 +0000 |
---|---|---|
committer | djm <> | 2005-04-29 05:37:34 +0000 |
commit | a95585a25ab25668b931a78b7543f707a3354db8 (patch) | |
tree | f9e9febf7ac0c8f5d6df761fe70fd613aac06203 /src/lib/libssl/test | |
parent | 58c08aa241f168c84ce7cc3052454ea59a44eada (diff) | |
download | openbsd-a95585a25ab25668b931a78b7543f707a3354db8.tar.gz openbsd-a95585a25ab25668b931a78b7543f707a3354db8.tar.bz2 openbsd-a95585a25ab25668b931a78b7543f707a3354db8.zip |
import of openssl-0.9.7g; tested on platforms from alpha to zaurus, ok deraadt@
Diffstat (limited to 'src/lib/libssl/test')
-rw-r--r-- | src/lib/libssl/test/CAss.cnf | 8 | ||||
-rw-r--r-- | src/lib/libssl/test/P1ss.cnf | 37 | ||||
-rw-r--r-- | src/lib/libssl/test/P2ss.cnf | 45 | ||||
-rw-r--r-- | src/lib/libssl/test/Uss.cnf | 8 | ||||
-rw-r--r-- | src/lib/libssl/test/bctest | 2 | ||||
-rw-r--r-- | src/lib/libssl/test/tcrl | 2 | ||||
-rw-r--r-- | src/lib/libssl/test/testca | 3 | ||||
-rw-r--r-- | src/lib/libssl/test/testenc | 20 | ||||
-rw-r--r-- | src/lib/libssl/test/testgen | 6 | ||||
-rw-r--r-- | src/lib/libssl/test/testss | 86 | ||||
-rw-r--r-- | src/lib/libssl/test/testssl | 14 | ||||
-rw-r--r-- | src/lib/libssl/test/testsslproxy | 10 | ||||
-rw-r--r-- | src/lib/libssl/test/tpkcs7 | 2 | ||||
-rw-r--r-- | src/lib/libssl/test/tpkcs7d | 2 | ||||
-rw-r--r-- | src/lib/libssl/test/treq | 2 | ||||
-rw-r--r-- | src/lib/libssl/test/trsa | 4 | ||||
-rw-r--r-- | src/lib/libssl/test/tsid | 2 | ||||
-rw-r--r-- | src/lib/libssl/test/tx509 | 2 |
18 files changed, 215 insertions, 40 deletions
diff --git a/src/lib/libssl/test/CAss.cnf b/src/lib/libssl/test/CAss.cnf index b941b7ae15..21da59a73a 100644 --- a/src/lib/libssl/test/CAss.cnf +++ b/src/lib/libssl/test/CAss.cnf | |||
@@ -23,3 +23,11 @@ organizationName_value = Dodgy Brothers | |||
23 | 23 | ||
24 | commonName = Common Name (eg, YOUR name) | 24 | commonName = Common Name (eg, YOUR name) |
25 | commonName_value = Dodgy CA | 25 | commonName_value = Dodgy CA |
26 | |||
27 | [ v3_ca ] | ||
28 | subjectKeyIdentifier=hash | ||
29 | authorityKeyIdentifier=keyid:always,issuer:always | ||
30 | basicConstraints = CA:true,pathlen:1 | ||
31 | keyUsage = cRLSign, keyCertSign | ||
32 | issuerAltName=issuer:copy | ||
33 | |||
diff --git a/src/lib/libssl/test/P1ss.cnf b/src/lib/libssl/test/P1ss.cnf new file mode 100644 index 0000000000..876a0d35f8 --- /dev/null +++ b/src/lib/libssl/test/P1ss.cnf | |||
@@ -0,0 +1,37 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | |||
6 | RANDFILE = ./.rnd | ||
7 | |||
8 | #################################################################### | ||
9 | [ req ] | ||
10 | default_bits = 512 | ||
11 | default_keyfile = keySS.pem | ||
12 | distinguished_name = req_distinguished_name | ||
13 | encrypt_rsa_key = no | ||
14 | default_md = md2 | ||
15 | |||
16 | [ req_distinguished_name ] | ||
17 | countryName = Country Name (2 letter code) | ||
18 | countryName_default = AU | ||
19 | countryName_value = AU | ||
20 | |||
21 | organizationName = Organization Name (eg, company) | ||
22 | organizationName_value = Dodgy Brothers | ||
23 | |||
24 | 0.commonName = Common Name (eg, YOUR name) | ||
25 | 0.commonName_value = Brother 1 | ||
26 | |||
27 | 1.commonName = Common Name (eg, YOUR name) | ||
28 | 1.commonName_value = Brother 2 | ||
29 | |||
30 | 2.commonName = Common Name (eg, YOUR name) | ||
31 | 2.commonName_value = Proxy 1 | ||
32 | |||
33 | [ v3_proxy ] | ||
34 | basicConstraints=CA:FALSE | ||
35 | subjectKeyIdentifier=hash | ||
36 | authorityKeyIdentifier=keyid,issuer:always | ||
37 | proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:1,policy:text:AB | ||
diff --git a/src/lib/libssl/test/P2ss.cnf b/src/lib/libssl/test/P2ss.cnf new file mode 100644 index 0000000000..373a87e7c2 --- /dev/null +++ b/src/lib/libssl/test/P2ss.cnf | |||
@@ -0,0 +1,45 @@ | |||
1 | # | ||
2 | # SSLeay example configuration file. | ||
3 | # This is mostly being used for generation of certificate requests. | ||
4 | # | ||
5 | |||
6 | RANDFILE = ./.rnd | ||
7 | |||
8 | #################################################################### | ||
9 | [ req ] | ||
10 | default_bits = 512 | ||
11 | default_keyfile = keySS.pem | ||
12 | distinguished_name = req_distinguished_name | ||
13 | encrypt_rsa_key = no | ||
14 | default_md = md2 | ||
15 | |||
16 | [ req_distinguished_name ] | ||
17 | countryName = Country Name (2 letter code) | ||
18 | countryName_default = AU | ||
19 | countryName_value = AU | ||
20 | |||
21 | organizationName = Organization Name (eg, company) | ||
22 | organizationName_value = Dodgy Brothers | ||
23 | |||
24 | 0.commonName = Common Name (eg, YOUR name) | ||
25 | 0.commonName_value = Brother 1 | ||
26 | |||
27 | 1.commonName = Common Name (eg, YOUR name) | ||
28 | 1.commonName_value = Brother 2 | ||
29 | |||
30 | 2.commonName = Common Name (eg, YOUR name) | ||
31 | 2.commonName_value = Proxy 1 | ||
32 | |||
33 | 3.commonName = Common Name (eg, YOUR name) | ||
34 | 3.commonName_value = Proxy 2 | ||
35 | |||
36 | [ v3_proxy ] | ||
37 | basicConstraints=CA:FALSE | ||
38 | subjectKeyIdentifier=hash | ||
39 | authorityKeyIdentifier=keyid,issuer:always | ||
40 | proxyCertInfo=critical,@proxy_ext | ||
41 | |||
42 | [ proxy_ext ] | ||
43 | language=id-ppl-anyLanguage | ||
44 | pathlen=0 | ||
45 | policy=text:BC | ||
diff --git a/src/lib/libssl/test/Uss.cnf b/src/lib/libssl/test/Uss.cnf index c89692d519..0c0ebb5f67 100644 --- a/src/lib/libssl/test/Uss.cnf +++ b/src/lib/libssl/test/Uss.cnf | |||
@@ -26,3 +26,11 @@ organizationName_value = Dodgy Brothers | |||
26 | 26 | ||
27 | 1.commonName = Common Name (eg, YOUR name) | 27 | 1.commonName = Common Name (eg, YOUR name) |
28 | 1.commonName_value = Brother 2 | 28 | 1.commonName_value = Brother 2 |
29 | |||
30 | [ v3_ee ] | ||
31 | subjectKeyIdentifier=hash | ||
32 | authorityKeyIdentifier=keyid,issuer:always | ||
33 | basicConstraints = CA:false | ||
34 | keyUsage = nonRepudiation, digitalSignature, keyEncipherment | ||
35 | issuerAltName=issuer:copy | ||
36 | |||
diff --git a/src/lib/libssl/test/bctest b/src/lib/libssl/test/bctest index bdb3218f7a..e81fc0733a 100644 --- a/src/lib/libssl/test/bctest +++ b/src/lib/libssl/test/bctest | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | # This script is used by test/Makefile.ssl to check whether a sane 'bc' | 3 | # This script is used by test/Makefile to check whether a sane 'bc' |
4 | # is installed. | 4 | # is installed. |
5 | # ('make test_bn' should not try to run 'bc' if it does not exist or if | 5 | # ('make test_bn' should not try to run 'bc' if it does not exist or if |
6 | # it is a broken 'bc' version that is known to cause trouble.) | 6 | # it is a broken 'bc' version that is known to cause trouble.) |
diff --git a/src/lib/libssl/test/tcrl b/src/lib/libssl/test/tcrl index f71ef7a863..3ffed12a03 100644 --- a/src/lib/libssl/test/tcrl +++ b/src/lib/libssl/test/tcrl | |||
@@ -7,7 +7,7 @@ else | |||
7 | fi | 7 | fi |
8 | export PATH | 8 | export PATH |
9 | 9 | ||
10 | cmd='../apps/openssl crl' | 10 | cmd='../util/shlib_wrap.sh ../apps/openssl crl' |
11 | 11 | ||
12 | if [ "$1"x != "x" ]; then | 12 | if [ "$1"x != "x" ]; then |
13 | t=$1 | 13 | t=$1 |
diff --git a/src/lib/libssl/test/testca b/src/lib/libssl/test/testca index 8215ebb5d1..5b2faa78f1 100644 --- a/src/lib/libssl/test/testca +++ b/src/lib/libssl/test/testca | |||
@@ -11,6 +11,9 @@ export SH PATH | |||
11 | SSLEAY_CONFIG="-config CAss.cnf" | 11 | SSLEAY_CONFIG="-config CAss.cnf" |
12 | export SSLEAY_CONFIG | 12 | export SSLEAY_CONFIG |
13 | 13 | ||
14 | OPENSSL="`pwd`/../util/shlib_wrap.sh openssl" | ||
15 | export OPENSSL | ||
16 | |||
14 | /bin/rm -fr demoCA | 17 | /bin/rm -fr demoCA |
15 | $SH ../apps/CA.sh -newca <<EOF | 18 | $SH ../apps/CA.sh -newca <<EOF |
16 | EOF | 19 | EOF |
diff --git a/src/lib/libssl/test/testenc b/src/lib/libssl/test/testenc index 0656c7f525..4571ea2875 100644 --- a/src/lib/libssl/test/testenc +++ b/src/lib/libssl/test/testenc | |||
@@ -1,14 +1,14 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | testsrc=Makefile.ssl | 3 | testsrc=Makefile |
4 | test=./p | 4 | test=./p |
5 | cmd=../apps/openssl | 5 | cmd="../util/shlib_wrap.sh ../apps/openssl" |
6 | 6 | ||
7 | cat $testsrc >$test; | 7 | cat $testsrc >$test; |
8 | 8 | ||
9 | echo cat | 9 | echo cat |
10 | $cmd enc < $test > $test.cipher | 10 | $cmd enc -non-fips-allow < $test > $test.cipher |
11 | $cmd enc < $test.cipher >$test.clear | 11 | $cmd enc -non-fips-allow < $test.cipher >$test.clear |
12 | cmp $test $test.clear | 12 | cmp $test $test.clear |
13 | if [ $? != 0 ] | 13 | if [ $? != 0 ] |
14 | then | 14 | then |
@@ -17,8 +17,8 @@ else | |||
17 | /bin/rm $test.cipher $test.clear | 17 | /bin/rm $test.cipher $test.clear |
18 | fi | 18 | fi |
19 | echo base64 | 19 | echo base64 |
20 | $cmd enc -a -e < $test > $test.cipher | 20 | $cmd enc -non-fips-allow -a -e < $test > $test.cipher |
21 | $cmd enc -a -d < $test.cipher >$test.clear | 21 | $cmd enc -non-fips-allow -a -d < $test.cipher >$test.clear |
22 | cmp $test $test.clear | 22 | cmp $test $test.clear |
23 | if [ $? != 0 ] | 23 | if [ $? != 0 ] |
24 | then | 24 | then |
@@ -30,8 +30,8 @@ fi | |||
30 | for i in `$cmd list-cipher-commands` | 30 | for i in `$cmd list-cipher-commands` |
31 | do | 31 | do |
32 | echo $i | 32 | echo $i |
33 | $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher | 33 | $cmd $i -non-fips-allow -bufsize 113 -e -k test < $test > $test.$i.cipher |
34 | $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear | 34 | $cmd $i -non-fips-allow -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear |
35 | cmp $test $test.$i.clear | 35 | cmp $test $test.$i.clear |
36 | if [ $? != 0 ] | 36 | if [ $? != 0 ] |
37 | then | 37 | then |
@@ -41,8 +41,8 @@ do | |||
41 | fi | 41 | fi |
42 | 42 | ||
43 | echo $i base64 | 43 | echo $i base64 |
44 | $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher | 44 | $cmd $i -non-fips-allow -bufsize 113 -a -e -k test < $test > $test.$i.cipher |
45 | $cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear | 45 | $cmd $i -non-fips-allow -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear |
46 | cmp $test $test.$i.clear | 46 | cmp $test $test.$i.clear |
47 | if [ $? != 0 ] | 47 | if [ $? != 0 ] |
48 | then | 48 | then |
diff --git a/src/lib/libssl/test/testgen b/src/lib/libssl/test/testgen index 3798543e04..524c0d134c 100644 --- a/src/lib/libssl/test/testgen +++ b/src/lib/libssl/test/testgen | |||
@@ -17,7 +17,7 @@ echo "generating certificate request" | |||
17 | 17 | ||
18 | echo "string to make the random number generator think it has entropy" >> ./.rnd | 18 | echo "string to make the random number generator think it has entropy" >> ./.rnd |
19 | 19 | ||
20 | if ../apps/openssl no-rsa; then | 20 | if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then |
21 | req_new='-newkey dsa:../apps/dsa512.pem' | 21 | req_new='-newkey dsa:../apps/dsa512.pem' |
22 | else | 22 | else |
23 | req_new='-new' | 23 | req_new='-new' |
@@ -29,13 +29,13 @@ echo "This could take some time." | |||
29 | 29 | ||
30 | rm -f testkey.pem testreq.pem | 30 | rm -f testkey.pem testreq.pem |
31 | 31 | ||
32 | ../apps/openssl req -config test.cnf $req_new -out testreq.pem | 32 | ../util/shlib_wrap.sh ../apps/openssl req -config test.cnf $req_new -out testreq.pem |
33 | if [ $? != 0 ]; then | 33 | if [ $? != 0 ]; then |
34 | echo problems creating request | 34 | echo problems creating request |
35 | exit 1 | 35 | exit 1 |
36 | fi | 36 | fi |
37 | 37 | ||
38 | ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout | 38 | ../util/shlib_wrap.sh ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout |
39 | if [ $? != 0 ]; then | 39 | if [ $? != 0 ]; then |
40 | echo signature on req is wrong | 40 | echo signature on req is wrong |
41 | exit 1 | 41 | exit 1 |
diff --git a/src/lib/libssl/test/testss b/src/lib/libssl/test/testss index 8d3557f356..1a426857d3 100644 --- a/src/lib/libssl/test/testss +++ b/src/lib/libssl/test/testss | |||
@@ -1,9 +1,9 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | digest='-md5' | 3 | digest='-sha1' |
4 | reqcmd="../apps/openssl req" | 4 | reqcmd="../util/shlib_wrap.sh ../apps/openssl req" |
5 | x509cmd="../apps/openssl x509 $digest" | 5 | x509cmd="../util/shlib_wrap.sh ../apps/openssl x509 $digest" |
6 | verifycmd="../apps/openssl verify" | 6 | verifycmd="../util/shlib_wrap.sh ../apps/openssl verify" |
7 | dummycnf="../apps/openssl.cnf" | 7 | dummycnf="../apps/openssl.cnf" |
8 | 8 | ||
9 | CAkey="keyCA.ss" | 9 | CAkey="keyCA.ss" |
@@ -17,12 +17,24 @@ Ukey="keyU.ss" | |||
17 | Ureq="reqU.ss" | 17 | Ureq="reqU.ss" |
18 | Ucert="certU.ss" | 18 | Ucert="certU.ss" |
19 | 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 | |||
20 | echo | 32 | echo |
21 | echo "make a certificate request using 'req'" | 33 | echo "make a certificate request using 'req'" |
22 | 34 | ||
23 | echo "string to make the random number generator think it has entropy" >> ./.rnd | 35 | echo "string to make the random number generator think it has entropy" >> ./.rnd |
24 | 36 | ||
25 | if ../apps/openssl no-rsa; then | 37 | if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then |
26 | req_new='-newkey dsa:../apps/dsa512.pem' | 38 | req_new='-newkey dsa:../apps/dsa512.pem' |
27 | else | 39 | else |
28 | req_new='-new' | 40 | req_new='-new' |
@@ -35,7 +47,7 @@ if [ $? != 0 ]; then | |||
35 | fi | 47 | fi |
36 | echo | 48 | echo |
37 | echo "convert the certificate request into a self signed certificate using 'x509'" | 49 | echo "convert the certificate request into a self signed certificate using 'x509'" |
38 | $x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >err.ss | 50 | $x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey -extfile $CAconf -extensions v3_ca >err.ss |
39 | if [ $? != 0 ]; then | 51 | if [ $? != 0 ]; then |
40 | echo "error using 'x509' to self sign a certificate request" | 52 | echo "error using 'x509' to self sign a certificate request" |
41 | exit 1 | 53 | exit 1 |
@@ -68,18 +80,18 @@ if [ $? != 0 ]; then | |||
68 | fi | 80 | fi |
69 | 81 | ||
70 | echo | 82 | echo |
71 | echo "make another certificate request using 'req'" | 83 | echo "make a user certificate request using 'req'" |
72 | $reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss | 84 | $reqcmd -config $Uconf -out $Ureq -keyout $Ukey $req_new >err.ss |
73 | if [ $? != 0 ]; then | 85 | if [ $? != 0 ]; then |
74 | echo "error using 'req' to generate a certificate request" | 86 | echo "error using 'req' to generate a user certificate request" |
75 | exit 1 | 87 | exit 1 |
76 | fi | 88 | fi |
77 | 89 | ||
78 | echo | 90 | echo |
79 | echo "sign certificate request with the just created CA via 'x509'" | 91 | echo "sign user certificate request with the just created CA via 'x509'" |
80 | $x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey >err.ss | 92 | $x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey -extfile $Uconf -extensions v3_ee >err.ss |
81 | if [ $? != 0 ]; then | 93 | if [ $? != 0 ]; then |
82 | echo "error using 'x509' to sign a certificate request" | 94 | echo "error using 'x509' to sign a user certificate request" |
83 | exit 1 | 95 | exit 1 |
84 | fi | 96 | fi |
85 | 97 | ||
@@ -89,11 +101,63 @@ echo "Certificate details" | |||
89 | $x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert | 101 | $x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert |
90 | 102 | ||
91 | echo | 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 | ||
92 | echo The generated CA certificate is $CAcert | 148 | echo The generated CA certificate is $CAcert |
93 | echo The generated CA private key is $CAkey | 149 | echo The generated CA private key is $CAkey |
94 | 150 | ||
95 | echo The generated user certificate is $Ucert | 151 | echo The generated user certificate is $Ucert |
96 | echo The generated user private key is $Ukey | 152 | echo The generated user private key is $Ukey |
97 | 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 | |||
98 | /bin/rm err.ss | 160 | /bin/rm err.ss |
161 | #/bin/rm $P1intermediate | ||
162 | #/bin/rm $P2intermediate | ||
99 | exit 0 | 163 | exit 0 |
diff --git a/src/lib/libssl/test/testssl b/src/lib/libssl/test/testssl index ca8e718022..8ac90ae5ee 100644 --- a/src/lib/libssl/test/testssl +++ b/src/lib/libssl/test/testssl | |||
@@ -10,9 +10,9 @@ if [ "$2" = "" ]; then | |||
10 | else | 10 | else |
11 | cert="$2" | 11 | cert="$2" |
12 | fi | 12 | fi |
13 | ssltest="./ssltest -key $key -cert $cert -c_key $key -c_cert $cert" | 13 | ssltest="../util/shlib_wrap.sh ./ssltest -key $key -cert $cert -c_key $key -c_cert $cert" |
14 | 14 | ||
15 | if ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then | 15 | if ../util/shlib_wrap.sh ../apps/openssl x509 -in $cert -text -noout | fgrep 'DSA Public Key' >/dev/null; then |
16 | dsa_cert=YES | 16 | dsa_cert=YES |
17 | else | 17 | else |
18 | dsa_cert=NO | 18 | dsa_cert=NO |
@@ -121,24 +121,24 @@ $ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1 | |||
121 | 121 | ||
122 | ############################################################################# | 122 | ############################################################################# |
123 | 123 | ||
124 | if ../apps/openssl no-dh; then | 124 | if ../util/shlib_wrap.sh ../apps/openssl no-dh; then |
125 | echo skipping anonymous DH tests | 125 | echo skipping anonymous DH tests |
126 | else | 126 | else |
127 | echo test tls1 with 1024bit anonymous DH, multiple handshakes | 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 | 128 | $ssltest -v -bio_pair -tls1 -cipher ADH -dhe1024dsa -num 10 -f -time $extra || exit 1 |
129 | fi | 129 | fi |
130 | 130 | ||
131 | if ../apps/openssl no-rsa; then | 131 | if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then |
132 | echo skipping RSA tests | 132 | echo skipping RSA tests |
133 | else | 133 | else |
134 | echo test tls1 with 1024bit RSA, no DHE, multiple handshakes | 134 | echo test tls1 with 1024bit RSA, no DHE, multiple handshakes |
135 | ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1 | 135 | ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -no_dhe -num 10 -f -time $extra || exit 1 |
136 | 136 | ||
137 | if ../apps/openssl no-dh; then | 137 | if ../util/shlib_wrap.sh ../apps/openssl no-dh; then |
138 | echo skipping RSA+DHE tests | 138 | echo skipping RSA+DHE tests |
139 | else | 139 | else |
140 | echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes | 140 | echo test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes |
141 | ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 | 141 | ../util/shlib_wrap.sh ./ssltest -v -bio_pair -tls1 -cert ../apps/server2.pem -dhe1024dsa -num 10 -f -time $extra || exit 1 |
142 | fi | 142 | fi |
143 | fi | 143 | fi |
144 | 144 | ||
diff --git a/src/lib/libssl/test/testsslproxy b/src/lib/libssl/test/testsslproxy new file mode 100644 index 0000000000..58bbda8ab7 --- /dev/null +++ b/src/lib/libssl/test/testsslproxy | |||
@@ -0,0 +1,10 @@ | |||
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 | ||
diff --git a/src/lib/libssl/test/tpkcs7 b/src/lib/libssl/test/tpkcs7 index cf3bd9fadb..79bb6e0edf 100644 --- a/src/lib/libssl/test/tpkcs7 +++ b/src/lib/libssl/test/tpkcs7 | |||
@@ -7,7 +7,7 @@ else | |||
7 | fi | 7 | fi |
8 | export PATH | 8 | export PATH |
9 | 9 | ||
10 | cmd='../apps/openssl pkcs7' | 10 | cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7' |
11 | 11 | ||
12 | if [ "$1"x != "x" ]; then | 12 | if [ "$1"x != "x" ]; then |
13 | t=$1 | 13 | t=$1 |
diff --git a/src/lib/libssl/test/tpkcs7d b/src/lib/libssl/test/tpkcs7d index 18f9311b06..20394b34c4 100644 --- a/src/lib/libssl/test/tpkcs7d +++ b/src/lib/libssl/test/tpkcs7d | |||
@@ -7,7 +7,7 @@ else | |||
7 | fi | 7 | fi |
8 | export PATH | 8 | export PATH |
9 | 9 | ||
10 | cmd='../apps/openssl pkcs7' | 10 | cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7' |
11 | 11 | ||
12 | if [ "$1"x != "x" ]; then | 12 | if [ "$1"x != "x" ]; then |
13 | t=$1 | 13 | t=$1 |
diff --git a/src/lib/libssl/test/treq b/src/lib/libssl/test/treq index 47a8273cde..7e020210a5 100644 --- a/src/lib/libssl/test/treq +++ b/src/lib/libssl/test/treq | |||
@@ -7,7 +7,7 @@ else | |||
7 | fi | 7 | fi |
8 | export PATH | 8 | export PATH |
9 | 9 | ||
10 | cmd='../apps/openssl req -config ../apps/openssl.cnf' | 10 | cmd='../util/shlib_wrap.sh ../apps/openssl req -config ../apps/openssl.cnf' |
11 | 11 | ||
12 | if [ "$1"x != "x" ]; then | 12 | if [ "$1"x != "x" ]; then |
13 | t=$1 | 13 | t=$1 |
diff --git a/src/lib/libssl/test/trsa b/src/lib/libssl/test/trsa index 413e2ec0a0..67b4a98841 100644 --- a/src/lib/libssl/test/trsa +++ b/src/lib/libssl/test/trsa | |||
@@ -7,12 +7,12 @@ else | |||
7 | fi | 7 | fi |
8 | export PATH | 8 | export PATH |
9 | 9 | ||
10 | if ../apps/openssl no-rsa; then | 10 | if ../util/shlib_wrap.sh ../apps/openssl no-rsa; then |
11 | echo skipping rsa conversion test | 11 | echo skipping rsa conversion test |
12 | exit 0 | 12 | exit 0 |
13 | fi | 13 | fi |
14 | 14 | ||
15 | cmd='../apps/openssl rsa' | 15 | cmd='../util/shlib_wrap.sh ../apps/openssl rsa' |
16 | 16 | ||
17 | if [ "$1"x != "x" ]; then | 17 | if [ "$1"x != "x" ]; then |
18 | t=$1 | 18 | t=$1 |
diff --git a/src/lib/libssl/test/tsid b/src/lib/libssl/test/tsid index 40a1dfa97c..fb4a7213b9 100644 --- a/src/lib/libssl/test/tsid +++ b/src/lib/libssl/test/tsid | |||
@@ -7,7 +7,7 @@ else | |||
7 | fi | 7 | fi |
8 | export PATH | 8 | export PATH |
9 | 9 | ||
10 | cmd='../apps/openssl sess_id' | 10 | cmd='../util/shlib_wrap.sh ../apps/openssl sess_id' |
11 | 11 | ||
12 | if [ "$1"x != "x" ]; then | 12 | if [ "$1"x != "x" ]; then |
13 | t=$1 | 13 | t=$1 |
diff --git a/src/lib/libssl/test/tx509 b/src/lib/libssl/test/tx509 index d380963abc..1b9c8661f3 100644 --- a/src/lib/libssl/test/tx509 +++ b/src/lib/libssl/test/tx509 | |||
@@ -7,7 +7,7 @@ else | |||
7 | fi | 7 | fi |
8 | export PATH | 8 | export PATH |
9 | 9 | ||
10 | cmd='../apps/openssl x509' | 10 | cmd='../util/shlib_wrap.sh ../apps/openssl x509' |
11 | 11 | ||
12 | if [ "$1"x != "x" ]; then | 12 | if [ "$1"x != "x" ]; then |
13 | t=$1 | 13 | t=$1 |