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 $ set default '__here'
17 $ on control_y then goto exit
18 $ on error then goto exit
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.
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,-
37 $ tests = f$edit(tests,"COLLAPSE")
41 $ ECDSATEST := ecdsatest
42 $ ECDHTEST := ecdhtest
44 $ IDEATEST := ideatest
46 $ SHA1TEST := sha1test
47 $ MDC2TEST := mdc2test
52 $ HMACTEST := hmactest
58 $ CASTTEST := casttest
60 $ RANDTEST := randtest
63 $ METHTEST := methtest
66 $ ENGINETEST := enginetest
69 $ JPAKETEST := jpaketest
73 $ tests_e = f$element(tests_i,",",tests)
74 $ tests_i = tests_i + 1
75 $ if tests_e .eqs. "," then goto exit
80 $ mcr 'texe_dir''evptest' evptests.txt
83 $ mcr 'texe_dir''destest'
86 $ mcr 'texe_dir''ideatest'
89 $ mcr 'texe_dir''shatest'
90 $ mcr 'texe_dir''sha1test'
93 $ mcr 'texe_dir''mdc2test'
96 $ mcr 'texe_dir''md5test'
99 $ mcr 'texe_dir''md4test'
102 $ mcr 'texe_dir''hmactest'
105 $ mcr 'texe_dir''wptest'
108 $ mcr 'texe_dir''md2test'
111 $ mcr 'texe_dir''rmdtest'
114 $ mcr 'texe_dir''bftest'
117 $ mcr 'texe_dir''casttest'
120 $ mcr 'texe_dir''rc2test'
123 $ mcr 'texe_dir''rc4test'
126 $ mcr 'texe_dir''rc5test'
129 $ mcr 'texe_dir''randtest'
135 $ define sys$error nla0:
136 $ write sys$output "test normal x509v1 certificate"
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
145 $ define sys$error nla0:
148 $ mcr 'texe_dir''rsatest'
151 $ define sys$error nla0:
156 $ define sys$error nla0:
161 $ define sys$error nla0:
163 $ @treq.com testreq2.pem
167 $ define sys$error nla0:
173 $ write sys$output "starting big number library test, could take a while..."
174 $ create bntest-vms.fdl
176 ORGANIZATION sequential
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:
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'
198 $ write sys$output "test elliptic curves"
199 $ mcr 'texe_dir''ectest'
202 $ write sys$output "test ecdsa"
203 $ mcr 'texe_dir''ecdsatest'
206 $ write sys$output "test ecdh"
207 $ mcr 'texe_dir''ecdhtest'
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"
215 $ write sys$output "Generate a set of DH parameters"
216 $ mcr 'texe_dir''dhtest'
219 $ write sys$output "Generate a set of DSA parameters"
220 $ mcr 'texe_dir''dsatest'
223 $ write sys$output "Generate and verify a certificate request"
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 -
230 $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
232 $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
236 $ write sys$output "Generate and certify a test certificate"
240 $ write sys$output "Manipulate the ENGINE structures"
241 $ mcr 'texe_dir''enginetest'
244 $ write sys$output "test SSL protocol"
245 $ gosub maybe_test_ss
246 $ @testssl.com keyU.ss certU.ss certCA.ss
250 $ define/user sys$output nla0:
251 $ mcr 'exe_dir'openssl no-rsa
252 $ save_severity=$SEVERITY
256 $ write sys$output "skipping CA.com test -- requires RSA"
258 $ write sys$output "Generate and certify a test certificate via the 'ca' program"
263 $! write sys$output "test AES"
264 $! !mcr 'texe_dir''aestest'
268 $ define/user sys$output nla0:
269 $ mcr 'exe_dir'openssl no-rsa
270 $ save_severity=$SEVERITY
274 $ write sys$output "skipping testtsa.com test -- requires RSA"
280 $ write sys$output "Test IGE mode"
281 $ mcr 'texe_dir''igetest'
284 $ write sys$output "Test JPAKE"
285 $ mcr 'texe_dir''jpaketest'
288 $ write sys$output "CMS consistency test"
294 $ set default '__save_default'