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 $ ROOT = F$PARSE("sys$disk:[-]A.;0",,,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
18 $ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
19 $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
20 - ".][000000" - "[000000." - "][" - "[" - "]"
21 $ ROOT = ROOT_DEV + "[" + ROOT_DIR
22 $ DEFINE/NOLOG SSLROOT 'ROOT'.APPS.] /TRANS=CONC
23 $ openssl_conf := sslroot:[000000]openssl-vms.cnf
25 $ on control_y then goto exit
26 $ on error then goto exit
32 $! NOTE: This list reflects the list of dependencies following the
33 $! "alltests" target in Makefile. This should make it easy to see
34 $! if there's a difference that needs to be taken care of.
36 test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,-
37 test_md2,test_mdc2,test_wp,-
38 test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_aes,-
39 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,-
40 test_enc,test_x509,test_rsa,test_crl,test_sid,-
41 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
42 test_ss,test_ca,test_engine,test_evp,test_ssl,test_tsa,test_ige,-
45 $ tests = f$edit(tests,"COLLAPSE")
49 $ ECDSATEST := ecdsatest
50 $ ECDHTEST := ecdhtest
52 $ IDEATEST := ideatest
54 $ SHA1TEST := sha1test
55 $ MDC2TEST := mdc2test
60 $ HMACTEST := hmactest
66 $ CASTTEST := casttest
68 $ RANDTEST := randtest
71 $ METHTEST := methtest
74 $ ENGINETEST := enginetest
77 $ JPAKETEST := jpaketest
81 $ tests_e = f$element(tests_i,",",tests)
82 $ tests_i = tests_i + 1
83 $ if tests_e .eqs. "," then goto exit
84 $ write sys$output "---> ''tests_e'"
89 $ mcr 'texe_dir''evptest' 'ROOT'.CRYPTO.EVP]evptests.txt
92 $ mcr 'texe_dir''destest'
95 $ mcr 'texe_dir''ideatest'
98 $ mcr 'texe_dir''shatest'
99 $ mcr 'texe_dir''sha1test'
102 $ mcr 'texe_dir''mdc2test'
105 $ mcr 'texe_dir''md5test'
108 $ mcr 'texe_dir''md4test'
111 $ mcr 'texe_dir''hmactest'
114 $ mcr 'texe_dir''wptest'
117 $ mcr 'texe_dir''md2test'
120 $ mcr 'texe_dir''rmdtest'
123 $ mcr 'texe_dir''bftest'
126 $ mcr 'texe_dir''casttest'
129 $ mcr 'texe_dir''rc2test'
132 $ mcr 'texe_dir''rc4test'
135 $ mcr 'texe_dir''rc5test'
138 $ mcr 'texe_dir''randtest'
144 $ define sys$error nla0:
145 $ write sys$output "test normal x509v1 certificate"
147 $ write sys$output "test first x509v3 certificate"
148 $ @tx509.com v3-cert1.pem
149 $ write sys$output "test second x509v3 certificate"
150 $ @tx509.com v3-cert2.pem
154 $ define sys$error nla0:
157 $ mcr 'texe_dir''rsatest'
160 $ define sys$error nla0:
165 $ define sys$error nla0:
170 $ define sys$error nla0:
172 $ @treq.com testreq2.pem
176 $ define sys$error nla0:
183 "starting big number library test, could take a while..."
185 $ define sys$error nl:
186 $ define sys$output nl:
190 $ deassign sys$output
191 $ on control_y then goto exit
192 $ on error then goto exit
195 $ create /fdl = sys$input bntest-vms.tmp
197 ORGANIZATION sequential
200 $ define /user_mode sys$output bntest-vms.tmp
201 $ mcr 'texe_dir''bntest'
202 $ define /user_mode sys$input bntest-vms.tmp
203 $ define /user_mode sys$output bntest-vms.out
205 $ @ bntest.com bntest-vms.out
209 $ delete bntest-vms.out;*
210 $ delete bntest-vms.tmp;*
213 $ create /fdl = sys$input bntest-vms.sh
215 ORGANIZATION sequential
218 $ open /append bntest_file bntest-vms.sh
219 $ type /output = bntest_file sys$input:
220 << __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"'
221 $ define/user sys$output bntest-vms.tmp
222 $ mcr 'texe_dir''bntest'
223 $ copy bntest-vms.tmp bntest_file
224 $ delete bntest-vms.tmp;*
225 $ type /output = bntest_file sys$input:
228 $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
229 $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
230 $ write sys$output "-- went well."
231 $ write sys$output ""
233 $ write sys$output "test a^b%c implementations"
234 $ mcr 'texe_dir''exptest'
237 $ write sys$output "test elliptic curves"
238 $ mcr 'texe_dir''ectest'
241 $ write sys$output "test ecdsa"
242 $ mcr 'texe_dir''ecdsatest'
245 $ write sys$output "test ecdh"
246 $ mcr 'texe_dir''ecdhtest'
249 $ write sys$output "The following command should have some OK's and some failures"
250 $ write sys$output "There are definitly a few expired certificates"
254 $ write sys$output "Generate a set of DH parameters"
255 $ mcr 'texe_dir''dhtest'
258 $ write sys$output "Generate a set of DSA parameters"
259 $ mcr 'texe_dir''dsatest'
262 $ write sys$output "Generate and verify a certificate request"
266 $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT"))
267 $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then -
269 $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
271 $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
275 $ write sys$output "Generate and certify a test certificate"
279 $ write sys$output "Manipulate the ENGINE structures"
280 $ mcr 'texe_dir''enginetest'
283 $ write sys$output "test SSL protocol"
284 $ gosub maybe_test_ss
285 $ @testssl.com keyU.ss certU.ss certCA.ss
289 $ define/user sys$output nla0:
290 $ mcr 'exe_dir'openssl no-rsa
291 $ save_severity=$SEVERITY
295 $ write sys$output "skipping CA.com test -- requires RSA"
297 $ write sys$output "Generate and certify a test certificate via the 'ca' program"
302 $! write sys$output "test AES"
303 $! !mcr 'texe_dir''aestest'
307 $ define/user sys$output nla0:
308 $ mcr 'exe_dir'openssl no-rsa
309 $ save_severity=$SEVERITY
313 $ write sys$output "skipping testtsa.com test -- requires RSA"
319 $ write sys$output "Test IGE mode"
320 $ mcr 'texe_dir''igetest'
323 $ write sys$output "Test JPAKE"
324 $ mcr 'texe_dir''jpaketest'
327 $ write sys$output "CMS consistency test"
328 $ ! The following makes perl include the DCL symbol table in the env.
329 $ define/user perl_env_tables clisym_local,lnm$file_dev,ctrl_env
335 $ mcr 'exe_dir'openssl version -a
336 $ set default '__save_default'