summaryrefslogtreecommitdiff
path: root/src/lib/libssl/test/testss
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/test/testss90
-rw-r--r--src/lib/libssl/test/testssl81
2 files changed, 0 insertions, 171 deletions
diff --git a/src/lib/libssl/test/testss b/src/lib/libssl/test/testss
deleted file mode 100644
index da62997a5f..0000000000
--- a/src/lib/libssl/test/testss
+++ /dev/null
@@ -1,90 +0,0 @@
1#!/bin/sh
2
3digest='-mdc2'
4reqcmd="../apps/openssl req"
5x509cmd="../apps/openssl x509 $digest"
6verifycmd="../apps/openssl verify"
7dummycnf="../apps/openssl.cnf"
8
9CAkey="keyCA.ss"
10CAcert="certCA.ss"
11CAreq="reqCA.ss"
12CAconf="CAss.cnf"
13CAreq2="req2CA.ss" # temp
14
15Uconf="Uss.cnf"
16Ukey="keyU.ss"
17Ureq="reqU.ss"
18Ucert="certU.ss"
19
20echo
21echo "make a certificate request using 'req'"
22$reqcmd -config $CAconf -out $CAreq -keyout $CAkey -new #>err.ss
23if [ $? != 0 ]; then
24 echo "error using 'req' to generate a certificate request"
25 exit 1
26fi
27echo
28echo "convert the certificate request into a self signed certificate using 'x509'"
29$x509cmd -CAcreateserial -in $CAreq -days 30 -req -out $CAcert -signkey $CAkey >err.ss
30if [ $? != 0 ]; then
31 echo "error using 'x509' to self sign a certificate request"
32 exit 1
33fi
34
35echo
36echo "convert a certificate into a certificate request using 'x509'"
37$x509cmd -in $CAcert -x509toreq -signkey $CAkey -out $CAreq2 >err.ss
38if [ $? != 0 ]; then
39 echo "error using 'x509' convert a certificate to a certificate request"
40 exit 1
41fi
42
43$reqcmd -config $dummycnf -verify -in $CAreq -noout
44if [ $? != 0 ]; then
45 echo first generated request is invalid
46 exit 1
47fi
48
49$reqcmd -config $dummycnf -verify -in $CAreq2 -noout
50if [ $? != 0 ]; then
51 echo second generated request is invalid
52 exit 1
53fi
54
55$verifycmd -CAfile $CAcert $CAcert
56if [ $? != 0 ]; then
57 echo first generated cert is invalid
58 exit 1
59fi
60
61echo
62echo "make another certificate request using 'req'"
63$reqcmd -config $Uconf -out $Ureq -keyout $Ukey -new >err.ss
64if [ $? != 0 ]; then
65 echo "error using 'req' to generate a certificate request"
66 exit 1
67fi
68
69echo
70echo "sign certificate request with the just created CA via 'x509'"
71$x509cmd -CAcreateserial -in $Ureq -days 30 -req -out $Ucert -CA $CAcert -CAkey $CAkey >err.ss
72if [ $? != 0 ]; then
73 echo "error using 'x509' to sign a certificate request"
74 exit 1
75fi
76
77$verifycmd -CAfile $CAcert $Ucert
78echo
79echo "Certificate details"
80$x509cmd -subject -issuer -startdate -enddate -noout -in $Ucert
81
82echo
83echo The generated CA certificate is $CAcert
84echo The generated CA private key is $CAkey
85
86echo The generated user certificate is $Ucert
87echo The generated user private key is $Ukey
88
89/bin/rm err.ss
90exit 0
diff --git a/src/lib/libssl/test/testssl b/src/lib/libssl/test/testssl
deleted file mode 100644
index a88e290c57..0000000000
--- a/src/lib/libssl/test/testssl
+++ /dev/null
@@ -1,81 +0,0 @@
1#!/bin/sh
2
3echo test sslv2
4./ssltest -ssl2 || exit 1
5
6echo test sslv2 with server authentication
7./ssltest -ssl2 -server_auth -CApath ../certs || exit 1
8
9echo test sslv2 with client authentication
10./ssltest -ssl2 -client_auth -CApath ../certs || exit 1
11
12echo test sslv2 with both client and server authentication
13./ssltest -ssl2 -server_auth -client_auth -CApath ../certs || exit 1
14
15echo test sslv3
16./ssltest -ssl3 || exit 1
17
18echo test sslv3 with server authentication
19./ssltest -ssl3 -server_auth -CApath ../certs || exit 1
20
21echo test sslv3 with client authentication
22./ssltest -ssl3 -client_auth -CApath ../certs || exit 1
23
24echo test sslv3 with both client and server authentication
25./ssltest -ssl3 -server_auth -client_auth -CApath ../certs || exit 1
26
27echo test sslv2/sslv3
28./ssltest || exit 1
29
30echo test sslv2/sslv3 with server authentication
31./ssltest -server_auth -CApath ../certs || exit 1
32
33echo test sslv2/sslv3 with client authentication
34./ssltest -client_auth -CApath ../certs || exit 1
35
36echo test sslv2/sslv3 with both client and server authentication
37./ssltest -server_auth -client_auth -CApath ../certs || exit 1
38
39echo test sslv2 via BIO pair
40./ssltest -bio_pair -ssl2 || exit 1
41
42echo test sslv2 with server authentication via BIO pair
43./ssltest -bio_pair -ssl2 -server_auth -CApath ../certs || exit 1
44
45echo test sslv2 with client authentication via BIO pair
46./ssltest -bio_pair -ssl2 -client_auth -CApath ../certs || exit 1
47
48echo test sslv2 with both client and server authentication via BIO pair
49./ssltest -bio_pair -ssl2 -server_auth -client_auth -CApath ../certs || exit 1
50
51echo test sslv3 via BIO pair
52./ssltest -bio_pair -ssl3 || exit 1
53
54echo test sslv3 with server authentication via BIO pair
55./ssltest -bio_pair -ssl3 -server_auth -CApath ../certs || exit 1
56
57echo test sslv3 with client authentication via BIO pair
58./ssltest -bio_pair -ssl3 -client_auth -CApath ../certs || exit 1
59
60echo test sslv3 with both client and server authentication via BIO pair
61./ssltest -bio_pair -ssl3 -server_auth -client_auth -CApath ../certs || exit 1
62
63echo test sslv2/sslv3 via BIO pair
64./ssltest || exit 1
65
66echo test sslv2/sslv3 w/o DHE via BIO pair
67./ssltest -bio_pair -no_dhe || exit 1
68
69echo test sslv2/sslv3 with 1024bit DHE
70./ssltest -bio_pair -dhe1024 -v || exit 1
71
72echo test sslv2/sslv3 with server authentication
73./ssltest -bio_pair -server_auth -CApath ../certs || exit 1
74
75echo test sslv2/sslv3 with client authentication via BIO pair
76./ssltest -bio_pair -client_auth -CApath ../certs || exit 1
77
78echo test sslv2/sslv3 with both client and server authentication via BIO pair
79./ssltest -bio_pair -server_auth -client_auth -CApath ../certs || exit 1
80
81exit 0