]> git.ipfire.org Git - thirdparty/openssl.git/blob - test/tests.com
Add test_cms
[thirdparty/openssl.git] / test / tests.com
1 $! TESTS.COM -- Performs the necessary tests
2 $!
3 $! P1 tests to be performed. Empty means all.
4 $
5 $ __proc = f$element(0,";",f$environment("procedure"))
6 $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;"
7 $ __save_default = f$environment("default")
8 $ __arch := VAX
9 $ if f$getsyi("cpu") .ge. 128 then -
10 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
11 $ if __arch .eqs. "" then __arch := UNK
12 $ texe_dir := sys$disk:[-.'__arch'.exe.test]
13 $ exe_dir := sys$disk:[-.'__arch'.exe.apps]
14 $
15 $ set default '__here'
16 $
17 $ on control_y then goto exit
18 $ on error then goto exit
19 $
20 $ if p1 .nes. ""
21 $ then
22 $ tests = p1
23 $ else
24 $! NOTE: This list reflects the list of dependencies following the
25 $! "alltests" target in Makefile. This should make it easy to see
26 $! if there's a difference that needs to be taken care of.
27 $ tests := -
28 test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,-
29 test_md2,test_mdc2,test_wp,-
30 test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_aes,-
31 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,-
32 test_enc,test_x509,test_rsa,test_crl,test_sid,-
33 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
34 test_ss,test_ca,test_engine,test_evp,test_ssl,test_tsa,test_ige,-
35 test_jpake,test_cms
36 $ endif
37 $ tests = f$edit(tests,"COLLAPSE")
38 $
39 $ BNTEST := bntest
40 $ ECTEST := ectest
41 $ ECDSATEST := ecdsatest
42 $ ECDHTEST := ecdhtest
43 $ EXPTEST := exptest
44 $ IDEATEST := ideatest
45 $ SHATEST := shatest
46 $ SHA1TEST := sha1test
47 $ MDC2TEST := mdc2test
48 $ RMDTEST := rmdtest
49 $ MD2TEST := md2test
50 $ MD4TEST := md4test
51 $ MD5TEST := md5test
52 $ HMACTEST := hmactest
53 $ WPTEST := wp_test
54 $ RC2TEST := rc2test
55 $ RC4TEST := rc4test
56 $ RC5TEST := rc5test
57 $ BFTEST := bftest
58 $ CASTTEST := casttest
59 $ DESTEST := destest
60 $ RANDTEST := randtest
61 $ DHTEST := dhtest
62 $ DSATEST := dsatest
63 $ METHTEST := methtest
64 $ SSLTEST := ssltest
65 $ RSATEST := rsa_test
66 $ ENGINETEST := enginetest
67 $ EVPTEST := evp_test
68 $ IGETEST := igetest
69 $ JPAKETEST := jpaketest
70 $
71 $ tests_i = 0
72 $ loop_tests:
73 $ tests_e = f$element(tests_i,",",tests)
74 $ tests_i = tests_i + 1
75 $ if tests_e .eqs. "," then goto exit
76 $ gosub 'tests_e'
77 $ goto loop_tests
78 $
79 $ test_evp:
80 $ mcr 'texe_dir''evptest' evptests.txt
81 $ return
82 $ test_des:
83 $ mcr 'texe_dir''destest'
84 $ return
85 $ test_idea:
86 $ mcr 'texe_dir''ideatest'
87 $ return
88 $ test_sha:
89 $ mcr 'texe_dir''shatest'
90 $ mcr 'texe_dir''sha1test'
91 $ return
92 $ test_mdc2:
93 $ mcr 'texe_dir''mdc2test'
94 $ return
95 $ test_md5:
96 $ mcr 'texe_dir''md5test'
97 $ return
98 $ test_md4:
99 $ mcr 'texe_dir''md4test'
100 $ return
101 $ test_hmac:
102 $ mcr 'texe_dir''hmactest'
103 $ return
104 $ test_wp:
105 $ mcr 'texe_dir''wptest'
106 $ return
107 $ test_md2:
108 $ mcr 'texe_dir''md2test'
109 $ return
110 $ test_rmd:
111 $ mcr 'texe_dir''rmdtest'
112 $ return
113 $ test_bf:
114 $ mcr 'texe_dir''bftest'
115 $ return
116 $ test_cast:
117 $ mcr 'texe_dir''casttest'
118 $ return
119 $ test_rc2:
120 $ mcr 'texe_dir''rc2test'
121 $ return
122 $ test_rc4:
123 $ mcr 'texe_dir''rc4test'
124 $ return
125 $ test_rc5:
126 $ mcr 'texe_dir''rc5test'
127 $ return
128 $ test_rand:
129 $ mcr 'texe_dir''randtest'
130 $ return
131 $ test_enc:
132 $ @testenc.com
133 $ return
134 $ test_x509:
135 $ define sys$error nla0:
136 $ write sys$output "test normal x509v1 certificate"
137 $ @tx509.com
138 $ write sys$output "test first x509v3 certificate"
139 $ @tx509.com v3-cert1.pem
140 $ write sys$output "test second x509v3 certificate"
141 $ @tx509.com v3-cert2.pem
142 $ deassign sys$error
143 $ return
144 $ test_rsa:
145 $ define sys$error nla0:
146 $ @trsa.com
147 $ deassign sys$error
148 $ mcr 'texe_dir''rsatest'
149 $ return
150 $ test_crl:
151 $ define sys$error nla0:
152 $ @tcrl.com
153 $ deassign sys$error
154 $ return
155 $ test_sid:
156 $ define sys$error nla0:
157 $ @tsid.com
158 $ deassign sys$error
159 $ return
160 $ test_req:
161 $ define sys$error nla0:
162 $ @treq.com
163 $ @treq.com testreq2.pem
164 $ deassign sys$error
165 $ return
166 $ test_pkcs7:
167 $ define sys$error nla0:
168 $ @tpkcs7.com
169 $ @tpkcs7d.com
170 $ deassign sys$error
171 $ return
172 $ test_bn:
173 $ write sys$output "starting big number library test, could take a while..."
174 $ create bntest-vms.fdl
175 FILE
176 ORGANIZATION sequential
177 RECORD
178 FORMAT stream_lf
179 $ create/fdl=bntest-vms.fdl bntest-vms.sh
180 $ open/append foo bntest-vms.sh
181 $ type/output=foo: sys$input:
182 << __FOO__ sh -c "`sh ./bctest`" | perl -e '$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $1";} elsif (!/^0$/) {die "\nFailed! bc: $_";} else {print STDERR "."; $i++;}} print STDERR "\n$i tests passed\n"'
183 $ define/user sys$output bntest-vms.tmp
184 $ mcr 'texe_dir''bntest'
185 $ copy bntest-vms.tmp foo:
186 $ delete bntest-vms.tmp;*
187 $ type/output=foo: sys$input:
188 __FOO__
189 $ close foo
190 $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
191 $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
192 $ write sys$output "-- went well."
193 $ write sys$output ""
194 $ write sys$output "test a^b%c implementations"
195 $ mcr 'texe_dir''exptest'
196 $ return
197 $ test_ec:
198 $ write sys$output "test elliptic curves"
199 $ mcr 'texe_dir''ectest'
200 $ return
201 $ test_ecdsa:
202 $ write sys$output "test ecdsa"
203 $ mcr 'texe_dir''ecdsatest'
204 $ return
205 $ test_ecdh:
206 $ write sys$output "test ecdh"
207 $ mcr 'texe_dir''ecdhtest'
208 $ return
209 $ test_verify:
210 $ write sys$output "The following command should have some OK's and some failures"
211 $ write sys$output "There are definitly a few expired certificates"
212 $ @tverify.com
213 $ return
214 $ test_dh:
215 $ write sys$output "Generate a set of DH parameters"
216 $ mcr 'texe_dir''dhtest'
217 $ return
218 $ test_dsa:
219 $ write sys$output "Generate a set of DSA parameters"
220 $ mcr 'texe_dir''dsatest'
221 $ return
222 $ test_gen:
223 $ write sys$output "Generate and verify a certificate request"
224 $ @testgen.com
225 $ return
226 $ maybe_test_ss:
227 $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT"))
228 $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then -
229 goto test_ss
230 $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
231 goto test_ss
232 $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
233 goto test_ss
234 $ return
235 $ test_ss:
236 $ write sys$output "Generate and certify a test certificate"
237 $ @testss.com
238 $ return
239 $ test_engine:
240 $ write sys$output "Manipulate the ENGINE structures"
241 $ mcr 'texe_dir''enginetest'
242 $ return
243 $ test_ssl:
244 $ write sys$output "test SSL protocol"
245 $ gosub maybe_test_ss
246 $ @testssl.com keyU.ss certU.ss certCA.ss
247 $ return
248 $ test_ca:
249 $ set noon
250 $ define/user sys$output nla0:
251 $ mcr 'exe_dir'openssl no-rsa
252 $ save_severity=$SEVERITY
253 $ set on
254 $ if save_severity
255 $ then
256 $ write sys$output "skipping CA.com test -- requires RSA"
257 $ else
258 $ write sys$output "Generate and certify a test certificate via the 'ca' program"
259 $ @testca.com
260 $ endif
261 $ return
262 $ test_aes:
263 $! write sys$output "test AES"
264 $! !mcr 'texe_dir''aestest'
265 $ return
266 $ test_tsa:
267 $ set noon
268 $ define/user sys$output nla0:
269 $ mcr 'exe_dir'openssl no-rsa
270 $ save_severity=$SEVERITY
271 $ set on
272 $ if save_severity
273 $ then
274 $ write sys$output "skipping testtsa.com test -- requires RSA"
275 $ else
276 $ @testtsa.com
277 $ endif
278 $ return
279 $ test_ige:
280 $ write sys$output "Test IGE mode"
281 $ mcr 'texe_dir''igetest'
282 $ return
283 $ test_jpake:
284 $ write sys$output "Test JPAKE"
285 $ mcr 'texe_dir''jpaketest'
286 $ return
287 $ test_cms:
288 $ write sys$output "CMS consistency test"
289 $ perl CMS-TEST.PL
290 $ return
291 $
292 $
293 $ exit:
294 $ set default '__save_default'
295 $ exit