1 $! TESTS.COM -- Performs the necessary tests
3 $! P1 tests to be performed. Empty means all.
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")
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]
15 $ sslroot = f$parse("sys$disk:[-.apps];",,,,"syntax_only") - "].;"+ ".]"
16 $ define /translation_attributes = concealed sslroot 'sslroot'
18 $ set default '__here'
20 $ on control_y then goto exit
21 $ on error then goto exit
27 $! NOTE: This list reflects the list of dependencies following the
28 $! "alltests" target in Makefile. This should make it easy to see
29 $! if there's a difference that needs to be taken care of.
31 test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,-
32 test_md2,test_mdc2,test_wp,-
33 test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_aes,-
34 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,-
35 test_enc,test_x509,test_rsa,test_crl,test_sid,-
36 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
37 test_ss,test_ca,test_engine,test_evp,test_ssl,test_tsa,test_ige,-
40 $ tests = f$edit(tests,"COLLAPSE")
44 $ ECDSATEST := ecdsatest
45 $ ECDHTEST := ecdhtest
47 $ IDEATEST := ideatest
49 $ SHA1TEST := sha1test
50 $ MDC2TEST := mdc2test
55 $ HMACTEST := hmactest
61 $ CASTTEST := casttest
63 $ RANDTEST := randtest
66 $ METHTEST := methtest
69 $ ENGINETEST := enginetest
72 $ JPAKETEST := jpaketest
76 $ tests_e = f$element(tests_i,",",tests)
77 $ tests_i = tests_i + 1
78 $ if tests_e .eqs. "," then goto exit
83 $ mcr 'texe_dir''evptest' evptests.txt
86 $ mcr 'texe_dir''destest'
89 $ mcr 'texe_dir''ideatest'
92 $ mcr 'texe_dir''shatest'
93 $ mcr 'texe_dir''sha1test'
96 $ mcr 'texe_dir''mdc2test'
99 $ mcr 'texe_dir''md5test'
102 $ mcr 'texe_dir''md4test'
105 $ mcr 'texe_dir''hmactest'
108 $ mcr 'texe_dir''wptest'
111 $ mcr 'texe_dir''md2test'
114 $ mcr 'texe_dir''rmdtest'
117 $ mcr 'texe_dir''bftest'
120 $ mcr 'texe_dir''casttest'
123 $ mcr 'texe_dir''rc2test'
126 $ mcr 'texe_dir''rc4test'
129 $ mcr 'texe_dir''rc5test'
132 $ mcr 'texe_dir''randtest'
138 $ define sys$error nla0:
139 $ write sys$output "test normal x509v1 certificate"
141 $ write sys$output "test first x509v3 certificate"
142 $ @tx509.com v3-cert1.pem
143 $ write sys$output "test second x509v3 certificate"
144 $ @tx509.com v3-cert2.pem
148 $ define sys$error nla0:
151 $ mcr 'texe_dir''rsatest'
154 $ define sys$error nla0:
159 $ define sys$error nla0:
164 $ define sys$error nla0:
166 $ @treq.com testreq2.pem
170 $ define sys$error nla0:
176 $ write sys$output "starting big number library test, could take a while..."
177 $ create bntest-vms.fdl
179 ORGANIZATION sequential
182 $ create/fdl=bntest-vms.fdl bntest-vms.sh
183 $ open/append foo bntest-vms.sh
184 $ type/output=foo: sys$input:
185 << __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"'
186 $ define/user sys$output bntest-vms.tmp
187 $ mcr 'texe_dir''bntest'
188 $ copy bntest-vms.tmp foo:
189 $ delete bntest-vms.tmp;*
190 $ type/output=foo: sys$input:
193 $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
194 $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
195 $ write sys$output "-- went well."
196 $ write sys$output ""
197 $ write sys$output "test a^b%c implementations"
198 $ mcr 'texe_dir''exptest'
201 $ write sys$output "test elliptic curves"
202 $ mcr 'texe_dir''ectest'
205 $ write sys$output "test ecdsa"
206 $ mcr 'texe_dir''ecdsatest'
209 $ write sys$output "test ecdh"
210 $ mcr 'texe_dir''ecdhtest'
213 $ write sys$output "The following command should have some OK's and some failures"
214 $ write sys$output "There are definitly a few expired certificates"
218 $ write sys$output "Generate a set of DH parameters"
219 $ mcr 'texe_dir''dhtest'
222 $ write sys$output "Generate a set of DSA parameters"
223 $ mcr 'texe_dir''dsatest'
226 $ write sys$output "Generate and verify a certificate request"
230 $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT"))
231 $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then -
233 $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
235 $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
239 $ write sys$output "Generate and certify a test certificate"
243 $ write sys$output "Manipulate the ENGINE structures"
244 $ mcr 'texe_dir''enginetest'
247 $ write sys$output "test SSL protocol"
248 $ gosub maybe_test_ss
249 $ @testssl.com keyU.ss certU.ss certCA.ss
253 $ define/user sys$output nla0:
254 $ mcr 'exe_dir'openssl no-rsa
255 $ save_severity=$SEVERITY
259 $ write sys$output "skipping CA.com test -- requires RSA"
261 $ write sys$output "Generate and certify a test certificate via the 'ca' program"
266 $! write sys$output "test AES"
267 $! !mcr 'texe_dir''aestest'
271 $ define/user sys$output nla0:
272 $ mcr 'exe_dir'openssl no-rsa
273 $ save_severity=$SEVERITY
277 $ write sys$output "skipping testtsa.com test -- requires RSA"
283 $ write sys$output "Test IGE mode"
284 $ mcr 'texe_dir''igetest'
287 $ write sys$output "Test JPAKE"
288 $ mcr 'texe_dir''jpaketest'
291 $ write sys$output "CMS consistency test"
297 $ set default '__save_default'