]> git.ipfire.org Git - thirdparty/openssl.git/blob - test/testssl.com
Run util/openssl-format-source -v -c .
[thirdparty/openssl.git] / test / testssl.com
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 sslv3"
53 $ 'ssltest' -ssl3
54 $ if $severity .ne. 1 then goto exit3
55 $
56 $ write sys$output "test sslv3 with server authentication"
57 $ 'ssltest' -ssl3 -server_auth 'CA'
58 $ if $severity .ne. 1 then goto exit3
59 $
60 $ write sys$output "test sslv3 with client authentication"
61 $ 'ssltest' -ssl3 -client_auth 'CA'
62 $ if $severity .ne. 1 then goto exit3
63 $
64 $ write sys$output "test sslv3 with both client and server authentication"
65 $ 'ssltest' -ssl3 -server_auth -client_auth 'CA'
66 $ if $severity .ne. 1 then goto exit3
67 $
68 $ write sys$output "test sslv2/sslv3"
69 $ 'ssltest'
70 $ if $severity .ne. 1 then goto exit3
71 $
72 $ write sys$output "test sslv2/sslv3 with server authentication"
73 $ 'ssltest' -server_auth 'CA'
74 $ if $severity .ne. 1 then goto exit3
75 $
76 $ write sys$output "test sslv2/sslv3 with client authentication"
77 $ 'ssltest' -client_auth 'CA'
78 $ if $severity .ne. 1 then goto exit3
79 $
80 $ write sys$output "test sslv2/sslv3 with both client and server authentication"
81 $ 'ssltest' -server_auth -client_auth 'CA'
82 $ if $severity .ne. 1 then goto exit3
83 $
84 $ write sys$output "test sslv3 via BIO pair"
85 $ 'ssltest' -bio_pair -ssl3
86 $ if $severity .ne. 1 then goto exit3
87 $
88 $ write sys$output "test sslv3 with server authentication via BIO pair"
89 $ 'ssltest' -bio_pair -ssl3 -server_auth 'CA'
90 $ if $severity .ne. 1 then goto exit3
91 $
92 $ write sys$output "test sslv3 with client authentication via BIO pair"
93 $ 'ssltest' -bio_pair -ssl3 -client_auth 'CA'
94 $ if $severity .ne. 1 then goto exit3
95
96 $ write sys$output "test sslv3 with both client and server authentication via BIO pair"
97 $ 'ssltest' -bio_pair -ssl3 -server_auth -client_auth 'CA'
98 $ if $severity .ne. 1 then goto exit3
99 $
100 $ write sys$output "test sslv2/sslv3 via BIO pair"
101 $ 'ssltest'
102 $ if $severity .ne. 1 then goto exit3
103 $
104 $ if .not. dsa_cert
105 $ then
106 $ write sys$output "test sslv2/sslv3 w/o DHE via BIO pair"
107 $ 'ssltest' -bio_pair -no_dhe
108 $ if $severity .ne. 1 then goto exit3
109 $ endif
110 $
111 $ write sys$output "test sslv2/sslv3 with 1024 bit DHE via BIO pair"
112 $ 'ssltest' -bio_pair -dhe1024dsa -v
113 $ if $severity .ne. 1 then goto exit3
114 $
115 $ write sys$output "test sslv2/sslv3 with server authentication"
116 $ 'ssltest' -bio_pair -server_auth 'CA'
117 $ if $severity .ne. 1 then goto exit3
118 $
119 $ write sys$output "test sslv2/sslv3 with client authentication via BIO pair"
120 $ 'ssltest' -bio_pair -client_auth 'CA'
121 $ if $severity .ne. 1 then goto exit3
122 $
123 $ write sys$output "test sslv2/sslv3 with both client and server authentication via BIO pair"
124 $ 'ssltest' -bio_pair -server_auth -client_auth 'CA'
125 $ if $severity .ne. 1 then goto exit3
126 $
127 $!###########################################################################
128 $
129 $ define/user sys$output nla0:
130 $ mcr 'exe_dir'openssl no-rsa
131 $ no_rsa=$SEVERITY
132 $ define/user sys$output nla0:
133 $ mcr 'exe_dir'openssl no-dh
134 $ no_dh=$SEVERITY
135 $
136 $ if no_dh
137 $ then
138 $ write sys$output "skipping anonymous DH tests"
139 $ else
140 $ write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes"
141 $ 'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time
142 $ if $severity .ne. 1 then goto exit3
143 $ endif
144 $
145 $ if no_rsa
146 $ then
147 $ write sys$output "skipping RSA tests"
148 $ else
149 $ write sys$output "test tls1 with 1024bit RSA, no DHE, multiple handshakes"
150 $ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -no_dhe -num 10 -f -time
151 $ if $severity .ne. 1 then goto exit3
152 $
153 $ if no_dh
154 $ then
155 $ write sys$output "skipping RSA+DHE tests"
156 $ else
157 $ write sys$output "test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes"
158 $ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -dhe1024dsa -num 10 -f -time
159 $ if $severity .ne. 1 then goto exit3
160 $ endif
161 $ endif
162 $
163 $ RET = 1
164 $ goto exit
165 $ exit3:
166 $ RET = 3
167 $ exit:
168 $ if p3 .eqs. "" then delete certs.tmp;*
169 $ set on
170 $ exit 'RET'