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,-
30 test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_rd,-
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_ige,test_jpake
36 $ tests = f$edit(tests,"COLLAPSE")
40 $ ECDSATEST := ecdsatest
41 $ ECDHTEST := ecdhtest
43 $ IDEATEST := ideatest
45 $ SHA1TEST := sha1test
46 $ MDC2TEST := mdc2test
51 $ HMACTEST := hmactest
56 $ CASTTEST := casttest
58 $ RANDTEST := randtest
61 $ METHTEST := methtest
64 $ ENGINETEST := enginetest
67 $ JPAKETEST := jpaketest
71 $ tests_e = f$element(tests_i,",",tests)
72 $ tests_i = tests_i + 1
73 $ if tests_e .eqs. "," then goto exit
78 $ mcr 'texe_dir''evptest' evptests.txt
81 $ mcr 'texe_dir''destest'
84 $ mcr 'texe_dir''ideatest'
87 $ mcr 'texe_dir''shatest'
88 $ mcr 'texe_dir''sha1test'
91 $ mcr 'texe_dir''mdc2test'
94 $ mcr 'texe_dir''md5test'
97 $ mcr 'texe_dir''md4test'
100 $ mcr 'texe_dir''hmactest'
103 $ mcr 'texe_dir''md2test'
106 $ mcr 'texe_dir''rmdtest'
109 $ mcr 'texe_dir''bftest'
112 $ mcr 'texe_dir''casttest'
115 $ mcr 'texe_dir''rc2test'
118 $ mcr 'texe_dir''rc4test'
121 $ mcr 'texe_dir''rc5test'
124 $ mcr 'texe_dir''randtest'
130 $ define sys$error nla0:
131 $ write sys$output "test normal x509v1 certificate"
133 $ write sys$output "test first x509v3 certificate"
134 $ @tx509.com v3-cert1.pem
135 $ write sys$output "test second x509v3 certificate"
136 $ @tx509.com v3-cert2.pem
140 $ define sys$error nla0:
143 $ mcr 'texe_dir''rsatest'
146 $ define sys$error nla0:
151 $ define sys$error nla0:
156 $ define sys$error nla0:
158 $ @treq.com testreq2.pem
162 $ define sys$error nla0:
168 $ write sys$output "starting big number library test, could take a while..."
169 $ create bntest-vms.fdl
171 ORGANIZATION sequential
174 $ create/fdl=bntest-vms.fdl bntest-vms.sh
175 $ open/append foo bntest-vms.sh
176 $ type/output=foo: sys$input:
177 << __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"'
178 $ define/user sys$output bntest-vms.tmp
179 $ mcr 'texe_dir''bntest'
180 $ copy bntest-vms.tmp foo:
181 $ delete bntest-vms.tmp;*
182 $ type/output=foo: sys$input:
185 $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
186 $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
187 $ write sys$output "-- went well."
188 $ write sys$output ""
189 $ write sys$output "test a^b%c implementations"
190 $ mcr 'texe_dir''exptest'
193 $ write sys$output "test elliptic curves"
194 $ mcr 'texe_dir''ectest'
197 $ write sys$output "test ecdsa"
198 $ mcr 'texe_dir''ecdsatest'
201 $ write sys$output "test ecdh"
202 $ mcr 'texe_dir''ecdhtest'
205 $ write sys$output "The following command should have some OK's and some failures"
206 $ write sys$output "There are definitly a few expired certificates"
210 $ write sys$output "Generate a set of DH parameters"
211 $ mcr 'texe_dir''dhtest'
214 $ write sys$output "Generate a set of DSA parameters"
215 $ mcr 'texe_dir''dsatest'
218 $ write sys$output "Generate and verify a certificate request"
222 $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT"))
223 $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then -
225 $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
227 $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
231 $ write sys$output "Generate and certify a test certificate"
235 $ write sys$output "Manipulate the ENGINE structures"
236 $ mcr 'texe_dir''enginetest'
239 $ write sys$output "test SSL protocol"
240 $ gosub maybe_test_ss
241 $ @testssl.com keyU.ss certU.ss certCA.ss
245 $ define/user sys$output nla0:
246 $ mcr 'exe_dir'openssl no-rsa
247 $ save_severity=$SEVERITY
251 $ write sys$output "skipping CA.com test -- requires RSA"
253 $ write sys$output "Generate and certify a test certificate via the 'ca' program"
258 $ write sys$output "test Rijndael"
259 $ !mcr 'texe_dir''rdtest'
262 $ write sys$output "Test IGE mode"
263 $ mcr 'texe_dir''igetest'
266 $ write sys$output "Test JPAKE"
267 $ mcr 'texe_dir''jpaketest'
272 $ set default '__save_default'