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'
16 $ on control_y then goto exit
17 $ on error then goto exit
23 $! NOTE: This list reflects the list of dependencies following the
24 $! "alltests" target in Makefile. This should make it easy to see
25 $! if there's a difference that needs to be taken care of.
27 test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,-
28 test_md2,test_mdc2,test_wp,-
29 test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_aes,-
30 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,-
31 test_enc,test_x509,test_rsa,test_crl,test_sid,-
32 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
33 test_ss,test_ca,test_engine,test_evp,test_ssl,test_tsa,test_ige,-
36 $ tests = f$edit(tests,"COLLAPSE")
40 $ ECDSATEST := ecdsatest
41 $ ECDHTEST := ecdhtest
43 $ IDEATEST := ideatest
45 $ SHA1TEST := sha1test
46 $ MDC2TEST := mdc2test
51 $ HMACTEST := hmactest
57 $ CASTTEST := casttest
59 $ RANDTEST := randtest
62 $ METHTEST := methtest
65 $ ENGINETEST := enginetest
68 $ JPAKETEST := jpaketest
72 $ tests_e = f$element(tests_i,",",tests)
73 $ tests_i = tests_i + 1
74 $ if tests_e .eqs. "," then goto exit
79 $ mcr 'texe_dir''evptest' evptests.txt
82 $ mcr 'texe_dir''destest'
85 $ mcr 'texe_dir''ideatest'
88 $ mcr 'texe_dir''shatest'
89 $ mcr 'texe_dir''sha1test'
92 $ mcr 'texe_dir''mdc2test'
95 $ mcr 'texe_dir''md5test'
98 $ mcr 'texe_dir''md4test'
101 $ mcr 'texe_dir''hmactest'
104 $ mcr 'texe_dir''wptest'
107 $ mcr 'texe_dir''md2test'
110 $ mcr 'texe_dir''rmdtest'
113 $ mcr 'texe_dir''bftest'
116 $ mcr 'texe_dir''casttest'
119 $ mcr 'texe_dir''rc2test'
122 $ mcr 'texe_dir''rc4test'
125 $ mcr 'texe_dir''rc5test'
128 $ mcr 'texe_dir''randtest'
134 $ define sys$error nla0:
135 $ write sys$output "test normal x509v1 certificate"
137 $ write sys$output "test first x509v3 certificate"
138 $ @tx509.com v3-cert1.pem
139 $ write sys$output "test second x509v3 certificate"
140 $ @tx509.com v3-cert2.pem
144 $ define sys$error nla0:
147 $ mcr 'texe_dir''rsatest'
150 $ define sys$error nla0:
155 $ define sys$error nla0:
160 $ define sys$error nla0:
162 $ @treq.com testreq2.pem
166 $ define sys$error nla0:
172 $ write sys$output "starting big number library test, could take a while..."
173 $ create bntest-vms.fdl
175 ORGANIZATION sequential
178 $ create/fdl=bntest-vms.fdl bntest-vms.sh
179 $ open/append foo bntest-vms.sh
180 $ type/output=foo: sys$input:
181 << __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"'
182 $ define/user sys$output bntest-vms.tmp
183 $ mcr 'texe_dir''bntest'
184 $ copy bntest-vms.tmp foo:
185 $ delete bntest-vms.tmp;*
186 $ type/output=foo: sys$input:
189 $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
190 $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
191 $ write sys$output "-- went well."
192 $ write sys$output ""
193 $ write sys$output "test a^b%c implementations"
194 $ mcr 'texe_dir''exptest'
197 $ write sys$output "test elliptic curves"
198 $ mcr 'texe_dir''ectest'
201 $ write sys$output "test ecdsa"
202 $ mcr 'texe_dir''ecdsatest'
205 $ write sys$output "test ecdh"
206 $ mcr 'texe_dir''ecdhtest'
209 $ write sys$output "The following command should have some OK's and some failures"
210 $ write sys$output "There are definitly a few expired certificates"
214 $ write sys$output "Generate a set of DH parameters"
215 $ mcr 'texe_dir''dhtest'
218 $ write sys$output "Generate a set of DSA parameters"
219 $ mcr 'texe_dir''dsatest'
222 $ write sys$output "Generate and verify a certificate request"
226 $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT"))
227 $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then -
229 $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
231 $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
235 $ write sys$output "Generate and certify a test certificate"
239 $ write sys$output "Manipulate the ENGINE structures"
240 $ mcr 'texe_dir''enginetest'
243 $ write sys$output "test SSL protocol"
244 $ gosub maybe_test_ss
245 $ @testssl.com keyU.ss certU.ss certCA.ss
249 $ define/user sys$output nla0:
250 $ mcr 'exe_dir'openssl no-rsa
251 $ save_severity=$SEVERITY
255 $ write sys$output "skipping CA.com test -- requires RSA"
257 $ write sys$output "Generate and certify a test certificate via the 'ca' program"
262 $! write sys$output "test AES"
263 $! !mcr 'texe_dir''aestest'
267 $ define/user sys$output nla0:
268 $ mcr 'exe_dir'openssl no-rsa
269 $ save_severity=$SEVERITY
273 $ write sys$output "skipping testtsa.com test -- requires RSA"
279 $ write sys$output "Test IGE mode"
280 $ mcr 'texe_dir''igetest'
283 $ write sys$output "Test JPAKE"
284 $ mcr 'texe_dir''jpaketest'
289 $ set default '__save_default'