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 __arch := AXP
10 $ texe_dir := sys$disk:[-.'__arch'.exe.test]
11 $ exe_dir := sys$disk:[-.'__arch'.exe.apps]
13 $ set default '__here'
14 $ on control_y then goto exit
15 $ on error then goto exit
22 test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,-
24 test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_rd,-
25 test_rand,test_bn,test_ec,test_enc,test_x509,test_rsa,test_crl,test_sid,-
26 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
27 test_ss,test_ca,test_engine,test_ssl
29 $ tests = f$edit(tests,"COLLAPSE")
34 $ IDEATEST := ideatest
36 $ SHA1TEST := sha1test
37 $ MDC2TEST := mdc2test
42 $ HMACTEST := hmactest
47 $ CASTTEST := casttest
49 $ RANDTEST := randtest
52 $ METHTEST := methtest
55 $ ENGINETEST := enginetest
59 $ tests_e = f$element(tests_i,",",tests)
60 $ tests_i = tests_i + 1
61 $ if tests_e .eqs. "," then goto exit
66 $ mcr 'texe_dir''destest'
69 $ mcr 'texe_dir''ideatest'
72 $ mcr 'texe_dir''shatest'
73 $ mcr 'texe_dir''sha1test'
76 $ mcr 'texe_dir''mdc2test'
79 $ mcr 'texe_dir''md5test'
82 $ mcr 'texe_dir''md4test'
85 $ mcr 'texe_dir''hmactest'
88 $ mcr 'texe_dir''md2test'
91 $ mcr 'texe_dir''rmdtest'
94 $ mcr 'texe_dir''bftest'
97 $ mcr 'texe_dir''casttest'
100 $ mcr 'texe_dir''rc2test'
103 $ mcr 'texe_dir''rc4test'
106 $ mcr 'texe_dir''rc5test'
109 $ mcr 'texe_dir''randtest'
115 $ define sys$error nla0:
116 $ write sys$output "test normal x509v1 certificate"
118 $ write sys$output "test first x509v3 certificate"
119 $ @tx509.com v3-cert1.pem
120 $ write sys$output "test second x509v3 certificate"
121 $ @tx509.com v3-cert2.pem
125 $ define sys$error nla0:
128 $ mcr 'texe_dir''rsatest'
131 $ define sys$error nla0:
136 $ define sys$error nla0:
141 $ define sys$error nla0:
143 $ @treq.com testreq2.pem
147 $ define sys$error nla0:
153 $ write sys$output "starting big number library test, could take a while..."
154 $ create bntest-vms.fdl
156 ORGANIZATION sequential
159 $ create/fdl=bntest-vms.fdl bntest-vms.sh
160 $ open/append foo bntest-vms.sh
161 $ type/output=foo: sys$input:
162 << __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"'
163 $ define/user sys$output bntest-vms.tmp
164 $ mcr 'texe_dir''bntest'
165 $ copy bntest-vms.tmp foo:
166 $ delete bntest-vms.tmp;*
167 $ type/output=foo: sys$input:
170 $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
171 $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
172 $ write sys$output "-- went well."
173 $ write sys$output ""
174 $ write sys$output "test a^b%c implementations"
175 $ mcr 'texe_dir''exptest'
178 $ write sys$output "test elliptic curves"
179 $ mcr 'texe_dir''ectest'
182 $ write sys$output "The following command should have some OK's and some failures"
183 $ write sys$output "There are definitly a few expired certificates"
187 $ write sys$output "Generate a set of DH parameters"
188 $ mcr 'texe_dir''dhtest'
191 $ write sys$output "Generate a set of DSA parameters"
192 $ mcr 'texe_dir''dsatest'
195 $ write sys$output "Generate and verify a certificate request"
199 $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT"))
200 $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then -
202 $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
204 $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
208 $ write sys$output "Generate and certify a test certificate"
212 $ write sys$output "Manipulate the ENGINE structures"
213 $ mcr 'texe_dir''enginetest'
216 $ write sys$output "test SSL protocol"
217 $ gosub maybe_test_ss
218 $ @testssl.com keyU.ss certU.ss certCA.ss
222 $ define/user sys$output nla0:
223 $ mcr 'exe_dir'openssl no-rsa
224 $ save_severity=$SEVERITY
228 $ write sys$output "skipping CA.com test -- requires RSA"
230 $ write sys$output "Generate and certify a test certificate via the 'ca' program"
235 $ write sys$output "test Rijndael"
236 $ !mcr 'texe_dir''rdtest'
241 $ set default '__save_default'