New "fispcanisteronly" build option: only build fipscanister.o and
[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 $       texe_dir := sys$disk:[-.'__arch'.exe.test]
8 $       exe_dir := sys$disk:[-.'__arch'.exe.apps]
9 $
10 $       if p1 .eqs. ""
11 $       then
12 $           key="[-.apps]server.pem"
13 $       else
14 $           key=p1
15 $       endif
16 $       if p2 .eqs. ""
17 $       then
18 $           cert="[-.apps]server.pem"
19 $       else
20 $           cert=p2
21 $       endif
22 $       ssltest := mcr 'texe_dir'ssltest -key 'key' -cert 'cert' -c_key 'key' -c_cert 'cert'
23 $
24 $       set noon
25 $       define/user sys$output testssl-x509-output.
26 $       define/user sys$error nla0:
27 $       mcr 'exe_dir'openssl x509 -in 'cert' -text -noout
28 $       define/user sys$error nla0:
29 $       search/output=nla0: testssl-x509-output. "DSA Public Key"/exact
30 $       if $severity .eq. 1
31 $       then
32 $           dsa_cert := YES
33 $       else
34 $           dsa_cert := NO
35 $       endif
36 $       delete testssl-x509-output.;*
37 $
38 $       if p3 .eqs. ""
39 $       then
40 $           copy/concatenate [-.certs]*.pem certs.tmp
41 $           CA = """-CAfile"" certs.tmp"
42 $       else
43 $           CA = """-CAfile"" "+p3
44 $       endif
45 $
46 $!###########################################################################
47 $
48 $       write sys$output "test sslv2"
49 $       'ssltest' -ssl2
50 $       if $severity .ne. 1 then goto exit3
51 $
52 $       write sys$output "test sslv2 with server authentication"
53 $       'ssltest' -ssl2 -server_auth 'CA'
54 $       if $severity .ne. 1 then goto exit3
55 $
56 $       if .not. dsa_cert
57 $       then
58 $           write sys$output "test sslv2 with client authentication"
59 $           'ssltest' -ssl2 -client_auth 'CA'
60 $           if $severity .ne. 1 then goto exit3
61 $
62 $           write sys$output "test sslv2 with both client and server authentication"
63 $           'ssltest' -ssl2 -server_auth -client_auth 'CA'
64 $           if $severity .ne. 1 then goto exit3
65 $       endif
66 $
67 $       write sys$output "test sslv3"
68 $       'ssltest' -ssl3
69 $       if $severity .ne. 1 then goto exit3
70 $
71 $       write sys$output "test sslv3 with server authentication"
72 $       'ssltest' -ssl3 -server_auth 'CA'
73 $       if $severity .ne. 1 then goto exit3
74 $
75 $       write sys$output "test sslv3 with client authentication"
76 $       'ssltest' -ssl3 -client_auth 'CA'
77 $       if $severity .ne. 1 then goto exit3
78 $
79 $       write sys$output "test sslv3 with both client and server authentication"
80 $       'ssltest' -ssl3 -server_auth -client_auth 'CA'
81 $       if $severity .ne. 1 then goto exit3
82 $
83 $       write sys$output "test sslv2/sslv3"
84 $       'ssltest'
85 $       if $severity .ne. 1 then goto exit3
86 $
87 $       write sys$output "test sslv2/sslv3 with server authentication"
88 $       'ssltest' -server_auth 'CA'
89 $       if $severity .ne. 1 then goto exit3
90 $
91 $       write sys$output "test sslv2/sslv3 with client authentication"
92 $       'ssltest' -client_auth 'CA'
93 $       if $severity .ne. 1 then goto exit3
94 $
95 $       write sys$output "test sslv2/sslv3 with both client and server authentication"
96 $       'ssltest' -server_auth -client_auth 'CA'
97 $       if $severity .ne. 1 then goto exit3
98 $
99 $       write sys$output "test sslv2 via BIO pair"
100 $       'ssltest' -bio_pair -ssl2 
101 $       if $severity .ne. 1 then goto exit3
102 $
103 $       write sys$output "test sslv2 with server authentication via BIO pair"
104 $       'ssltest' -bio_pair -ssl2 -server_auth 'CA' 
105 $       if $severity .ne. 1 then goto exit3
106 $
107 $       if .not. dsa_cert
108 $       then
109 $           write sys$output "test sslv2 with client authentication via BIO pair"
110 $           'ssltest' -bio_pair -ssl2 -client_auth 'CA' 
111 $           if $severity .ne. 1 then goto exit3
112 $
113 $           write sys$output "test sslv2 with both client and server authentication via BIO pair"
114 $           'ssltest' -bio_pair -ssl2 -server_auth -client_auth 'CA' 
115 $           if $severity .ne. 1 then goto exit3
116 $       endif
117 $
118 $       write sys$output "test sslv3 via BIO pair"
119 $       'ssltest' -bio_pair -ssl3 
120 $       if $severity .ne. 1 then goto exit3
121 $
122 $       write sys$output "test sslv3 with server authentication via BIO pair"
123 $       'ssltest' -bio_pair -ssl3 -server_auth 'CA' 
124 $       if $severity .ne. 1 then goto exit3
125 $
126 $       write sys$output "test sslv3 with client authentication via BIO pair"
127 $       'ssltest' -bio_pair -ssl3 -client_auth 'CA' 
128 $       if $severity .ne. 1 then goto exit3
129  
130 $       write sys$output "test sslv3 with both client and server authentication via BIO pair"
131 $       'ssltest' -bio_pair -ssl3 -server_auth -client_auth 'CA' 
132 $       if $severity .ne. 1 then goto exit3
133 $
134 $       write sys$output "test sslv2/sslv3 via BIO pair"
135 $       'ssltest' 
136 $       if $severity .ne. 1 then goto exit3
137 $
138 $       if .not. dsa_cert
139 $       then
140 $           write sys$output "test sslv2/sslv3 w/o DHE via BIO pair"
141 $           'ssltest' -bio_pair -no_dhe
142 $           if $severity .ne. 1 then goto exit3
143 $       endif
144 $
145 $       write sys$output "test sslv2/sslv3 with 1024 bit DHE via BIO pair"
146 $       'ssltest' -bio_pair -dhe1024dsa -v
147 $       if $severity .ne. 1 then goto exit3
148 $
149 $       write sys$output "test sslv2/sslv3 with server authentication"
150 $       'ssltest' -bio_pair -server_auth 'CA' 
151 $       if $severity .ne. 1 then goto exit3
152 $
153 $       write sys$output "test sslv2/sslv3 with client authentication via BIO pair"
154 $       'ssltest' -bio_pair -client_auth 'CA' 
155 $       if $severity .ne. 1 then goto exit3
156 $
157 $       write sys$output "test sslv2/sslv3 with both client and server authentication via BIO pair"
158 $       'ssltest' -bio_pair -server_auth -client_auth 'CA' 
159 $       if $severity .ne. 1 then goto exit3
160 $
161 $!###########################################################################
162 $
163 $       define/user sys$output nla0:
164 $       mcr 'exe_dir'openssl no-rsa
165 $       no_rsa=$SEVERITY
166 $       define/user sys$output nla0:
167 $       mcr 'exe_dir'openssl no-dh
168 $       no_dh=$SEVERITY
169 $
170 $       if no_dh
171 $       then
172 $           write sys$output "skipping anonymous DH tests"
173 $       else
174 $           write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes"
175 $           'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time
176 $           if $severity .ne. 1 then goto exit3
177 $       endif
178 $
179 $       if no_rsa
180 $       then
181 $           write sys$output "skipping RSA tests"
182 $       else
183 $           write sys$output "test tls1 with 1024bit RSA, no DHE, multiple handshakes"
184 $           mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -no_dhe -num 10 -f -time
185 $           if $severity .ne. 1 then goto exit3
186 $
187 $           if no_dh
188 $           then
189 $               write sys$output "skipping RSA+DHE tests"
190 $           else
191 $               write sys$output "test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes"
192 $               mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -dhe1024dsa -num 10 -f -time
193 $               if $severity .ne. 1 then goto exit3
194 $           endif
195 $       endif
196 $
197 $       RET = 1
198 $       goto exit
199 $ exit3:
200 $       RET = 3
201 $ exit:
202 $       if p3 .eqs. "" then delete certs.tmp;*
203 $       set on
204 $       exit 'RET'