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'
17 $ openssl_conf := sslroot:[000000]openssl-vms.cnf
19 $ set default '__here'
21 $ on control_y then goto exit
22 $ on error then goto exit
28 $! NOTE: This list reflects the list of dependencies following the
29 $! "alltests" target in Makefile. This should make it easy to see
30 $! if there's a difference that needs to be taken care of.
32 test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,-
33 test_md2,test_mdc2,test_wp,-
34 test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_aes,-
35 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,-
36 test_enc,test_x509,test_rsa,test_crl,test_sid,-
37 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
38 test_ss,test_ca,test_engine,test_evp,test_ssl,test_tsa,test_ige,-
41 $ tests = f$edit(tests,"COLLAPSE")
45 $ ECDSATEST := ecdsatest
46 $ ECDHTEST := ecdhtest
48 $ IDEATEST := ideatest
50 $ SHA1TEST := sha1test
51 $ MDC2TEST := mdc2test
56 $ HMACTEST := hmactest
62 $ CASTTEST := casttest
64 $ RANDTEST := randtest
67 $ METHTEST := methtest
70 $ ENGINETEST := enginetest
73 $ JPAKETEST := jpaketest
77 $ tests_e = f$element(tests_i,",",tests)
78 $ tests_i = tests_i + 1
79 $ if tests_e .eqs. "," then goto exit
80 $ write sys$output "---> ''tests_e'"
85 $ mcr 'texe_dir''evptest' evptests.txt
88 $ mcr 'texe_dir''destest'
91 $ mcr 'texe_dir''ideatest'
94 $ mcr 'texe_dir''shatest'
95 $ mcr 'texe_dir''sha1test'
98 $ mcr 'texe_dir''mdc2test'
101 $ mcr 'texe_dir''md5test'
104 $ mcr 'texe_dir''md4test'
107 $ mcr 'texe_dir''hmactest'
110 $ mcr 'texe_dir''wptest'
113 $ mcr 'texe_dir''md2test'
116 $ mcr 'texe_dir''rmdtest'
119 $ mcr 'texe_dir''bftest'
122 $ mcr 'texe_dir''casttest'
125 $ mcr 'texe_dir''rc2test'
128 $ mcr 'texe_dir''rc4test'
131 $ mcr 'texe_dir''rc5test'
134 $ mcr 'texe_dir''randtest'
140 $ define sys$error nla0:
141 $ write sys$output "test normal x509v1 certificate"
143 $ write sys$output "test first x509v3 certificate"
144 $ @tx509.com v3-cert1.pem
145 $ write sys$output "test second x509v3 certificate"
146 $ @tx509.com v3-cert2.pem
150 $ define sys$error nla0:
153 $ mcr 'texe_dir''rsatest'
156 $ define sys$error nla0:
161 $ define sys$error nla0:
166 $ define sys$error nla0:
168 $ @treq.com testreq2.pem
172 $ define sys$error nla0:
178 $ write sys$output "starting big number library test, could take a while..."
179 $ create bntest-vms.fdl
181 ORGANIZATION sequential
184 $ create/fdl=bntest-vms.fdl bntest-vms.sh
185 $ open/append foo bntest-vms.sh
186 $ type/output=foo: sys$input:
187 << __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"'
188 $ define/user sys$output bntest-vms.tmp
189 $ mcr 'texe_dir''bntest'
190 $ copy bntest-vms.tmp foo:
191 $ delete bntest-vms.tmp;*
192 $ type/output=foo: sys$input:
195 $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
196 $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
197 $ write sys$output "-- went well."
198 $ write sys$output ""
199 $ write sys$output "test a^b%c implementations"
200 $ mcr 'texe_dir''exptest'
203 $ write sys$output "test elliptic curves"
204 $ mcr 'texe_dir''ectest'
207 $ write sys$output "test ecdsa"
208 $ mcr 'texe_dir''ecdsatest'
211 $ write sys$output "test ecdh"
212 $ mcr 'texe_dir''ecdhtest'
215 $ write sys$output "The following command should have some OK's and some failures"
216 $ write sys$output "There are definitly a few expired certificates"
220 $ write sys$output "Generate a set of DH parameters"
221 $ mcr 'texe_dir''dhtest'
224 $ write sys$output "Generate a set of DSA parameters"
225 $ mcr 'texe_dir''dsatest'
228 $ write sys$output "Generate and verify a certificate request"
232 $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT"))
233 $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then -
235 $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
237 $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
241 $ write sys$output "Generate and certify a test certificate"
245 $ write sys$output "Manipulate the ENGINE structures"
246 $ mcr 'texe_dir''enginetest'
249 $ write sys$output "test SSL protocol"
250 $ gosub maybe_test_ss
251 $ @testssl.com keyU.ss certU.ss certCA.ss
255 $ define/user sys$output nla0:
256 $ mcr 'exe_dir'openssl no-rsa
257 $ save_severity=$SEVERITY
261 $ write sys$output "skipping CA.com test -- requires RSA"
263 $ write sys$output "Generate and certify a test certificate via the 'ca' program"
268 $! write sys$output "test AES"
269 $! !mcr 'texe_dir''aestest'
273 $ define/user sys$output nla0:
274 $ mcr 'exe_dir'openssl no-rsa
275 $ save_severity=$SEVERITY
279 $ write sys$output "skipping testtsa.com test -- requires RSA"
285 $ write sys$output "Test IGE mode"
286 $ mcr 'texe_dir''igetest'
289 $ write sys$output "Test JPAKE"
290 $ mcr 'texe_dir''jpaketest'
293 $ write sys$output "CMS consistency test"
294 $ ! The following makes perl include the DCL symbol table in the env.
295 $ define/user perl_env_tables clisym_local,lnm$file_dev,ctrl_env
301 $ mcr 'exe_dir'openssl version -a
302 $ set default '__save_default'