Switch to new version numbering scheme.
[openssl.git] / test / tests.com
1 $! TESTS.COM  --  Performs the necessary tests
2 $!
3 $! P1   tests to be performed.  Empty means all.
4 $
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")
8 $       __arch := VAX
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]
12 $
13 $       set default '__here'
14 $       on control_y then goto exit
15 $       on error then goto exit
16 $
17 $       if p1 .nes. ""
18 $       then
19 $           tests = p1
20 $       else
21 $           tests := -
22         test_des,test_idea,test_sha,test_md5,test_hmac,test_md2,test_mdc2,-
23         test_rc2,test_rc4,test_rc5,test_bf,test_cast,-
24         test_rand,test_bn,test_enc,test_x509,test_rsa,test_crl,test_sid,-
25         test_reqgen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
26         test_ss,test_ssl,test_ca
27 $       endif
28 $       tests = f$edit(tests,"COLLAPSE")
29 $
30 $       BNTEST :=       bntest
31 $       EXPTEST :=      exptest
32 $       IDEATEST :=     ideatest
33 $       SHATEST :=      shatest
34 $       SHA1TEST :=     sha1test
35 $       MDC2TEST :=     mdc2test
36 $       RMDTEST :=      rmdtest
37 $       MD2TEST :=      md2test
38 $       MD5TEST :=      md5test
39 $       HMACTEST :=     hmactest
40 $       RC2TEST :=      rc2test
41 $       RC4TEST :=      rc4test
42 $       RC5TEST :=      rc5test
43 $       BFTEST :=       bftest
44 $       CASTTEST :=     casttest
45 $       DESTEST :=      destest
46 $       RANDTEST :=     randtest
47 $       DHTEST :=       dhtest
48 $       DSATEST :=      dsatest
49 $       METHTEST :=     methtest
50 $       SSLTEST :=      ssltest
51 $       RSATEST :=      rsa_oaep_test
52 $
53 $       tests_i = 0
54 $ loop_tests:
55 $       tests_e = f$element(tests_i,",",tests)
56 $       tests_i = tests_i + 1
57 $       if tests_e .eqs. "," then goto exit
58 $       goto 'tests_e'
59 $
60 $ test_des:
61 $       mcr 'texe_dir''destest'
62 $       goto loop_tests
63 $ test_idea:
64 $       mcr 'texe_dir''ideatest'
65 $       goto loop_tests
66 $ test_sha:
67 $       mcr 'texe_dir''shatest'
68 $       mcr 'texe_dir''sha1test'
69 $       goto loop_tests
70 $ test_mdc2:
71 $       mcr 'texe_dir''mdc2test'
72 $       goto loop_tests
73 $ test_md5:
74 $       mcr 'texe_dir''md5test'
75 $       goto loop_tests
76 $ test_hmac:
77 $       mcr 'texe_dir''hmactest'
78 $       goto loop_tests
79 $ test_md2:
80 $       mcr 'texe_dir''md2test'
81 $       goto loop_tests
82 $ test_rmd:
83 $       mcr 'texe_dir''rmdtest'
84 $       goto loop_tests
85 $ test_bf:
86 $       mcr 'texe_dir''bftest'
87 $       goto loop_tests
88 $ test_cast:
89 $       mcr 'texe_dir''casttest'
90 $       goto loop_tests
91 $ test_rc2:
92 $       mcr 'texe_dir''rc2test'
93 $       goto loop_tests
94 $ test_rc4:
95 $       mcr 'texe_dir''rc4test'
96 $       goto loop_tests
97 $ test_rc5:
98 $       mcr 'texe_dir''rc5test'
99 $       goto loop_tests
100 $ test_rand:
101 $       mcr 'texe_dir''randtest'
102 $       goto loop_tests
103 $ test_enc:
104 $       @testenc.com
105 $       goto loop_tests
106 $ test_x509:
107 $       define sys$error nla0:
108 $       write sys$output "test normal x509v1 certificate"
109 $       @tx509.com
110 $       write sys$output "test first x509v3 certificate"
111 $       @tx509.com v3-cert1.pem
112 $       write sys$output "test second x509v3 certificate"
113 $       @tx509.com v3-cert2.pem
114 $       deassign sys$error
115 $       goto loop_tests
116 $ test_rsa:
117 $       define sys$error nla0:
118 $       @trsa.com
119 $       deassign sys$error
120 $       mcr 'texe_dir''rsatest'
121 $       goto loop_tests
122 $ test_crl:
123 $       define sys$error nla0:
124 $       @tcrl.com
125 $       deassign sys$error
126 $       goto loop_tests
127 $ test_sid:
128 $       define sys$error nla0:
129 $       @tsid.com
130 $       deassign sys$error
131 $       goto loop_tests
132 $ test_req:
133 $       define sys$error nla0:
134 $       @treq.com
135 $       @treq.com testreq2.pem
136 $       deassign sys$error
137 $       goto loop_tests
138 $ test_pkcs7:
139 $       define sys$error nla0:
140 $       @tpkcs7.com
141 $       @tpkcs7d.com
142 $       deassign sys$error
143 $       goto loop_tests
144 $ test_bn:
145 $       write sys$output "starting big number library test, could take a while..."
146 $       create bntest-vms.fdl
147 FILE
148         ORGANIZATION    sequential
149 RECORD
150         FORMAT          stream_lf
151 $       create/fdl=bntest-vms.fdl bntest-vms.sh
152 $       open/append foo bntest-vms.sh
153 $       type/output=foo: sys$input:
154 << __FOO__ bc | awk '{ \
155 if ($$0 != "0") {print "error"; exit(1); } \
156 if (((NR+1)%64) == 0) print NR+1," tests done"; }'
157 $       define/user sys$output bntest-vms.tmp
158 $       mcr 'texe_dir''bntest'
159 $       copy bntest-vms.tmp foo:
160 $       delete bntest-vms.tmp;*
161 $       type/output=foo: sys$input:
162 __FOO__
163 $       close foo
164 $       write sys$output "-- copy the [.test]bntest-vms.sh file to a Unix system and run it"
165 $       write sys$output "-- through sh or bash to verify that the bignum operations went well."
166 $       write sys$output ""
167 $       write sys$output "test a^b%c implementations"
168 $       mcr 'texe_dir''exptest'
169 $       goto loop_tests
170 $ test_verify:
171 $       write sys$output "The following command should have some OK's and some failures"
172 $       write sys$output "There are definitly a few expired certificates"
173 $       @tverify.com
174 $       goto loop_tests
175 $ test_dh:
176 $       write sys$output "Generate as set of DH parameters"
177 $       mcr 'texe_dir''dhtest'
178 $       goto loop_tests
179 $ test_dsa:
180 $       write sys$output "Generate as set of DSA parameters"
181 $       mcr 'texe_dir''dsatest'
182 $       goto loop_tests
183 $ test_reqgen:
184 $       write sys$output "Generate and verify a certificate request"
185 $       @testgen.com
186 $       goto loop_tests
187 $ test_ss:
188 $       write sys$output "Generate and certify a test certificate"
189 $       @testss.com
190 $       goto loop_tests
191 $ test_ssl:
192 $       write sys$output "test SSL protocol"
193 $       @testssl.com
194 $       goto loop_tests
195 $ test_ca:
196 $       write sys$output "Generate and certify a test certificate via the 'ca' program"
197 $       @testca.com
198 $       goto loop_tests
199 $
200 $
201 $ exit:
202 $       set default '__save_default'
203 $       exit