diff options
Diffstat (limited to 'src/lib/libssl/test')
-rw-r--r-- | src/lib/libssl/test/Makefile.ssl | 648 | ||||
-rw-r--r-- | src/lib/libssl/test/dummytest.c | 47 | ||||
-rw-r--r-- | src/lib/libssl/test/enginetest.c | 274 | ||||
-rw-r--r-- | src/lib/libssl/test/maketests.com | 1087 | ||||
-rw-r--r-- | src/lib/libssl/test/md4test.c | 134 | ||||
-rw-r--r-- | src/lib/libssl/test/rsa_test.c | 318 | ||||
-rw-r--r-- | src/lib/libssl/test/tcrl.com | 81 | ||||
-rw-r--r-- | src/lib/libssl/test/testca.com | 78 | ||||
-rw-r--r-- | src/lib/libssl/test/testenc.com | 60 | ||||
-rw-r--r-- | src/lib/libssl/test/testgen.com | 52 | ||||
-rw-r--r-- | src/lib/libssl/test/tests.com | 246 | ||||
-rw-r--r-- | src/lib/libssl/test/testss.com | 118 | ||||
-rw-r--r-- | src/lib/libssl/test/testssl.com | 190 | ||||
-rw-r--r-- | src/lib/libssl/test/tpkcs7.com | 52 | ||||
-rw-r--r-- | src/lib/libssl/test/tpkcs7d.com | 45 | ||||
-rw-r--r-- | src/lib/libssl/test/treq.com | 81 | ||||
-rw-r--r-- | src/lib/libssl/test/trsa.com | 92 | ||||
-rw-r--r-- | src/lib/libssl/test/tsid.com | 81 | ||||
-rw-r--r-- | src/lib/libssl/test/tverify.com | 26 | ||||
-rw-r--r-- | src/lib/libssl/test/tx509.com | 81 |
20 files changed, 3791 insertions, 0 deletions
diff --git a/src/lib/libssl/test/Makefile.ssl b/src/lib/libssl/test/Makefile.ssl new file mode 100644 index 0000000000..c1408021ba --- /dev/null +++ b/src/lib/libssl/test/Makefile.ssl | |||
@@ -0,0 +1,648 @@ | |||
1 | # | ||
2 | # test/Makefile.ssl | ||
3 | # | ||
4 | |||
5 | DIR= test | ||
6 | TOP= .. | ||
7 | CC= cc | ||
8 | INCLUDES= -I$(TOP) -I../include $(KRB5_INCLUDES) | ||
9 | CFLAG= -g | ||
10 | INSTALL_PREFIX= | ||
11 | OPENSSLDIR= /usr/local/ssl | ||
12 | INSTALLTOP= /usr/local/ssl | ||
13 | MAKEFILE= Makefile.ssl | ||
14 | MAKE= make -f $(MAKEFILE) | ||
15 | MAKEDEPPROG= makedepend | ||
16 | MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) | ||
17 | PERL= perl | ||
18 | |||
19 | PEX_LIBS= | ||
20 | EX_LIBS= #-lnsl -lsocket | ||
21 | |||
22 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
23 | |||
24 | GENERAL=Makefile.ssl maketests.com \ | ||
25 | tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \ | ||
26 | tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \ | ||
27 | testca.com VMSca-response.1 VMSca-response.2 | ||
28 | |||
29 | DLIBCRYPTO= ../libcrypto.a | ||
30 | DLIBSSL= ../libssl.a | ||
31 | LIBCRYPTO= -L.. -lcrypto | ||
32 | LIBSSL= -L.. -lssl | ||
33 | |||
34 | BNTEST= bntest | ||
35 | ECTEST= ectest | ||
36 | EXPTEST= exptest | ||
37 | IDEATEST= ideatest | ||
38 | SHATEST= shatest | ||
39 | SHA1TEST= sha1test | ||
40 | MDC2TEST= mdc2test | ||
41 | RMDTEST= rmdtest | ||
42 | MD2TEST= md2test | ||
43 | MD4TEST= md4test | ||
44 | MD5TEST= md5test | ||
45 | HMACTEST= hmactest | ||
46 | RC2TEST= rc2test | ||
47 | RC4TEST= rc4test | ||
48 | RC5TEST= rc5test | ||
49 | BFTEST= bftest | ||
50 | CASTTEST= casttest | ||
51 | DESTEST= destest | ||
52 | RANDTEST= randtest | ||
53 | DHTEST= dhtest | ||
54 | DSATEST= dsatest | ||
55 | METHTEST= methtest | ||
56 | SSLTEST= ssltest | ||
57 | RSATEST= rsa_test | ||
58 | ENGINETEST= enginetest | ||
59 | EVPTEST= evp_test | ||
60 | |||
61 | TESTS= alltests | ||
62 | |||
63 | EXE= $(BNTEST) $(ECTEST) $(IDEATEST) $(MD2TEST) $(MD4TEST) $(MD5TEST) $(HMACTEST) \ | ||
64 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | ||
65 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | ||
66 | $(RANDTEST) $(DHTEST) $(ENGINETEST) \ | ||
67 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(RSATEST) \ | ||
68 | $(EVPTEST) | ||
69 | |||
70 | # $(METHTEST) | ||
71 | |||
72 | OBJ= $(BNTEST).o $(ECTEST).o $(IDEATEST).o $(MD2TEST).o $(MD4TEST).o $(MD5TEST).o \ | ||
73 | $(HMACTEST).o \ | ||
74 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | ||
75 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | ||
76 | $(RANDTEST).o $(DHTEST).o $(ENGINETEST).o $(CASTTEST).o \ | ||
77 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o \ | ||
78 | $(EVPTEST).o | ||
79 | SRC= $(BNTEST).c $(ECTEST).c $(IDEATEST).c $(MD2TEST).c $(MD4TEST).c $(MD5TEST).c \ | ||
80 | $(HMACTEST).c \ | ||
81 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | ||
82 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | ||
83 | $(RANDTEST).c $(DHTEST).c $(ENGINETEST).c $(CASTTEST).c \ | ||
84 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c \ | ||
85 | $(EVPTEST).c | ||
86 | |||
87 | EXHEADER= | ||
88 | HEADER= $(EXHEADER) | ||
89 | |||
90 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
91 | |||
92 | top: | ||
93 | (cd ..; $(MAKE) DIRS=$(DIR) TESTS=$(TESTS) all) | ||
94 | |||
95 | all: exe | ||
96 | |||
97 | exe: $(EXE) dummytest | ||
98 | |||
99 | files: | ||
100 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
101 | |||
102 | links: | ||
103 | @sh $(TOP)/util/point.sh Makefile.ssl Makefile | ||
104 | |||
105 | generate: $(SRC) | ||
106 | $(SRC): | ||
107 | @sh $(TOP)/util/point.sh dummytest.c $@ | ||
108 | |||
109 | errors: | ||
110 | |||
111 | install: | ||
112 | |||
113 | tags: | ||
114 | ctags $(SRC) | ||
115 | |||
116 | tests: exe apps $(TESTS) | ||
117 | |||
118 | apps: | ||
119 | @(cd ../apps; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all) | ||
120 | |||
121 | alltests: | ||
122 | (LIBPATH="`cd ..; pwd`"; LD_LIBRARY_PATH=$$LIBPATH; DYLD_LIBRARY_PATH=$$LIBPATH; SHLIB_PATH=$$LIBPATH; \ | ||
123 | export LD_LIBRARY_PATH DYLD_LIBRARY_PATH SHLIB_PATH LIBPATH; \ | ||
124 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' alltests.chooser) | ||
125 | alltests.chooser: \ | ||
126 | test_des test_idea test_sha test_md4 test_md5 test_hmac \ | ||
127 | test_md2 test_mdc2 \ | ||
128 | test_rmd test_rc2 test_rc4 test_rc5 test_bf test_cast test_rd \ | ||
129 | test_rand test_bn test_ec test_enc test_x509 test_rsa test_crl test_sid \ | ||
130 | test_gen test_req test_pkcs7 test_verify test_dh test_dsa \ | ||
131 | test_ss test_ca test_engine test_evp test_ssl | ||
132 | |||
133 | test_evp: | ||
134 | ./$(EVPTEST) evptests.txt | ||
135 | |||
136 | test_des: | ||
137 | ./$(DESTEST) | ||
138 | |||
139 | test_idea: | ||
140 | ./$(IDEATEST) | ||
141 | |||
142 | test_sha: | ||
143 | ./$(SHATEST) | ||
144 | ./$(SHA1TEST) | ||
145 | |||
146 | test_mdc2: | ||
147 | ./$(MDC2TEST) | ||
148 | |||
149 | test_md5: | ||
150 | ./$(MD5TEST) | ||
151 | |||
152 | test_md4: | ||
153 | ./$(MD4TEST) | ||
154 | |||
155 | test_hmac: | ||
156 | ./$(HMACTEST) | ||
157 | |||
158 | test_md2: | ||
159 | ./$(MD2TEST) | ||
160 | |||
161 | test_rmd: | ||
162 | ./$(RMDTEST) | ||
163 | |||
164 | test_bf: | ||
165 | ./$(BFTEST) | ||
166 | |||
167 | test_cast: | ||
168 | ./$(CASTTEST) | ||
169 | |||
170 | test_rc2: | ||
171 | ./$(RC2TEST) | ||
172 | |||
173 | test_rc4: | ||
174 | ./$(RC4TEST) | ||
175 | |||
176 | test_rc5: | ||
177 | ./$(RC5TEST) | ||
178 | |||
179 | test_rand: | ||
180 | ./$(RANDTEST) | ||
181 | |||
182 | test_enc: | ||
183 | @sh ./testenc | ||
184 | |||
185 | test_x509: | ||
186 | echo test normal x509v1 certificate | ||
187 | sh ./tx509 2>/dev/null | ||
188 | echo test first x509v3 certificate | ||
189 | sh ./tx509 v3-cert1.pem 2>/dev/null | ||
190 | echo test second x509v3 certificate | ||
191 | sh ./tx509 v3-cert2.pem 2>/dev/null | ||
192 | |||
193 | test_rsa: | ||
194 | @sh ./trsa 2>/dev/null | ||
195 | ./$(RSATEST) | ||
196 | |||
197 | test_crl: | ||
198 | @sh ./tcrl 2>/dev/null | ||
199 | |||
200 | test_sid: | ||
201 | @sh ./tsid 2>/dev/null | ||
202 | |||
203 | test_req: | ||
204 | @sh ./treq 2>/dev/null | ||
205 | @sh ./treq testreq2.pem 2>/dev/null | ||
206 | |||
207 | test_pkcs7: | ||
208 | @sh ./tpkcs7 2>/dev/null | ||
209 | @sh ./tpkcs7d 2>/dev/null | ||
210 | |||
211 | test_bn: | ||
212 | @echo starting big number library test, could take a while... | ||
213 | @./$(BNTEST) >tmp.bntest | ||
214 | @echo quit >>tmp.bntest | ||
215 | @echo "running bc" | ||
216 | @<tmp.bntest sh -c "`sh ./bctest ignore`" | $(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"' | ||
217 | @echo 'test a^b%c implementations' | ||
218 | ./$(EXPTEST) | ||
219 | |||
220 | test_ec: | ||
221 | @echo 'test elliptic curves' | ||
222 | ./$(ECTEST) | ||
223 | |||
224 | test_verify: | ||
225 | @echo "The following command should have some OK's and some failures" | ||
226 | @echo "There are definitly a few expired certificates" | ||
227 | ../apps/openssl verify -CApath ../certs ../certs/*.pem | ||
228 | |||
229 | test_dh: | ||
230 | @echo "Generate a set of DH parameters" | ||
231 | ./$(DHTEST) | ||
232 | |||
233 | test_dsa: | ||
234 | @echo "Generate a set of DSA parameters" | ||
235 | ./$(DSATEST) | ||
236 | ./$(DSATEST) -app2_1 | ||
237 | |||
238 | test_gen: | ||
239 | @echo "Generate and verify a certificate request" | ||
240 | @sh ./testgen | ||
241 | |||
242 | test_ss keyU.ss certU.ss certCA.ss: testss | ||
243 | @echo "Generate and certify a test certificate" | ||
244 | @sh ./testss | ||
245 | |||
246 | test_engine: | ||
247 | @echo "Manipulate the ENGINE structures" | ||
248 | ./$(ENGINETEST) | ||
249 | |||
250 | test_ssl: keyU.ss certU.ss certCA.ss | ||
251 | @echo "test SSL protocol" | ||
252 | @sh ./testssl keyU.ss certU.ss certCA.ss | ||
253 | |||
254 | test_ca: | ||
255 | @if ../apps/openssl no-rsa; then \ | ||
256 | echo "skipping CA.sh test -- requires RSA"; \ | ||
257 | else \ | ||
258 | echo "Generate and certify a test certificate via the 'ca' program"; \ | ||
259 | sh ./testca; \ | ||
260 | fi | ||
261 | |||
262 | test_rd: #$(RDTEST) | ||
263 | # @echo "test Rijndael" | ||
264 | # ./$(RDTEST) | ||
265 | |||
266 | lint: | ||
267 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
268 | |||
269 | depend: | ||
270 | $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(SRC) | ||
271 | |||
272 | dclean: | ||
273 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
274 | mv -f Makefile.new $(MAKEFILE) | ||
275 | |||
276 | clean: | ||
277 | rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss *.srl log | ||
278 | |||
279 | $(DLIBSSL): | ||
280 | (cd ../ssl; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}') | ||
281 | |||
282 | $(DLIBCRYPTO): | ||
283 | (cd ../crypto; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}') | ||
284 | |||
285 | $(RSATEST): $(RSATEST).o $(DLIBCRYPTO) | ||
286 | $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
287 | |||
288 | $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) | ||
289 | $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
290 | |||
291 | $(ECTEST): $(ECTEST).o $(DLIBCRYPTO) | ||
292 | $(CC) -o $(ECTEST) $(CFLAGS) $(ECTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
293 | |||
294 | $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) | ||
295 | $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
296 | |||
297 | $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) | ||
298 | $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
299 | |||
300 | $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) | ||
301 | $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
302 | |||
303 | $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) | ||
304 | $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
305 | |||
306 | $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) | ||
307 | $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
308 | |||
309 | $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) | ||
310 | $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
311 | |||
312 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) | ||
313 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
314 | |||
315 | $(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO) | ||
316 | $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
317 | |||
318 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) | ||
319 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
320 | |||
321 | $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) | ||
322 | $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
323 | |||
324 | $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) | ||
325 | $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
326 | |||
327 | $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) | ||
328 | $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
329 | |||
330 | $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) | ||
331 | $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
332 | |||
333 | $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) | ||
334 | $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
335 | |||
336 | $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) | ||
337 | $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
338 | |||
339 | $(DESTEST): $(DESTEST).o $(DLIBCRYPTO) | ||
340 | $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
341 | |||
342 | $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) | ||
343 | $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
344 | |||
345 | $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) | ||
346 | $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
347 | |||
348 | $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) | ||
349 | $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
350 | |||
351 | $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) | ||
352 | $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
353 | |||
354 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | ||
355 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) | ||
356 | |||
357 | $(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO) | ||
358 | $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
359 | |||
360 | $(EVPTEST): $(EVPTEST).o $(DLIBCRYPTO) | ||
361 | $(CC) -o $(EVPTEST) $(CFLAGS) $(EVPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
362 | |||
363 | #$(RDTEST).o: $(RDTEST).c | ||
364 | # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(RDTEST).c | ||
365 | |||
366 | #$(RDTEST): $(RDTEST).o $(DLIBCRYPTO) | ||
367 | # $(CC) -o $(RDTEST) $(CFLAGS) $(RDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
368 | |||
369 | dummytest: dummytest.o $(DLIBCRYPTO) | ||
370 | $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
371 | |||
372 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
373 | |||
374 | bftest.o: ../include/openssl/blowfish.h ../include/openssl/e_os2.h | ||
375 | bftest.o: ../include/openssl/opensslconf.h bftest.c | ||
376 | bntest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h | ||
377 | bntest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
378 | bntest.o: ../include/openssl/bn.h ../include/openssl/buffer.h | ||
379 | bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | ||
380 | bntest.o: ../include/openssl/des.h ../include/openssl/des_old.h | ||
381 | bntest.o: ../include/openssl/dh.h ../include/openssl/dsa.h | ||
382 | bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h | ||
383 | bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
384 | bntest.o: ../include/openssl/lhash.h ../include/openssl/md2.h | ||
385 | bntest.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
386 | bntest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
387 | bntest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | ||
388 | bntest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h | ||
389 | bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | ||
390 | bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | ||
391 | bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | ||
392 | bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | ||
393 | bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h | ||
394 | bntest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h | ||
395 | bntest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h | ||
396 | bntest.o: ../include/openssl/x509_vfy.h bntest.c | ||
397 | casttest.o: ../include/openssl/cast.h casttest.c | ||
398 | destest.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
399 | destest.o: ../include/openssl/des_old.h ../include/openssl/e_os2.h | ||
400 | destest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
401 | destest.o: ../include/openssl/safestack.h ../include/openssl/stack.h | ||
402 | destest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h | ||
403 | destest.o: ../include/openssl/ui_compat.h destest.c | ||
404 | dhtest.o: ../include/openssl/bio.h ../include/openssl/bn.h | ||
405 | dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h | ||
406 | dhtest.o: ../include/openssl/e_os2.h ../include/openssl/err.h | ||
407 | dhtest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | ||
408 | dhtest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h | ||
409 | dhtest.o: ../include/openssl/rand.h ../include/openssl/safestack.h | ||
410 | dhtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h dhtest.c | ||
411 | dsatest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
412 | dsatest.o: ../include/openssl/bn.h ../include/openssl/crypto.h | ||
413 | dsatest.o: ../include/openssl/dh.h ../include/openssl/dsa.h | ||
414 | dsatest.o: ../include/openssl/e_os2.h ../include/openssl/engine.h | ||
415 | dsatest.o: ../include/openssl/err.h ../include/openssl/lhash.h | ||
416 | dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
417 | dsatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h | ||
418 | dsatest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | ||
419 | dsatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
420 | dsatest.o: ../include/openssl/ui.h dsatest.c | ||
421 | ectest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
422 | ectest.o: ../include/openssl/bn.h ../include/openssl/crypto.h | ||
423 | ectest.o: ../include/openssl/dh.h ../include/openssl/dsa.h | ||
424 | ectest.o: ../include/openssl/e_os2.h ../include/openssl/ec.h | ||
425 | ectest.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
426 | ectest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | ||
427 | ectest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h | ||
428 | ectest.o: ../include/openssl/rand.h ../include/openssl/rsa.h | ||
429 | ectest.o: ../include/openssl/safestack.h ../include/openssl/stack.h | ||
430 | ectest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h ectest.c | ||
431 | enginetest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
432 | enginetest.o: ../include/openssl/bn.h ../include/openssl/buffer.h | ||
433 | enginetest.o: ../include/openssl/crypto.h ../include/openssl/dh.h | ||
434 | enginetest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
435 | enginetest.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
436 | enginetest.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h | ||
437 | enginetest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h | ||
438 | enginetest.o: ../include/openssl/rand.h ../include/openssl/rsa.h | ||
439 | enginetest.o: ../include/openssl/safestack.h ../include/openssl/stack.h | ||
440 | enginetest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h | ||
441 | enginetest.o: enginetest.c | ||
442 | evp_test.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
443 | evp_test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
444 | evp_test.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
445 | evp_test.o: ../include/openssl/conf.h ../include/openssl/crypto.h | ||
446 | evp_test.o: ../include/openssl/des.h ../include/openssl/des_old.h | ||
447 | evp_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h | ||
448 | evp_test.o: ../include/openssl/e_os2.h ../include/openssl/engine.h | ||
449 | evp_test.o: ../include/openssl/err.h ../include/openssl/evp.h | ||
450 | evp_test.o: ../include/openssl/idea.h ../include/openssl/lhash.h | ||
451 | evp_test.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
452 | evp_test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
453 | evp_test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
454 | evp_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
455 | evp_test.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h | ||
456 | evp_test.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | ||
457 | evp_test.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | ||
458 | evp_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | ||
459 | evp_test.o: ../include/openssl/sha.h ../include/openssl/stack.h | ||
460 | evp_test.o: ../include/openssl/symhacks.h ../include/openssl/ui.h | ||
461 | evp_test.o: ../include/openssl/ui_compat.h evp_test.c | ||
462 | exptest.o: ../include/openssl/bio.h ../include/openssl/bn.h | ||
463 | exptest.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h | ||
464 | exptest.o: ../include/openssl/err.h ../include/openssl/lhash.h | ||
465 | exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
466 | exptest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h | ||
467 | exptest.o: ../include/openssl/safestack.h ../include/openssl/stack.h | ||
468 | exptest.o: ../include/openssl/symhacks.h exptest.c | ||
469 | hmactest.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
470 | hmactest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
471 | hmactest.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
472 | hmactest.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
473 | hmactest.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
474 | hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
475 | hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h | ||
476 | hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h | ||
477 | hmactest.o: ../include/openssl/md4.h ../include/openssl/md5.h | ||
478 | hmactest.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h | ||
479 | hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | ||
480 | hmactest.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h | ||
481 | hmactest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | ||
482 | hmactest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | ||
483 | hmactest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | ||
484 | hmactest.o: ../include/openssl/sha.h ../include/openssl/stack.h | ||
485 | hmactest.o: ../include/openssl/symhacks.h ../include/openssl/ui.h | ||
486 | hmactest.o: ../include/openssl/ui_compat.h hmactest.c | ||
487 | ideatest.o: ../include/openssl/idea.h ../include/openssl/opensslconf.h | ||
488 | ideatest.o: ideatest.c | ||
489 | md2test.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
490 | md2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
491 | md2test.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
492 | md2test.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
493 | md2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
494 | md2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
495 | md2test.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
496 | md2test.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
497 | md2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
498 | md2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
499 | md2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
500 | md2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h | ||
501 | md2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
502 | md2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
503 | md2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
504 | md2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
505 | md2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md2test.c | ||
506 | md4test.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
507 | md4test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
508 | md4test.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
509 | md4test.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
510 | md4test.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
511 | md4test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
512 | md4test.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
513 | md4test.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
514 | md4test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
515 | md4test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
516 | md4test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
517 | md4test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h | ||
518 | md4test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
519 | md4test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
520 | md4test.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
521 | md4test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
522 | md4test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md4test.c | ||
523 | md5test.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
524 | md5test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
525 | md5test.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
526 | md5test.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
527 | md5test.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
528 | md5test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
529 | md5test.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
530 | md5test.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
531 | md5test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
532 | md5test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
533 | md5test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
534 | md5test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h | ||
535 | md5test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
536 | md5test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
537 | md5test.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
538 | md5test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
539 | md5test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h md5test.c | ||
540 | mdc2test.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
541 | mdc2test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
542 | mdc2test.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
543 | mdc2test.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
544 | mdc2test.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
545 | mdc2test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
546 | mdc2test.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
547 | mdc2test.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
548 | mdc2test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
549 | mdc2test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
550 | mdc2test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
551 | mdc2test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h | ||
552 | mdc2test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
553 | mdc2test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
554 | mdc2test.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
555 | mdc2test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
556 | mdc2test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h mdc2test.c | ||
557 | randtest.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h | ||
558 | randtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h randtest.c | ||
559 | rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h rc2test.c | ||
560 | rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h rc4test.c | ||
561 | rc5test.o: ../include/openssl/rc5.h rc5test.c | ||
562 | rmdtest.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
563 | rmdtest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
564 | rmdtest.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
565 | rmdtest.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
566 | rmdtest.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
567 | rmdtest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
568 | rmdtest.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
569 | rmdtest.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
570 | rmdtest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
571 | rmdtest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
572 | rmdtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
573 | rmdtest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h | ||
574 | rmdtest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
575 | rmdtest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
576 | rmdtest.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
577 | rmdtest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
578 | rmdtest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h rmdtest.c | ||
579 | rsa_test.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h | ||
580 | rsa_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h | ||
581 | rsa_test.o: ../include/openssl/dh.h ../include/openssl/dsa.h | ||
582 | rsa_test.o: ../include/openssl/e_os2.h ../include/openssl/engine.h | ||
583 | rsa_test.o: ../include/openssl/err.h ../include/openssl/lhash.h | ||
584 | rsa_test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
585 | rsa_test.o: ../include/openssl/ossl_typ.h ../include/openssl/rand.h | ||
586 | rsa_test.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | ||
587 | rsa_test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
588 | rsa_test.o: ../include/openssl/ui.h rsa_test.c | ||
589 | sha1test.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
590 | sha1test.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
591 | sha1test.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
592 | sha1test.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
593 | sha1test.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
594 | sha1test.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
595 | sha1test.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
596 | sha1test.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
597 | sha1test.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
598 | sha1test.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
599 | sha1test.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
600 | sha1test.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h | ||
601 | sha1test.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
602 | sha1test.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
603 | sha1test.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
604 | sha1test.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
605 | sha1test.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h sha1test.c | ||
606 | shatest.o: ../include/openssl/aes.h ../include/openssl/asn1.h | ||
607 | shatest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
608 | shatest.o: ../include/openssl/bn.h ../include/openssl/cast.h | ||
609 | shatest.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
610 | shatest.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
611 | shatest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
612 | shatest.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
613 | shatest.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
614 | shatest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
615 | shatest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
616 | shatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
617 | shatest.o: ../include/openssl/ossl_typ.h ../include/openssl/rc2.h | ||
618 | shatest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
619 | shatest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
620 | shatest.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
621 | shatest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
622 | shatest.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h shatest.c | ||
623 | ssltest.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h | ||
624 | ssltest.o: ../include/openssl/bio.h ../include/openssl/blowfish.h | ||
625 | ssltest.o: ../include/openssl/bn.h ../include/openssl/buffer.h | ||
626 | ssltest.o: ../include/openssl/cast.h ../include/openssl/comp.h | ||
627 | ssltest.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
628 | ssltest.o: ../include/openssl/des_old.h ../include/openssl/dh.h | ||
629 | ssltest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
630 | ssltest.o: ../include/openssl/engine.h ../include/openssl/err.h | ||
631 | ssltest.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
632 | ssltest.o: ../include/openssl/kssl.h ../include/openssl/lhash.h | ||
633 | ssltest.o: ../include/openssl/md2.h ../include/openssl/md4.h | ||
634 | ssltest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
635 | ssltest.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h | ||
636 | ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
637 | ssltest.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h | ||
638 | ssltest.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h | ||
639 | ssltest.o: ../include/openssl/rand.h ../include/openssl/rc2.h | ||
640 | ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
641 | ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
642 | ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
643 | ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | ||
644 | ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | ||
645 | ssltest.o: ../include/openssl/stack.h ../include/openssl/symhacks.h | ||
646 | ssltest.o: ../include/openssl/tls1.h ../include/openssl/ui.h | ||
647 | ssltest.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h | ||
648 | ssltest.o: ../include/openssl/x509_vfy.h ssltest.c | ||
diff --git a/src/lib/libssl/test/dummytest.c b/src/lib/libssl/test/dummytest.c new file mode 100644 index 0000000000..f98f003ef9 --- /dev/null +++ b/src/lib/libssl/test/dummytest.c | |||
@@ -0,0 +1,47 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <string.h> | ||
4 | #include <ctype.h> | ||
5 | #include <openssl/e_os2.h> | ||
6 | #include <openssl/buffer.h> | ||
7 | #include <openssl/crypto.h> | ||
8 | |||
9 | int main(int argc, char *argv[]) | ||
10 | { | ||
11 | char *p, *q, *program; | ||
12 | |||
13 | p = strrchr(argv[0], '/'); | ||
14 | if (!p) p = strrchr(argv[0], '\\'); | ||
15 | #ifdef OPENSSL_SYS_VMS | ||
16 | if (!p) p = strrchr(argv[0], ']'); | ||
17 | if (p) q = strrchr(p, '>'); | ||
18 | if (q) p = q; | ||
19 | if (!p) p = strrchr(argv[0], ':'); | ||
20 | q = 0; | ||
21 | #endif | ||
22 | if (p) p++; | ||
23 | if (!p) p = argv[0]; | ||
24 | if (p) q = strchr(p, '.'); | ||
25 | if (p && !q) q = p + strlen(p); | ||
26 | |||
27 | if (!p) | ||
28 | program = BUF_strdup("(unknown)"); | ||
29 | else | ||
30 | { | ||
31 | program = OPENSSL_malloc((q - p) + 1); | ||
32 | strncpy(program, p, q - p); | ||
33 | program[q - p] = '\0'; | ||
34 | } | ||
35 | |||
36 | for(p = program; *p; p++) | ||
37 | if (islower(*p)) *p = toupper(*p); | ||
38 | |||
39 | q = strstr(program, "TEST"); | ||
40 | if (q > p && q[-1] == '_') q--; | ||
41 | *q = '\0'; | ||
42 | |||
43 | printf("No %s support\n", program); | ||
44 | |||
45 | OPENSSL_free(program); | ||
46 | return(0); | ||
47 | } | ||
diff --git a/src/lib/libssl/test/enginetest.c b/src/lib/libssl/test/enginetest.c new file mode 100644 index 0000000000..87fa8c57b7 --- /dev/null +++ b/src/lib/libssl/test/enginetest.c | |||
@@ -0,0 +1,274 @@ | |||
1 | /* crypto/engine/enginetest.c */ | ||
2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
3 | * project 2000. | ||
4 | */ | ||
5 | /* ==================================================================== | ||
6 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * | ||
12 | * 1. Redistributions of source code must retain the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer. | ||
14 | * | ||
15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
16 | * notice, this list of conditions and the following disclaimer in | ||
17 | * the documentation and/or other materials provided with the | ||
18 | * distribution. | ||
19 | * | ||
20 | * 3. All advertising materials mentioning features or use of this | ||
21 | * software must display the following acknowledgment: | ||
22 | * "This product includes software developed by the OpenSSL Project | ||
23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
24 | * | ||
25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | * endorse or promote products derived from this software without | ||
27 | * prior written permission. For written permission, please contact | ||
28 | * licensing@OpenSSL.org. | ||
29 | * | ||
30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
31 | * nor may "OpenSSL" appear in their names without prior written | ||
32 | * permission of the OpenSSL Project. | ||
33 | * | ||
34 | * 6. Redistributions of any form whatsoever must retain the following | ||
35 | * acknowledgment: | ||
36 | * "This product includes software developed by the OpenSSL Project | ||
37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
38 | * | ||
39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | * ==================================================================== | ||
52 | * | ||
53 | * This product includes cryptographic software written by Eric Young | ||
54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
55 | * Hudson (tjh@cryptsoft.com). | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #include <openssl/e_os2.h> | ||
60 | #include <stdio.h> | ||
61 | #include <string.h> | ||
62 | #include <openssl/buffer.h> | ||
63 | #include <openssl/crypto.h> | ||
64 | #include <openssl/engine.h> | ||
65 | #include <openssl/err.h> | ||
66 | |||
67 | static void display_engine_list() | ||
68 | { | ||
69 | ENGINE *h; | ||
70 | int loop; | ||
71 | |||
72 | h = ENGINE_get_first(); | ||
73 | loop = 0; | ||
74 | printf("listing available engine types\n"); | ||
75 | while(h) | ||
76 | { | ||
77 | printf("engine %i, id = \"%s\", name = \"%s\"\n", | ||
78 | loop++, ENGINE_get_id(h), ENGINE_get_name(h)); | ||
79 | h = ENGINE_get_next(h); | ||
80 | } | ||
81 | printf("end of list\n"); | ||
82 | /* ENGINE_get_first() increases the struct_ref counter, so we | ||
83 | must call ENGINE_free() to decrease it again */ | ||
84 | ENGINE_free(h); | ||
85 | } | ||
86 | |||
87 | int main(int argc, char *argv[]) | ||
88 | { | ||
89 | ENGINE *block[512]; | ||
90 | char buf[256]; | ||
91 | const char *id, *name; | ||
92 | ENGINE *ptr; | ||
93 | int loop; | ||
94 | int to_return = 1; | ||
95 | ENGINE *new_h1 = NULL; | ||
96 | ENGINE *new_h2 = NULL; | ||
97 | ENGINE *new_h3 = NULL; | ||
98 | ENGINE *new_h4 = NULL; | ||
99 | |||
100 | /* enable memory leak checking unless explicitly disabled */ | ||
101 | if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) | ||
102 | { | ||
103 | CRYPTO_malloc_debug_init(); | ||
104 | CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); | ||
105 | } | ||
106 | else | ||
107 | { | ||
108 | /* OPENSSL_DEBUG_MEMORY=off */ | ||
109 | CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); | ||
110 | } | ||
111 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
112 | ERR_load_crypto_strings(); | ||
113 | |||
114 | memset(block, 0, 512 * sizeof(ENGINE *)); | ||
115 | if(((new_h1 = ENGINE_new()) == NULL) || | ||
116 | !ENGINE_set_id(new_h1, "test_id0") || | ||
117 | !ENGINE_set_name(new_h1, "First test item") || | ||
118 | ((new_h2 = ENGINE_new()) == NULL) || | ||
119 | !ENGINE_set_id(new_h2, "test_id1") || | ||
120 | !ENGINE_set_name(new_h2, "Second test item") || | ||
121 | ((new_h3 = ENGINE_new()) == NULL) || | ||
122 | !ENGINE_set_id(new_h3, "test_id2") || | ||
123 | !ENGINE_set_name(new_h3, "Third test item") || | ||
124 | ((new_h4 = ENGINE_new()) == NULL) || | ||
125 | !ENGINE_set_id(new_h4, "test_id3") || | ||
126 | !ENGINE_set_name(new_h4, "Fourth test item")) | ||
127 | { | ||
128 | printf("Couldn't set up test ENGINE structures\n"); | ||
129 | goto end; | ||
130 | } | ||
131 | printf("\nenginetest beginning\n\n"); | ||
132 | display_engine_list(); | ||
133 | if(!ENGINE_add(new_h1)) | ||
134 | { | ||
135 | printf("Add failed!\n"); | ||
136 | goto end; | ||
137 | } | ||
138 | display_engine_list(); | ||
139 | ptr = ENGINE_get_first(); | ||
140 | if(!ENGINE_remove(ptr)) | ||
141 | { | ||
142 | printf("Remove failed!\n"); | ||
143 | goto end; | ||
144 | } | ||
145 | if (ptr) | ||
146 | ENGINE_free(ptr); | ||
147 | display_engine_list(); | ||
148 | if(!ENGINE_add(new_h3) || !ENGINE_add(new_h2)) | ||
149 | { | ||
150 | printf("Add failed!\n"); | ||
151 | goto end; | ||
152 | } | ||
153 | display_engine_list(); | ||
154 | if(!ENGINE_remove(new_h2)) | ||
155 | { | ||
156 | printf("Remove failed!\n"); | ||
157 | goto end; | ||
158 | } | ||
159 | display_engine_list(); | ||
160 | if(!ENGINE_add(new_h4)) | ||
161 | { | ||
162 | printf("Add failed!\n"); | ||
163 | goto end; | ||
164 | } | ||
165 | display_engine_list(); | ||
166 | if(ENGINE_add(new_h3)) | ||
167 | { | ||
168 | printf("Add *should* have failed but didn't!\n"); | ||
169 | goto end; | ||
170 | } | ||
171 | else | ||
172 | printf("Add that should fail did.\n"); | ||
173 | ERR_clear_error(); | ||
174 | if(ENGINE_remove(new_h2)) | ||
175 | { | ||
176 | printf("Remove *should* have failed but didn't!\n"); | ||
177 | goto end; | ||
178 | } | ||
179 | else | ||
180 | printf("Remove that should fail did.\n"); | ||
181 | ERR_clear_error(); | ||
182 | if(!ENGINE_remove(new_h3)) | ||
183 | { | ||
184 | printf("Remove failed!\n"); | ||
185 | goto end; | ||
186 | } | ||
187 | display_engine_list(); | ||
188 | if(!ENGINE_remove(new_h4)) | ||
189 | { | ||
190 | printf("Remove failed!\n"); | ||
191 | goto end; | ||
192 | } | ||
193 | display_engine_list(); | ||
194 | /* Depending on whether there's any hardware support compiled | ||
195 | * in, this remove may be destined to fail. */ | ||
196 | ptr = ENGINE_get_first(); | ||
197 | if(ptr) | ||
198 | if(!ENGINE_remove(ptr)) | ||
199 | printf("Remove failed!i - probably no hardware " | ||
200 | "support present.\n"); | ||
201 | if (ptr) | ||
202 | ENGINE_free(ptr); | ||
203 | display_engine_list(); | ||
204 | if(!ENGINE_add(new_h1) || !ENGINE_remove(new_h1)) | ||
205 | { | ||
206 | printf("Couldn't add and remove to an empty list!\n"); | ||
207 | goto end; | ||
208 | } | ||
209 | else | ||
210 | printf("Successfully added and removed to an empty list!\n"); | ||
211 | printf("About to beef up the engine-type list\n"); | ||
212 | for(loop = 0; loop < 512; loop++) | ||
213 | { | ||
214 | sprintf(buf, "id%i", loop); | ||
215 | id = BUF_strdup(buf); | ||
216 | sprintf(buf, "Fake engine type %i", loop); | ||
217 | name = BUF_strdup(buf); | ||
218 | if(((block[loop] = ENGINE_new()) == NULL) || | ||
219 | !ENGINE_set_id(block[loop], id) || | ||
220 | !ENGINE_set_name(block[loop], name)) | ||
221 | { | ||
222 | printf("Couldn't create block of ENGINE structures.\n" | ||
223 | "I'll probably also core-dump now, damn.\n"); | ||
224 | goto end; | ||
225 | } | ||
226 | } | ||
227 | for(loop = 0; loop < 512; loop++) | ||
228 | { | ||
229 | if(!ENGINE_add(block[loop])) | ||
230 | { | ||
231 | printf("\nAdding stopped at %i, (%s,%s)\n", | ||
232 | loop, ENGINE_get_id(block[loop]), | ||
233 | ENGINE_get_name(block[loop])); | ||
234 | goto cleanup_loop; | ||
235 | } | ||
236 | else | ||
237 | printf("."); fflush(stdout); | ||
238 | } | ||
239 | cleanup_loop: | ||
240 | printf("\nAbout to empty the engine-type list\n"); | ||
241 | while((ptr = ENGINE_get_first()) != NULL) | ||
242 | { | ||
243 | if(!ENGINE_remove(ptr)) | ||
244 | { | ||
245 | printf("\nRemove failed!\n"); | ||
246 | goto end; | ||
247 | } | ||
248 | ENGINE_free(ptr); | ||
249 | printf("."); fflush(stdout); | ||
250 | } | ||
251 | for(loop = 0; loop < 512; loop++) | ||
252 | { | ||
253 | OPENSSL_free((void *)ENGINE_get_id(block[loop])); | ||
254 | OPENSSL_free((void *)ENGINE_get_name(block[loop])); | ||
255 | } | ||
256 | printf("\nTests completed happily\n"); | ||
257 | to_return = 0; | ||
258 | end: | ||
259 | if(to_return) | ||
260 | ERR_print_errors_fp(stderr); | ||
261 | if(new_h1) ENGINE_free(new_h1); | ||
262 | if(new_h2) ENGINE_free(new_h2); | ||
263 | if(new_h3) ENGINE_free(new_h3); | ||
264 | if(new_h4) ENGINE_free(new_h4); | ||
265 | for(loop = 0; loop < 512; loop++) | ||
266 | if(block[loop]) | ||
267 | ENGINE_free(block[loop]); | ||
268 | ENGINE_cleanup(); | ||
269 | CRYPTO_cleanup_all_ex_data(); | ||
270 | ERR_free_strings(); | ||
271 | ERR_remove_state(0); | ||
272 | CRYPTO_mem_leaks_fp(stderr); | ||
273 | return to_return; | ||
274 | } | ||
diff --git a/src/lib/libssl/test/maketests.com b/src/lib/libssl/test/maketests.com new file mode 100644 index 0000000000..b3bf8bb837 --- /dev/null +++ b/src/lib/libssl/test/maketests.com | |||
@@ -0,0 +1,1087 @@ | |||
1 | $! | ||
2 | $! MAKETESTS.COM | ||
3 | $! Written By: Robert Byer | ||
4 | $! Vice-President | ||
5 | $! A-Com Computing, Inc. | ||
6 | $! byer@mail.all-net.net | ||
7 | $! | ||
8 | $! Changes by Richard Levitte <richard@levitte.org> | ||
9 | $! | ||
10 | $! This command files compiles and creates all the various different | ||
11 | $! "test" programs for the different types of encryption for OpenSSL. | ||
12 | $! It was written so it would try to determine what "C" compiler to | ||
13 | $! use or you can specify which "C" compiler to use. | ||
14 | $! | ||
15 | $! The test "executeables" will be placed in a directory called | ||
16 | $! [.xxx.EXE.TEST] where "xxx" denotes AXP or VAX depending on your machines | ||
17 | $! architecture. | ||
18 | $! | ||
19 | $! Specify RSAREF as P1 to compile with the RSAREF library instead of | ||
20 | $! the regular one. If you specify NORSAREF it will compile with the | ||
21 | $! regular RSAREF routines. (Note: If you are in the United States | ||
22 | $! you MUST compile with RSAREF unless you have a license from RSA). | ||
23 | $! | ||
24 | $! Note: The RSAREF libraries are NOT INCLUDED and you have to | ||
25 | $! download it from "ftp://ftp.rsa.com/rsaref". You have to | ||
26 | $! get the ".tar-Z" file as the ".zip" file dosen't have the | ||
27 | $! directory structure stored. You have to extract the file | ||
28 | $! into the [.RSAREF] directory under the root directory as that | ||
29 | $! is where the scripts will look for the files. | ||
30 | $! | ||
31 | $! Specify DEBUG or NODEBUG P2 to compile with or without debugger | ||
32 | $! information. | ||
33 | $! | ||
34 | $! Specify which compiler at P3 to try to compile under. | ||
35 | $! | ||
36 | $! VAXC For VAX C. | ||
37 | $! DECC For DEC C. | ||
38 | $! GNUC For GNU C. | ||
39 | $! | ||
40 | $! If you don't speficy a compiler, it will try to determine which | ||
41 | $! "C" compiler to use. | ||
42 | $! | ||
43 | $! P4, if defined, sets a TCP/IP library to use, through one of the following | ||
44 | $! keywords: | ||
45 | $! | ||
46 | $! UCX for UCX | ||
47 | $! SOCKETSHR for SOCKETSHR+NETLIB | ||
48 | $! | ||
49 | $! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) | ||
50 | $! | ||
51 | $! | ||
52 | $! Define A TCP/IP Library That We Will Need To Link To. | ||
53 | $! (That is, If Wee Need To Link To One.) | ||
54 | $! | ||
55 | $ TCPIP_LIB = "" | ||
56 | $! | ||
57 | $! Check Which Architecture We Are Using. | ||
58 | $! | ||
59 | $ IF (F$GETSYI("CPU").GE.128) | ||
60 | $ THEN | ||
61 | $! | ||
62 | $! The Architecture Is AXP. | ||
63 | $! | ||
64 | $ ARCH := AXP | ||
65 | $! | ||
66 | $! Else... | ||
67 | $! | ||
68 | $ ELSE | ||
69 | $! | ||
70 | $! The Architecture Is VAX. | ||
71 | $! | ||
72 | $ ARCH := VAX | ||
73 | $! | ||
74 | $! End The Architecture Check. | ||
75 | $! | ||
76 | $ ENDIF | ||
77 | $! | ||
78 | $! Check To Make Sure We Have Valid Command Line Parameters. | ||
79 | $! | ||
80 | $ GOSUB CHECK_OPTIONS | ||
81 | $! | ||
82 | $! Initialise logical names and such | ||
83 | $! | ||
84 | $ GOSUB INITIALISE | ||
85 | $! | ||
86 | $! Tell The User What Kind of Machine We Run On. | ||
87 | $! | ||
88 | $ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine." | ||
89 | $! | ||
90 | $! Define The CRYPTO-LIB We Are To Use. | ||
91 | $! | ||
92 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB | ||
93 | $! | ||
94 | $! Define The RSAREF-LIB We Are To Use. | ||
95 | $! | ||
96 | $ RSAREF_LIB := SYS$DISK:[-.'ARCH'.EXE.RSAREF]LIBRSAGLUE.OLB | ||
97 | $! | ||
98 | $! Define The SSL We Are To Use. | ||
99 | $! | ||
100 | $ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB | ||
101 | $! | ||
102 | $! Define The OBJ Directory. | ||
103 | $! | ||
104 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.TEST] | ||
105 | $! | ||
106 | $! Check To See If The Architecture Specific OBJ Directory Exists. | ||
107 | $! | ||
108 | $ IF (F$PARSE(OBJ_DIR).EQS."") | ||
109 | $ THEN | ||
110 | $! | ||
111 | $! The EXE Directory Dosen't Exist, So Create It. | ||
112 | $! | ||
113 | $ CREATE/DIRECTORY 'OBJ_DIR' | ||
114 | $! | ||
115 | $! End The Architecture Specific OBJ Directory Check. | ||
116 | $! | ||
117 | $ ENDIF | ||
118 | $! | ||
119 | $! Define The EXE Directory. | ||
120 | $! | ||
121 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.TEST] | ||
122 | $! | ||
123 | $! Check To See If The Architecture Specific EXE Directory Exists. | ||
124 | $! | ||
125 | $ IF (F$PARSE(EXE_DIR).EQS."") | ||
126 | $ THEN | ||
127 | $! | ||
128 | $! The EXE Directory Dosen't Exist, So Create It. | ||
129 | $! | ||
130 | $ CREATE/DIRECTORY 'EXE_DIR' | ||
131 | $! | ||
132 | $! End The Architecture Specific EXE Directory Check. | ||
133 | $! | ||
134 | $ ENDIF | ||
135 | $! | ||
136 | $! Check To See If We Have The Proper Libraries. | ||
137 | $! | ||
138 | $ GOSUB LIB_CHECK | ||
139 | $! | ||
140 | $! Check To See If We Have A Linker Option File. | ||
141 | $! | ||
142 | $ GOSUB CHECK_OPT_FILE | ||
143 | $! | ||
144 | $! Define The TEST Files. | ||
145 | $! | ||
146 | $ TEST_FILES = "BNTEST,ECTEST,IDEATEST,MD2TEST,MD4TEST,MD5TEST,HMACTEST,"+ - | ||
147 | "RC2TEST,RC4TEST,RC5TEST,"+ - | ||
148 | "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ - | ||
149 | "RANDTEST,DHTEST,ENGINETEST,"+ - | ||
150 | "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ - | ||
151 | "EVP_TEST" | ||
152 | $ TCPIP_PROGRAMS = ",," | ||
153 | $ IF COMPILER .EQS. "VAXC" THEN - | ||
154 | TCPIP_PROGRAMS = ",SSLTEST," | ||
155 | $! | ||
156 | $! Define A File Counter And Set It To "0". | ||
157 | $! | ||
158 | $ FILE_COUNTER = 0 | ||
159 | $! | ||
160 | $! Top Of The File Loop. | ||
161 | $! | ||
162 | $ NEXT_FILE: | ||
163 | $! | ||
164 | $! O.K, Extract The File Name From The File List. | ||
165 | $! | ||
166 | $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",TEST_FILES) | ||
167 | $! | ||
168 | $! Check To See If We Are At The End Of The File List. | ||
169 | $! | ||
170 | $ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE | ||
171 | $! | ||
172 | $! Increment The Counter. | ||
173 | $! | ||
174 | $ FILE_COUNTER = FILE_COUNTER + 1 | ||
175 | $! | ||
176 | $! Create The Source File Name. | ||
177 | $! | ||
178 | $ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME + ".C" | ||
179 | $! | ||
180 | $! Create The Object File Name. | ||
181 | $! | ||
182 | $ OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ" | ||
183 | $! | ||
184 | $! Create The Executable File Name. | ||
185 | $! | ||
186 | $ EXE_FILE = EXE_DIR + FILE_NAME + ".EXE" | ||
187 | $ ON WARNING THEN GOTO NEXT_FILE | ||
188 | $! | ||
189 | $! Check To See If The File We Want To Compile Actually Exists. | ||
190 | $! | ||
191 | $ IF (F$SEARCH(SOURCE_FILE).EQS."") | ||
192 | $ THEN | ||
193 | $! | ||
194 | $! Tell The User That The File Dosen't Exist. | ||
195 | $! | ||
196 | $ WRITE SYS$OUTPUT "" | ||
197 | $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist." | ||
198 | $ WRITE SYS$OUTPUT "" | ||
199 | $! | ||
200 | $! Exit The Build. | ||
201 | $! | ||
202 | $ GOTO EXIT | ||
203 | $ ENDIF | ||
204 | $! | ||
205 | $! Tell The User What We Are Building. | ||
206 | $! | ||
207 | $ WRITE SYS$OUTPUT "Building The ",FILE_NAME," Test Program." | ||
208 | $! | ||
209 | $! Compile The File. | ||
210 | $! | ||
211 | $ ON ERROR THEN GOTO NEXT_FILE | ||
212 | $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | ||
213 | $ ON WARNING THEN GOTO NEXT_FILE | ||
214 | $! | ||
215 | $! Check If What We Are About To Compile Works Without A TCP/IP Library. | ||
216 | $! | ||
217 | $ IF ((TCPIP_LIB.EQS."").AND.((TCPIP_PROGRAMS-FILE_NAME).NES.TCPIP_PROGRAMS)) | ||
218 | $ THEN | ||
219 | $! | ||
220 | $! Inform The User That A TCP/IP Library Is Needed To Compile This Program. | ||
221 | $! | ||
222 | $ WRITE SYS$OUTPUT FILE_NAME," Needs A TCP/IP Library. Can't Link. Skipping..." | ||
223 | $ GOTO NEXT_FILE | ||
224 | $! | ||
225 | $! End The TCP/IP Library Check. | ||
226 | $! | ||
227 | $ ENDIF | ||
228 | $! | ||
229 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. | ||
230 | $! | ||
231 | $ IF (RSAREF.EQS."TRUE") | ||
232 | $ THEN | ||
233 | $! | ||
234 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | ||
235 | $! | ||
236 | $ IF (TCPIP_LIB.NES."") | ||
237 | $ THEN | ||
238 | $! | ||
239 | $! Link With The RSAREF Library And A Specific TCP/IP Library. | ||
240 | $! | ||
241 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
242 | 'OBJECT_FILE',- | ||
243 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, - | ||
244 | 'TCPIP_LIB','OPT_FILE'/OPTION | ||
245 | $! | ||
246 | $! Else... | ||
247 | $! | ||
248 | $ ELSE | ||
249 | $! | ||
250 | $! Link With The RSAREF Library And NO TCP/IP Library. | ||
251 | $! | ||
252 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
253 | 'OBJECT_FILE', - | ||
254 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, - | ||
255 | 'OPT_FILE'/OPTION | ||
256 | $! | ||
257 | $! End The TCP/IP Library Check. | ||
258 | $! | ||
259 | $ ENDIF | ||
260 | $! | ||
261 | $! Else... | ||
262 | $! | ||
263 | $ ELSE | ||
264 | $! | ||
265 | $! Don't Link With The RSAREF Routines. | ||
266 | $! | ||
267 | $! | ||
268 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | ||
269 | $! | ||
270 | $ IF (TCPIP_LIB.NES."") | ||
271 | $ THEN | ||
272 | $! | ||
273 | $! Don't Link With The RSAREF Routines And TCP/IP Library. | ||
274 | $! | ||
275 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
276 | 'OBJECT_FILE', - | ||
277 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, - | ||
278 | 'TCPIP_LIB','OPT_FILE'/OPTION | ||
279 | $! | ||
280 | $! Else... | ||
281 | $! | ||
282 | $ ELSE | ||
283 | $! | ||
284 | $! Don't Link With The RSAREF Routines And Link With A TCP/IP Library. | ||
285 | $! | ||
286 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
287 | 'OBJECT_FILE', - | ||
288 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, - | ||
289 | 'OPT_FILE'/OPTION | ||
290 | $! | ||
291 | $! End The TCP/IP Library Check. | ||
292 | $! | ||
293 | $ ENDIF | ||
294 | $! | ||
295 | $! End The RSAREF Link Check. | ||
296 | $! | ||
297 | $ ENDIF | ||
298 | $! | ||
299 | $! Go Back And Do It Again. | ||
300 | $! | ||
301 | $ GOTO NEXT_FILE | ||
302 | $! | ||
303 | $! All Done With This Library Part. | ||
304 | $! | ||
305 | $ FILE_DONE: | ||
306 | $! | ||
307 | $! All Done, Time To Exit. | ||
308 | $! | ||
309 | $ EXIT: | ||
310 | $ GOSUB CLEANUP | ||
311 | $ EXIT | ||
312 | $! | ||
313 | $! Check For The Link Option FIle. | ||
314 | $! | ||
315 | $ CHECK_OPT_FILE: | ||
316 | $! | ||
317 | $! Check To See If We Need To Make A VAX C Option File. | ||
318 | $! | ||
319 | $ IF (COMPILER.EQS."VAXC") | ||
320 | $ THEN | ||
321 | $! | ||
322 | $! Check To See If We Already Have A VAX C Linker Option File. | ||
323 | $! | ||
324 | $ IF (F$SEARCH(OPT_FILE).EQS."") | ||
325 | $ THEN | ||
326 | $! | ||
327 | $! We Need A VAX C Linker Option File. | ||
328 | $! | ||
329 | $ CREATE 'OPT_FILE' | ||
330 | $DECK | ||
331 | ! | ||
332 | ! Default System Options File To Link Agianst | ||
333 | ! The Sharable VAX C Runtime Library. | ||
334 | ! | ||
335 | SYS$SHARE:VAXCRTL.EXE/SHARE | ||
336 | $EOD | ||
337 | $! | ||
338 | $! End The Option File Check. | ||
339 | $! | ||
340 | $ ENDIF | ||
341 | $! | ||
342 | $! End The VAXC Check. | ||
343 | $! | ||
344 | $ ENDIF | ||
345 | $! | ||
346 | $! Check To See If We Need A GNU C Option File. | ||
347 | $! | ||
348 | $ IF (COMPILER.EQS."GNUC") | ||
349 | $ THEN | ||
350 | $! | ||
351 | $! Check To See If We Already Have A GNU C Linker Option File. | ||
352 | $! | ||
353 | $ IF (F$SEARCH(OPT_FILE).EQS."") | ||
354 | $ THEN | ||
355 | $! | ||
356 | $! We Need A GNU C Linker Option File. | ||
357 | $! | ||
358 | $ CREATE 'OPT_FILE' | ||
359 | $DECK | ||
360 | ! | ||
361 | ! Default System Options File To Link Agianst | ||
362 | ! The Sharable C Runtime Library. | ||
363 | ! | ||
364 | GNU_CC:[000000]GCCLIB/LIBRARY | ||
365 | SYS$SHARE:VAXCRTL/SHARE | ||
366 | $EOD | ||
367 | $! | ||
368 | $! End The Option File Check. | ||
369 | $! | ||
370 | $ ENDIF | ||
371 | $! | ||
372 | $! End The GNU C Check. | ||
373 | $! | ||
374 | $ ENDIF | ||
375 | $! | ||
376 | $! Check To See If We Need A DEC C Option File. | ||
377 | $! | ||
378 | $ IF (COMPILER.EQS."DECC") | ||
379 | $ THEN | ||
380 | $! | ||
381 | $! Check To See If We Already Have A DEC C Linker Option File. | ||
382 | $! | ||
383 | $ IF (F$SEARCH(OPT_FILE).EQS."") | ||
384 | $ THEN | ||
385 | $! | ||
386 | $! Figure Out If We Need An AXP Or A VAX Linker Option File. | ||
387 | $! | ||
388 | $ IF (ARCH.EQS."VAX") | ||
389 | $ THEN | ||
390 | $! | ||
391 | $! We Need A DEC C Linker Option File For VAX. | ||
392 | $! | ||
393 | $ CREATE 'OPT_FILE' | ||
394 | $DECK | ||
395 | ! | ||
396 | ! Default System Options File To Link Agianst | ||
397 | ! The Sharable DEC C Runtime Library. | ||
398 | ! | ||
399 | SYS$SHARE:DECC$SHR.EXE/SHARE | ||
400 | $EOD | ||
401 | $! | ||
402 | $! Else... | ||
403 | $! | ||
404 | $ ELSE | ||
405 | $! | ||
406 | $! Create The AXP Linker Option File. | ||
407 | $! | ||
408 | $ CREATE 'OPT_FILE' | ||
409 | $DECK | ||
410 | ! | ||
411 | ! Default System Options File For AXP To Link Agianst | ||
412 | ! The Sharable C Runtime Library. | ||
413 | ! | ||
414 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE | ||
415 | SYS$SHARE:CMA$OPEN_RTL/SHARE | ||
416 | $EOD | ||
417 | $! | ||
418 | $! End The VAX/AXP DEC C Option File Check. | ||
419 | $! | ||
420 | $ ENDIF | ||
421 | $! | ||
422 | $! End The Option File Search. | ||
423 | $! | ||
424 | $ ENDIF | ||
425 | $! | ||
426 | $! End The DEC C Check. | ||
427 | $! | ||
428 | $ ENDIF | ||
429 | $! | ||
430 | $! Tell The User What Linker Option File We Are Using. | ||
431 | $! | ||
432 | $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." | ||
433 | $! | ||
434 | $! Time To RETURN. | ||
435 | $! | ||
436 | $ RETURN | ||
437 | $! | ||
438 | $! Check To See If We Have The Appropiate Libraries. | ||
439 | $! | ||
440 | $ LIB_CHECK: | ||
441 | $! | ||
442 | $! Look For The Library LIBCRYPTO.OLB. | ||
443 | $! | ||
444 | $ IF (F$SEARCH(CRYPTO_LIB).EQS."") | ||
445 | $ THEN | ||
446 | $! | ||
447 | $! Tell The User We Can't Find The LIBCRYPTO.OLB Library. | ||
448 | $! | ||
449 | $ WRITE SYS$OUTPUT "" | ||
450 | $ WRITE SYS$OUTPUT "Can't Find The Library ",CRYPTO_LIB,"." | ||
451 | $ WRITE SYS$OUTPUT "We Can't Link Without It." | ||
452 | $ WRITE SYS$OUTPUT "" | ||
453 | $! | ||
454 | $! Since We Can't Link Without It, Exit. | ||
455 | $! | ||
456 | $ EXIT | ||
457 | $! | ||
458 | $! End The Crypto Library Check. | ||
459 | $! | ||
460 | $ ENDIF | ||
461 | $! | ||
462 | $! See If We Need The RSAREF Library... | ||
463 | $! | ||
464 | $ IF (RSAREF.EQS."TRUE") | ||
465 | $ THEN | ||
466 | $! | ||
467 | $! Look For The Library LIBRSAGLUE.OLB. | ||
468 | $! | ||
469 | $ IF (F$SEARCH(RSAREF_LIB).EQS."") | ||
470 | $ THEN | ||
471 | $! | ||
472 | $! Tell The User We Can't Find The LIBRSAGLUE.OLB Library. | ||
473 | $! | ||
474 | $ WRITE SYS$OUTPUT "" | ||
475 | $ WRITE SYS$OUTPUT "Can't Find The Library ",RSAREF_LIB,"." | ||
476 | $ WRITE SYS$OUTPUT "We Can't Link Without It." | ||
477 | $ WRITE SYS$OUTPUT "" | ||
478 | $! | ||
479 | $! Since We Can't Link Without It, Exit. | ||
480 | $! | ||
481 | $ EXIT | ||
482 | $ ENDIF | ||
483 | $! | ||
484 | $! End The RSAREF Library Check. | ||
485 | $! | ||
486 | $ ENDIF | ||
487 | $! | ||
488 | $! Look For The Library LIBSSL.OLB. | ||
489 | $! | ||
490 | $ IF (F$SEARCH(SSL_LIB).EQS."") | ||
491 | $ THEN | ||
492 | $! | ||
493 | $! Tell The User We Can't Find The LIBSSL.OLB Library. | ||
494 | $! | ||
495 | $ WRITE SYS$OUTPUT "" | ||
496 | $ WRITE SYS$OUTPUT "Can't Find The Library ",SSL_LIB,"." | ||
497 | $ WRITE SYS$OUTPUT "Some Of The Test Programs Need To Link To It." | ||
498 | $ WRITE SYS$OUTPUT "" | ||
499 | $! | ||
500 | $! Since We Can't Link Without It, Exit. | ||
501 | $! | ||
502 | $ EXIT | ||
503 | $! | ||
504 | $! End The SSL Library Check. | ||
505 | $! | ||
506 | $ ENDIF | ||
507 | $! | ||
508 | $! Time To Return. | ||
509 | $! | ||
510 | $ RETURN | ||
511 | $! | ||
512 | $! Check The User's Options. | ||
513 | $! | ||
514 | $ CHECK_OPTIONS: | ||
515 | $! | ||
516 | $! Check To See If P1 Is Blank. | ||
517 | $! | ||
518 | $ P1 = "NORSAREF" | ||
519 | $ IF (P1.EQS."NORSAREF") | ||
520 | $ THEN | ||
521 | $! | ||
522 | $! P1 Is NORSAREF, So Compile With The Regular RSA Libraries. | ||
523 | $! | ||
524 | $ RSAREF = "FALSE" | ||
525 | $ ELSE | ||
526 | $! | ||
527 | $! Check To See If We Are To Use The RSAREF Library. | ||
528 | $! | ||
529 | $ IF (P1.EQS."RSAREF") | ||
530 | $ THEN | ||
531 | $! | ||
532 | $! Check To Make Sure We Have The RSAREF Source Code Directory. | ||
533 | $! | ||
534 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]SOURCE.DIR").EQS."") | ||
535 | $ THEN | ||
536 | $! | ||
537 | $! We Don't Have The RSAREF Souce Code Directory, So Tell The | ||
538 | $! User This. | ||
539 | $! | ||
540 | $ WRITE SYS$OUTPUT "" | ||
541 | $ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code." | ||
542 | $ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to" | ||
543 | $ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the" | ||
544 | $ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file" | ||
545 | $ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory" | ||
546 | $ WRITE SYS$OUTPUT "as that is where the scripts will look for the files." | ||
547 | $ WRITE SYS$OUTPUT "" | ||
548 | $! | ||
549 | $! Time To Exit. | ||
550 | $! | ||
551 | $ EXIT | ||
552 | $! | ||
553 | $! Else, Compile Using The RSAREF Library. | ||
554 | $! | ||
555 | $ ELSE | ||
556 | $ RSAREF = "TRUE" | ||
557 | $ ENDIF | ||
558 | $ ELSE | ||
559 | $! | ||
560 | $! They Entered An Invalid Option.. | ||
561 | $! | ||
562 | $ WRITE SYS$OUTPUT "" | ||
563 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" | ||
564 | $ WRITE SYS$OUTPUT "" | ||
565 | $ WRITE SYS$OUTPUT " RSAREF : Compile With The RSAREF Library." | ||
566 | $ WRITE SYS$OUTPUT " NORSAREF : Compile With The Regular RSA Library." | ||
567 | $ WRITE SYS$OUTPUT "" | ||
568 | $! | ||
569 | $! Time To EXIT. | ||
570 | $! | ||
571 | $ EXIT | ||
572 | $! | ||
573 | $! End The Valid Arguement Check. | ||
574 | $! | ||
575 | $ ENDIF | ||
576 | $! | ||
577 | $! End The P1 Check. | ||
578 | $! | ||
579 | $ ENDIF | ||
580 | $! | ||
581 | $! Check To See If P2 Is Blank. | ||
582 | $! | ||
583 | $ IF (P2.EQS."NODEBUG") | ||
584 | $ THEN | ||
585 | $! | ||
586 | $! P2 Is NODEBUG, So Compile Without Debugger Information. | ||
587 | $! | ||
588 | $ DEBUGGER = "NODEBUG" | ||
589 | $ TRACEBACK = "NOTRACEBACK" | ||
590 | $ GCC_OPTIMIZE = "OPTIMIZE" | ||
591 | $ CC_OPTIMIZE = "OPTIMIZE" | ||
592 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | ||
593 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
594 | $! | ||
595 | $! Else... | ||
596 | $! | ||
597 | $ ELSE | ||
598 | $! | ||
599 | $! Check To See If We Are To Compile With Debugger Information. | ||
600 | $! | ||
601 | $ IF (P2.EQS."DEBUG") | ||
602 | $ THEN | ||
603 | $! | ||
604 | $! Compile With Debugger Information. | ||
605 | $! | ||
606 | $ DEBUGGER = "DEBUG" | ||
607 | $ TRACEBACK = "TRACEBACK" | ||
608 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | ||
609 | $ CC_OPTIMIZE = "NOOPTIMIZE" | ||
610 | $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." | ||
611 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." | ||
612 | $! | ||
613 | $! Else... | ||
614 | $! | ||
615 | $ ELSE | ||
616 | $! | ||
617 | $! Tell The User Entered An Invalid Option.. | ||
618 | $! | ||
619 | $ WRITE SYS$OUTPUT "" | ||
620 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" | ||
621 | $ WRITE SYS$OUTPUT "" | ||
622 | $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information." | ||
623 | $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information." | ||
624 | $ WRITE SYS$OUTPUT "" | ||
625 | $! | ||
626 | $! Time To EXIT. | ||
627 | $! | ||
628 | $ EXIT | ||
629 | $! | ||
630 | $! End The Valid Arguement Check. | ||
631 | $! | ||
632 | $ ENDIF | ||
633 | $! | ||
634 | $! End The P3 Check. | ||
635 | $! | ||
636 | $ ENDIF | ||
637 | $! | ||
638 | $! Check To See If P3 Is Blank. | ||
639 | $! | ||
640 | $ IF (P3.EQS."") | ||
641 | $ THEN | ||
642 | $! | ||
643 | $! O.K., The User Didn't Specify A Compiler, Let's Try To | ||
644 | $! Find Out Which One To Use. | ||
645 | $! | ||
646 | $! Check To See If We Have GNU C. | ||
647 | $! | ||
648 | $ IF (F$TRNLNM("GNU_CC").NES."") | ||
649 | $ THEN | ||
650 | $! | ||
651 | $! Looks Like GNUC, Set To Use GNUC. | ||
652 | $! | ||
653 | $ P3 = "GNUC" | ||
654 | $! | ||
655 | $! End The GNU C Compiler Check. | ||
656 | $! | ||
657 | $ ELSE | ||
658 | $! | ||
659 | $! Check To See If We Have VAXC Or DECC. | ||
660 | $! | ||
661 | $ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."") | ||
662 | $ THEN | ||
663 | $! | ||
664 | $! Looks Like DECC, Set To Use DECC. | ||
665 | $! | ||
666 | $ P3 = "DECC" | ||
667 | $! | ||
668 | $! Else... | ||
669 | $! | ||
670 | $ ELSE | ||
671 | $! | ||
672 | $! Looks Like VAXC, Set To Use VAXC. | ||
673 | $! | ||
674 | $ P3 = "VAXC" | ||
675 | $! | ||
676 | $! End The VAXC Compiler Check. | ||
677 | $! | ||
678 | $ ENDIF | ||
679 | $! | ||
680 | $! End The DECC & VAXC Compiler Check. | ||
681 | $! | ||
682 | $ ENDIF | ||
683 | $! | ||
684 | $! End The Compiler Check. | ||
685 | $! | ||
686 | $ ENDIF | ||
687 | $! | ||
688 | $! Check To See If We Have A Option For P4. | ||
689 | $! | ||
690 | $ IF (P4.EQS."") | ||
691 | $ THEN | ||
692 | $! | ||
693 | $! Find out what socket library we have available | ||
694 | $! | ||
695 | $ IF F$PARSE("SOCKETSHR:") .NES. "" | ||
696 | $ THEN | ||
697 | $! | ||
698 | $! We have SOCKETSHR, and it is my opinion that it's the best to use. | ||
699 | $! | ||
700 | $ P4 = "SOCKETSHR" | ||
701 | $! | ||
702 | $! Tell the user | ||
703 | $! | ||
704 | $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP" | ||
705 | $! | ||
706 | $! Else, let's look for something else | ||
707 | $! | ||
708 | $ ELSE | ||
709 | $! | ||
710 | $! Like UCX (the reason to do this before Multinet is that the UCX | ||
711 | $! emulation is easier to use...) | ||
712 | $! | ||
713 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" - | ||
714 | .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" - | ||
715 | .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. "" | ||
716 | $ THEN | ||
717 | $! | ||
718 | $! Last resort: a UCX or UCX-compatible library | ||
719 | $! | ||
720 | $ P4 = "UCX" | ||
721 | $! | ||
722 | $! Tell the user | ||
723 | $! | ||
724 | $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP" | ||
725 | $! | ||
726 | $! That was all... | ||
727 | $! | ||
728 | $ ENDIF | ||
729 | $ ENDIF | ||
730 | $ ENDIF | ||
731 | $! | ||
732 | $! Set Up Initial CC Definitions, Possibly With User Ones | ||
733 | $! | ||
734 | $ CCDEFS = "TCPIP_TYPE_''P4'" | ||
735 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | ||
736 | $ CCEXTRAFLAGS = "" | ||
737 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | ||
738 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX" | ||
739 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | ||
740 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | ||
741 | $! | ||
742 | $! Check To See If The User Entered A Valid Paramter. | ||
743 | $! | ||
744 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") | ||
745 | $ THEN | ||
746 | $! | ||
747 | $! Check To See If The User Wanted DECC. | ||
748 | $! | ||
749 | $ IF (P3.EQS."DECC") | ||
750 | $ THEN | ||
751 | $! | ||
752 | $! Looks Like DECC, Set To Use DECC. | ||
753 | $! | ||
754 | $ COMPILER = "DECC" | ||
755 | $! | ||
756 | $! Tell The User We Are Using DECC. | ||
757 | $! | ||
758 | $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler." | ||
759 | $! | ||
760 | $! Use DECC... | ||
761 | $! | ||
762 | $ CC = "CC" | ||
763 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | ||
764 | THEN CC = "CC/DECC" | ||
765 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | ||
766 | "/NOLIST/PREFIX=ALL" + - | ||
767 | "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS | ||
768 | $! | ||
769 | $! Define The Linker Options File Name. | ||
770 | $! | ||
771 | $ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT" | ||
772 | $! | ||
773 | $! End DECC Check. | ||
774 | $! | ||
775 | $ ENDIF | ||
776 | $! | ||
777 | $! Check To See If We Are To Use VAXC. | ||
778 | $! | ||
779 | $ IF (P3.EQS."VAXC") | ||
780 | $ THEN | ||
781 | $! | ||
782 | $! Looks Like VAXC, Set To Use VAXC. | ||
783 | $! | ||
784 | $ COMPILER = "VAXC" | ||
785 | $! | ||
786 | $! Tell The User We Are Using VAX C. | ||
787 | $! | ||
788 | $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler." | ||
789 | $! | ||
790 | $! Compile Using VAXC. | ||
791 | $! | ||
792 | $ CC = "CC" | ||
793 | $ IF ARCH.EQS."AXP" | ||
794 | $ THEN | ||
795 | $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!" | ||
796 | $ EXIT | ||
797 | $ ENDIF | ||
798 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | ||
799 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | ||
800 | "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS | ||
801 | $ CCDEFS = CCDEFS + ",""VAXC""" | ||
802 | $! | ||
803 | $! Define <sys> As SYS$COMMON:[SYSLIB] | ||
804 | $! | ||
805 | $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] | ||
806 | $! | ||
807 | $! Define The Linker Options File Name. | ||
808 | $! | ||
809 | $ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT" | ||
810 | $! | ||
811 | $! End VAXC Check | ||
812 | $! | ||
813 | $ ENDIF | ||
814 | $! | ||
815 | $! Check To See If We Are To Use GNU C. | ||
816 | $! | ||
817 | $ IF (P3.EQS."GNUC") | ||
818 | $ THEN | ||
819 | $! | ||
820 | $! Looks Like GNUC, Set To Use GNUC. | ||
821 | $! | ||
822 | $ COMPILER = "GNUC" | ||
823 | $! | ||
824 | $! Tell The User We Are Using GNUC. | ||
825 | $! | ||
826 | $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler." | ||
827 | $! | ||
828 | $! Use GNU C... | ||
829 | $! | ||
830 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + - | ||
831 | "/INCLUDE=(SYS$DISK:[-])" + CCEXTRAFLAGS | ||
832 | $! | ||
833 | $! Define The Linker Options File Name. | ||
834 | $! | ||
835 | $ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT" | ||
836 | $! | ||
837 | $! End The GNU C Check. | ||
838 | $! | ||
839 | $ ENDIF | ||
840 | $! | ||
841 | $! Set up default defines | ||
842 | $! | ||
843 | $ CCDEFS = """FLAT_INC=1""," + CCDEFS | ||
844 | $! | ||
845 | $! Check To See If We Are To Compile With RSAREF Routines. | ||
846 | $! | ||
847 | $ IF (RSAREF.EQS."TRUE") | ||
848 | $ THEN | ||
849 | $! | ||
850 | $! Compile With RSAREF. | ||
851 | $! | ||
852 | $ CCDEFS = CCDEFS + ",""RSAref=1""" | ||
853 | $! | ||
854 | $! Tell The User This. | ||
855 | $! | ||
856 | $ WRITE SYS$OUTPUT "Compiling With RSAREF Routines." | ||
857 | $! | ||
858 | $! Else, We Don't Care. Compile Without The RSAREF Library. | ||
859 | $! | ||
860 | $ ELSE | ||
861 | $! | ||
862 | $! Tell The User We Are Compile Without The RSAREF Routines. | ||
863 | $! | ||
864 | $ WRITE SYS$OUTPUT "Compiling Without The RSAREF Routines. | ||
865 | $! | ||
866 | $! End The RSAREF Check. | ||
867 | $! | ||
868 | $ ENDIF | ||
869 | $! | ||
870 | $! Finish up the definition of CC. | ||
871 | $! | ||
872 | $ IF COMPILER .EQS. "DECC" | ||
873 | $ THEN | ||
874 | $ IF CCDISABLEWARNINGS .EQS. "" | ||
875 | $ THEN | ||
876 | $ CC4DISABLEWARNINGS = "DOLLARID" | ||
877 | $ ELSE | ||
878 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" | ||
879 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | ||
880 | $ ENDIF | ||
881 | $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" | ||
882 | $ ELSE | ||
883 | $ CCDISABLEWARNINGS = "" | ||
884 | $ CC4DISABLEWARNINGS = "" | ||
885 | $ ENDIF | ||
886 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | ||
887 | $! | ||
888 | $! Show user the result | ||
889 | $! | ||
890 | $ WRITE SYS$OUTPUT "Main Compiling Command: ",CC | ||
891 | $! | ||
892 | $! Else The User Entered An Invalid Arguement. | ||
893 | $! | ||
894 | $ ELSE | ||
895 | $! | ||
896 | $! Tell The User We Don't Know What They Want. | ||
897 | $! | ||
898 | $ WRITE SYS$OUTPUT "" | ||
899 | $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" | ||
900 | $ WRITE SYS$OUTPUT "" | ||
901 | $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C." | ||
902 | $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C." | ||
903 | $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C." | ||
904 | $ WRITE SYS$OUTPUT "" | ||
905 | $! | ||
906 | $! Time To EXIT. | ||
907 | $! | ||
908 | $ EXIT | ||
909 | $ ENDIF | ||
910 | $! | ||
911 | $! Time to check the contents, and to make sure we get the correct library. | ||
912 | $! | ||
913 | $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" - | ||
914 | .OR. P4.EQS."TCPIP" .OR. P4.EQS."NONE" | ||
915 | $ THEN | ||
916 | $! | ||
917 | $! Check to see if SOCKETSHR was chosen | ||
918 | $! | ||
919 | $ IF P4.EQS."SOCKETSHR" | ||
920 | $ THEN | ||
921 | $! | ||
922 | $! Set the library to use SOCKETSHR | ||
923 | $! | ||
924 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT" | ||
925 | $! | ||
926 | $! Done with SOCKETSHR | ||
927 | $! | ||
928 | $ ENDIF | ||
929 | $! | ||
930 | $! Check to see if MULTINET was chosen | ||
931 | $! | ||
932 | $ IF P4.EQS."MULTINET" | ||
933 | $ THEN | ||
934 | $! | ||
935 | $! Set the library to use UXC emulation. | ||
936 | $! | ||
937 | $ P4 = "UCX" | ||
938 | $! | ||
939 | $! Done with MULTINET | ||
940 | $! | ||
941 | $ ENDIF | ||
942 | $! | ||
943 | $! Check to see if UCX was chosen | ||
944 | $! | ||
945 | $ IF P4.EQS."UCX" | ||
946 | $ THEN | ||
947 | $! | ||
948 | $! Set the library to use UCX. | ||
949 | $! | ||
950 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT" | ||
951 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | ||
952 | $ THEN | ||
953 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | ||
954 | $ ELSE | ||
955 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | ||
956 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT" | ||
957 | $ ENDIF | ||
958 | $! | ||
959 | $! Done with UCX | ||
960 | $! | ||
961 | $ ENDIF | ||
962 | $! | ||
963 | $! Check to see if TCPIP was chosen | ||
964 | $! | ||
965 | $ IF P4.EQS."TCPIP" | ||
966 | $ THEN | ||
967 | $! | ||
968 | $! Set the library to use TCPIP (post UCX). | ||
969 | $! | ||
970 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT" | ||
971 | $! | ||
972 | $! Done with TCPIP | ||
973 | $! | ||
974 | $ ENDIF | ||
975 | $! | ||
976 | $! Check to see if NONE was chosen | ||
977 | $! | ||
978 | $ IF P4.EQS."NONE" | ||
979 | $ THEN | ||
980 | $! | ||
981 | $! Do not use a TCPIP library. | ||
982 | $! | ||
983 | $ TCPIP_LIB = "" | ||
984 | $! | ||
985 | $! Done with NONE | ||
986 | $! | ||
987 | $ ENDIF | ||
988 | $! | ||
989 | $! Print info | ||
990 | $! | ||
991 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | ||
992 | $! | ||
993 | $! Else The User Entered An Invalid Arguement. | ||
994 | $! | ||
995 | $ ELSE | ||
996 | $! | ||
997 | $! Tell The User We Don't Know What They Want. | ||
998 | $! | ||
999 | $ WRITE SYS$OUTPUT "" | ||
1000 | $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:" | ||
1001 | $ WRITE SYS$OUTPUT "" | ||
1002 | $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library." | ||
1003 | $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library." | ||
1004 | $ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library." | ||
1005 | $ WRITE SYS$OUTPUT "" | ||
1006 | $! | ||
1007 | $! Time To EXIT. | ||
1008 | $! | ||
1009 | $ EXIT | ||
1010 | $! | ||
1011 | $! Done with TCP/IP libraries | ||
1012 | $! | ||
1013 | $ ENDIF | ||
1014 | $! | ||
1015 | $! Special Threads For OpenVMS v7.1 Or Later | ||
1016 | $! | ||
1017 | $! Written By: Richard Levitte | ||
1018 | $! richard@levitte.org | ||
1019 | $! | ||
1020 | $! | ||
1021 | $! Check To See If We Have A Option For P5. | ||
1022 | $! | ||
1023 | $ IF (P5.EQS."") | ||
1024 | $ THEN | ||
1025 | $! | ||
1026 | $! Get The Version Of VMS We Are Using. | ||
1027 | $! | ||
1028 | $ ISSEVEN := | ||
1029 | $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION"))) | ||
1030 | $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP)) | ||
1031 | $! | ||
1032 | $! Check To See If The VMS Version Is v7.1 Or Later. | ||
1033 | $! | ||
1034 | $ IF (TMP.GE.71) | ||
1035 | $ THEN | ||
1036 | $! | ||
1037 | $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads. | ||
1038 | $! | ||
1039 | $ ISSEVEN := ,PTHREAD_USE_D4 | ||
1040 | $! | ||
1041 | $! End The VMS Version Check. | ||
1042 | $! | ||
1043 | $ ENDIF | ||
1044 | $! | ||
1045 | $! End The P5 Check. | ||
1046 | $! | ||
1047 | $ ENDIF | ||
1048 | $! | ||
1049 | $! Time To RETURN... | ||
1050 | $! | ||
1051 | $ RETURN | ||
1052 | $! | ||
1053 | $ INITIALISE: | ||
1054 | $! | ||
1055 | $! Save old value of the logical name OPENSSL | ||
1056 | $! | ||
1057 | $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE") | ||
1058 | $! | ||
1059 | $! Save directory information | ||
1060 | $! | ||
1061 | $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;" | ||
1062 | $ __HERE = F$EDIT(__HERE,"UPCASE") | ||
1063 | $ __TOP = __HERE - "TEST]" | ||
1064 | $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" | ||
1065 | $! | ||
1066 | $! Set up the logical name OPENSSL to point at the include directory | ||
1067 | $! | ||
1068 | $ DEFINE OPENSSL/NOLOG '__INCLUDE' | ||
1069 | $! | ||
1070 | $! Done | ||
1071 | $! | ||
1072 | $ RETURN | ||
1073 | $! | ||
1074 | $ CLEANUP: | ||
1075 | $! | ||
1076 | $! Restore the logical name OPENSSL if it had a value | ||
1077 | $! | ||
1078 | $ IF __SAVE_OPENSSL .EQS. "" | ||
1079 | $ THEN | ||
1080 | $ DEASSIGN OPENSSL | ||
1081 | $ ELSE | ||
1082 | $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL' | ||
1083 | $ ENDIF | ||
1084 | $! | ||
1085 | $! Done | ||
1086 | $! | ||
1087 | $ RETURN | ||
diff --git a/src/lib/libssl/test/md4test.c b/src/lib/libssl/test/md4test.c new file mode 100644 index 0000000000..e0fdc42282 --- /dev/null +++ b/src/lib/libssl/test/md4test.c | |||
@@ -0,0 +1,134 @@ | |||
1 | /* crypto/md4/md4test.c */ | ||
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * This package is an SSL implementation written | ||
6 | * by Eric Young (eay@cryptsoft.com). | ||
7 | * The implementation was written so as to conform with Netscapes SSL. | ||
8 | * | ||
9 | * This library is free for commercial and non-commercial use as long as | ||
10 | * the following conditions are aheared to. The following conditions | ||
11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
13 | * included with this distribution is covered by the same copyright terms | ||
14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
15 | * | ||
16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
17 | * the code are not to be removed. | ||
18 | * If this package is used in a product, Eric Young should be given attribution | ||
19 | * as the author of the parts of the library used. | ||
20 | * This can be in the form of a textual message at program startup or | ||
21 | * in documentation (online or textual) provided with the package. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without | ||
24 | * modification, are permitted provided that the following conditions | ||
25 | * are met: | ||
26 | * 1. Redistributions of source code must retain the copyright | ||
27 | * notice, this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
29 | * notice, this list of conditions and the following disclaimer in the | ||
30 | * documentation and/or other materials provided with the distribution. | ||
31 | * 3. All advertising materials mentioning features or use of this software | ||
32 | * must display the following acknowledgement: | ||
33 | * "This product includes cryptographic software written by | ||
34 | * Eric Young (eay@cryptsoft.com)" | ||
35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
36 | * being used are not cryptographic related :-). | ||
37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
38 | * the apps directory (application code) you must include an acknowledgement: | ||
39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
40 | * | ||
41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
51 | * SUCH DAMAGE. | ||
52 | * | ||
53 | * The licence and distribution terms for any publically available version or | ||
54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
55 | * copied and put under another distribution licence | ||
56 | * [including the GNU Public Licence.] | ||
57 | */ | ||
58 | |||
59 | #include <stdio.h> | ||
60 | #include <string.h> | ||
61 | #include <stdlib.h> | ||
62 | |||
63 | #ifdef OPENSSL_NO_MD4 | ||
64 | int main(int argc, char *argv[]) | ||
65 | { | ||
66 | printf("No MD4 support\n"); | ||
67 | return(0); | ||
68 | } | ||
69 | #else | ||
70 | #include <openssl/evp.h> | ||
71 | #include <openssl/md4.h> | ||
72 | |||
73 | static char *test[]={ | ||
74 | "", | ||
75 | "a", | ||
76 | "abc", | ||
77 | "message digest", | ||
78 | "abcdefghijklmnopqrstuvwxyz", | ||
79 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", | ||
80 | "12345678901234567890123456789012345678901234567890123456789012345678901234567890", | ||
81 | NULL, | ||
82 | }; | ||
83 | |||
84 | static char *ret[]={ | ||
85 | "31d6cfe0d16ae931b73c59d7e0c089c0", | ||
86 | "bde52cb31de33e46245e05fbdbd6fb24", | ||
87 | "a448017aaf21d8525fc10ae87aa6729d", | ||
88 | "d9130a8164549fe818874806e1c7014b", | ||
89 | "d79e1c308aa5bbcdeea8ed63df412da9", | ||
90 | "043f8582f241db351ce627e153e7f0e4", | ||
91 | "e33b4ddc9c38f2199c3e7b164fcc0536", | ||
92 | }; | ||
93 | |||
94 | static char *pt(unsigned char *md); | ||
95 | int main(int argc, char *argv[]) | ||
96 | { | ||
97 | int i,err=0; | ||
98 | unsigned char **P,**R; | ||
99 | char *p; | ||
100 | unsigned char md[MD4_DIGEST_LENGTH]; | ||
101 | |||
102 | P=(unsigned char **)test; | ||
103 | R=(unsigned char **)ret; | ||
104 | i=1; | ||
105 | while (*P != NULL) | ||
106 | { | ||
107 | EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md4(), NULL); | ||
108 | p=pt(md); | ||
109 | if (strcmp(p,(char *)*R) != 0) | ||
110 | { | ||
111 | printf("error calculating MD4 on '%s'\n",*P); | ||
112 | printf("got %s instead of %s\n",p,*R); | ||
113 | err++; | ||
114 | } | ||
115 | else | ||
116 | printf("test %d ok\n",i); | ||
117 | i++; | ||
118 | R++; | ||
119 | P++; | ||
120 | } | ||
121 | exit(err); | ||
122 | return(0); | ||
123 | } | ||
124 | |||
125 | static char *pt(unsigned char *md) | ||
126 | { | ||
127 | int i; | ||
128 | static char buf[80]; | ||
129 | |||
130 | for (i=0; i<MD4_DIGEST_LENGTH; i++) | ||
131 | sprintf(&(buf[i*2]),"%02x",md[i]); | ||
132 | return(buf); | ||
133 | } | ||
134 | #endif | ||
diff --git a/src/lib/libssl/test/rsa_test.c b/src/lib/libssl/test/rsa_test.c new file mode 100644 index 0000000000..b8b462d33b --- /dev/null +++ b/src/lib/libssl/test/rsa_test.c | |||
@@ -0,0 +1,318 @@ | |||
1 | /* test vectors from p1ovect1.txt */ | ||
2 | |||
3 | #include <stdio.h> | ||
4 | #include <string.h> | ||
5 | |||
6 | #include "e_os.h" | ||
7 | |||
8 | #include <openssl/crypto.h> | ||
9 | #include <openssl/err.h> | ||
10 | #include <openssl/rand.h> | ||
11 | #ifdef OPENSSL_NO_RSA | ||
12 | int main(int argc, char *argv[]) | ||
13 | { | ||
14 | printf("No RSA support\n"); | ||
15 | return(0); | ||
16 | } | ||
17 | #else | ||
18 | #include <openssl/rsa.h> | ||
19 | #include <openssl/engine.h> | ||
20 | |||
21 | #define SetKey \ | ||
22 | key->n = BN_bin2bn(n, sizeof(n)-1, key->n); \ | ||
23 | key->e = BN_bin2bn(e, sizeof(e)-1, key->e); \ | ||
24 | key->d = BN_bin2bn(d, sizeof(d)-1, key->d); \ | ||
25 | key->p = BN_bin2bn(p, sizeof(p)-1, key->p); \ | ||
26 | key->q = BN_bin2bn(q, sizeof(q)-1, key->q); \ | ||
27 | key->dmp1 = BN_bin2bn(dmp1, sizeof(dmp1)-1, key->dmp1); \ | ||
28 | key->dmq1 = BN_bin2bn(dmq1, sizeof(dmq1)-1, key->dmq1); \ | ||
29 | key->iqmp = BN_bin2bn(iqmp, sizeof(iqmp)-1, key->iqmp); \ | ||
30 | memcpy(c, ctext_ex, sizeof(ctext_ex) - 1); \ | ||
31 | return (sizeof(ctext_ex) - 1); | ||
32 | |||
33 | static int key1(RSA *key, unsigned char *c) | ||
34 | { | ||
35 | static unsigned char n[] = | ||
36 | "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F" | ||
37 | "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5" | ||
38 | "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93" | ||
39 | "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1" | ||
40 | "\xF5"; | ||
41 | |||
42 | static unsigned char e[] = "\x11"; | ||
43 | |||
44 | static unsigned char d[] = | ||
45 | "\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44" | ||
46 | "\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64" | ||
47 | "\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9" | ||
48 | "\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51"; | ||
49 | |||
50 | static unsigned char p[] = | ||
51 | "\x00\xD8\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5" | ||
52 | "\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x12" | ||
53 | "\x0D"; | ||
54 | |||
55 | static unsigned char q[] = | ||
56 | "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9" | ||
57 | "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D" | ||
58 | "\x89"; | ||
59 | |||
60 | static unsigned char dmp1[] = | ||
61 | "\x59\x0B\x95\x72\xA2\xC2\xA9\xC4\x06\x05\x9D\xC2\xAB\x2F\x1D\xAF" | ||
62 | "\xEB\x7E\x8B\x4F\x10\xA7\x54\x9E\x8E\xED\xF5\xB4\xFC\xE0\x9E\x05"; | ||
63 | |||
64 | static unsigned char dmq1[] = | ||
65 | "\x00\x8E\x3C\x05\x21\xFE\x15\xE0\xEA\x06\xA3\x6F\xF0\xF1\x0C\x99" | ||
66 | "\x52\xC3\x5B\x7A\x75\x14\xFD\x32\x38\xB8\x0A\xAD\x52\x98\x62\x8D" | ||
67 | "\x51"; | ||
68 | |||
69 | static unsigned char iqmp[] = | ||
70 | "\x36\x3F\xF7\x18\x9D\xA8\xE9\x0B\x1D\x34\x1F\x71\xD0\x9B\x76\xA8" | ||
71 | "\xA9\x43\xE1\x1D\x10\xB2\x4D\x24\x9F\x2D\xEA\xFE\xF8\x0C\x18\x26"; | ||
72 | |||
73 | static unsigned char ctext_ex[] = | ||
74 | "\x1b\x8f\x05\xf9\xca\x1a\x79\x52\x6e\x53\xf3\xcc\x51\x4f\xdb\x89" | ||
75 | "\x2b\xfb\x91\x93\x23\x1e\x78\xb9\x92\xe6\x8d\x50\xa4\x80\xcb\x52" | ||
76 | "\x33\x89\x5c\x74\x95\x8d\x5d\x02\xab\x8c\x0f\xd0\x40\xeb\x58\x44" | ||
77 | "\xb0\x05\xc3\x9e\xd8\x27\x4a\x9d\xbf\xa8\x06\x71\x40\x94\x39\xd2"; | ||
78 | |||
79 | SetKey; | ||
80 | } | ||
81 | |||
82 | static int key2(RSA *key, unsigned char *c) | ||
83 | { | ||
84 | static unsigned char n[] = | ||
85 | "\x00\xA3\x07\x9A\x90\xDF\x0D\xFD\x72\xAC\x09\x0C\xCC\x2A\x78\xB8" | ||
86 | "\x74\x13\x13\x3E\x40\x75\x9C\x98\xFA\xF8\x20\x4F\x35\x8A\x0B\x26" | ||
87 | "\x3C\x67\x70\xE7\x83\xA9\x3B\x69\x71\xB7\x37\x79\xD2\x71\x7B\xE8" | ||
88 | "\x34\x77\xCF"; | ||
89 | |||
90 | static unsigned char e[] = "\x3"; | ||
91 | |||
92 | static unsigned char d[] = | ||
93 | "\x6C\xAF\xBC\x60\x94\xB3\xFE\x4C\x72\xB0\xB3\x32\xC6\xFB\x25\xA2" | ||
94 | "\xB7\x62\x29\x80\x4E\x68\x65\xFC\xA4\x5A\x74\xDF\x0F\x8F\xB8\x41" | ||
95 | "\x3B\x52\xC0\xD0\xE5\x3D\x9B\x59\x0F\xF1\x9B\xE7\x9F\x49\xDD\x21" | ||
96 | "\xE5\xEB"; | ||
97 | |||
98 | static unsigned char p[] = | ||
99 | "\x00\xCF\x20\x35\x02\x8B\x9D\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92" | ||
100 | "\xEA\x0D\xA3\xB4\x32\x04\xB5\xCF\xCE\x91"; | ||
101 | |||
102 | static unsigned char q[] = | ||
103 | "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9" | ||
104 | "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5F"; | ||
105 | |||
106 | static unsigned char dmp1[] = | ||
107 | "\x00\x8A\x15\x78\xAC\x5D\x13\xAF\x10\x2B\x22\xB9\x99\xCD\x74\x61" | ||
108 | "\xF1\x5E\x6D\x22\xCC\x03\x23\xDF\xDF\x0B"; | ||
109 | |||
110 | static unsigned char dmq1[] = | ||
111 | "\x00\x86\x55\x21\x4A\xC5\x4D\x8D\x4E\xCD\x61\x77\xF1\xC7\x36\x90" | ||
112 | "\xCE\x2A\x48\x2C\x8B\x05\x99\xCB\xE0\x3F"; | ||
113 | |||
114 | static unsigned char iqmp[] = | ||
115 | "\x00\x83\xEF\xEF\xB8\xA9\xA4\x0D\x1D\xB6\xED\x98\xAD\x84\xED\x13" | ||
116 | "\x35\xDC\xC1\x08\xF3\x22\xD0\x57\xCF\x8D"; | ||
117 | |||
118 | static unsigned char ctext_ex[] = | ||
119 | "\x14\xbd\xdd\x28\xc9\x83\x35\x19\x23\x80\xe8\xe5\x49\xb1\x58\x2a" | ||
120 | "\x8b\x40\xb4\x48\x6d\x03\xa6\xa5\x31\x1f\x1f\xd5\xf0\xa1\x80\xe4" | ||
121 | "\x17\x53\x03\x29\xa9\x34\x90\x74\xb1\x52\x13\x54\x29\x08\x24\x52" | ||
122 | "\x62\x51"; | ||
123 | |||
124 | SetKey; | ||
125 | } | ||
126 | |||
127 | static int key3(RSA *key, unsigned char *c) | ||
128 | { | ||
129 | static unsigned char n[] = | ||
130 | "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71" | ||
131 | "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5" | ||
132 | "\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD" | ||
133 | "\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80" | ||
134 | "\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25" | ||
135 | "\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39" | ||
136 | "\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68" | ||
137 | "\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD" | ||
138 | "\xCB"; | ||
139 | |||
140 | static unsigned char e[] = "\x11"; | ||
141 | |||
142 | static unsigned char d[] = | ||
143 | "\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD" | ||
144 | "\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41" | ||
145 | "\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69" | ||
146 | "\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA" | ||
147 | "\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94" | ||
148 | "\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A" | ||
149 | "\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94" | ||
150 | "\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3" | ||
151 | "\xC1"; | ||
152 | |||
153 | static unsigned char p[] = | ||
154 | "\x00\xEE\xCF\xAE\x81\xB1\xB9\xB3\xC9\x08\x81\x0B\x10\xA1\xB5\x60" | ||
155 | "\x01\x99\xEB\x9F\x44\xAE\xF4\xFD\xA4\x93\xB8\x1A\x9E\x3D\x84\xF6" | ||
156 | "\x32\x12\x4E\xF0\x23\x6E\x5D\x1E\x3B\x7E\x28\xFA\xE7\xAA\x04\x0A" | ||
157 | "\x2D\x5B\x25\x21\x76\x45\x9D\x1F\x39\x75\x41\xBA\x2A\x58\xFB\x65" | ||
158 | "\x99"; | ||
159 | |||
160 | static unsigned char q[] = | ||
161 | "\x00\xC9\x7F\xB1\xF0\x27\xF4\x53\xF6\x34\x12\x33\xEA\xAA\xD1\xD9" | ||
162 | "\x35\x3F\x6C\x42\xD0\x88\x66\xB1\xD0\x5A\x0F\x20\x35\x02\x8B\x9D" | ||
163 | "\x86\x98\x40\xB4\x16\x66\xB4\x2E\x92\xEA\x0D\xA3\xB4\x32\x04\xB5" | ||
164 | "\xCF\xCE\x33\x52\x52\x4D\x04\x16\xA5\xA4\x41\xE7\x00\xAF\x46\x15" | ||
165 | "\x03"; | ||
166 | |||
167 | static unsigned char dmp1[] = | ||
168 | "\x54\x49\x4C\xA6\x3E\xBA\x03\x37\xE4\xE2\x40\x23\xFC\xD6\x9A\x5A" | ||
169 | "\xEB\x07\xDD\xDC\x01\x83\xA4\xD0\xAC\x9B\x54\xB0\x51\xF2\xB1\x3E" | ||
170 | "\xD9\x49\x09\x75\xEA\xB7\x74\x14\xFF\x59\xC1\xF7\x69\x2E\x9A\x2E" | ||
171 | "\x20\x2B\x38\xFC\x91\x0A\x47\x41\x74\xAD\xC9\x3C\x1F\x67\xC9\x81"; | ||
172 | |||
173 | static unsigned char dmq1[] = | ||
174 | "\x47\x1E\x02\x90\xFF\x0A\xF0\x75\x03\x51\xB7\xF8\x78\x86\x4C\xA9" | ||
175 | "\x61\xAD\xBD\x3A\x8A\x7E\x99\x1C\x5C\x05\x56\xA9\x4C\x31\x46\xA7" | ||
176 | "\xF9\x80\x3F\x8F\x6F\x8A\xE3\x42\xE9\x31\xFD\x8A\xE4\x7A\x22\x0D" | ||
177 | "\x1B\x99\xA4\x95\x84\x98\x07\xFE\x39\xF9\x24\x5A\x98\x36\xDA\x3D"; | ||
178 | |||
179 | static unsigned char iqmp[] = | ||
180 | "\x00\xB0\x6C\x4F\xDA\xBB\x63\x01\x19\x8D\x26\x5B\xDB\xAE\x94\x23" | ||
181 | "\xB3\x80\xF2\x71\xF7\x34\x53\x88\x50\x93\x07\x7F\xCD\x39\xE2\x11" | ||
182 | "\x9F\xC9\x86\x32\x15\x4F\x58\x83\xB1\x67\xA9\x67\xBF\x40\x2B\x4E" | ||
183 | "\x9E\x2E\x0F\x96\x56\xE6\x98\xEA\x36\x66\xED\xFB\x25\x79\x80\x39" | ||
184 | "\xF7"; | ||
185 | |||
186 | static unsigned char ctext_ex[] = | ||
187 | "\xb8\x24\x6b\x56\xa6\xed\x58\x81\xae\xb5\x85\xd9\xa2\x5b\x2a\xd7" | ||
188 | "\x90\xc4\x17\xe0\x80\x68\x1b\xf1\xac\x2b\xc3\xde\xb6\x9d\x8b\xce" | ||
189 | "\xf0\xc4\x36\x6f\xec\x40\x0a\xf0\x52\xa7\x2e\x9b\x0e\xff\xb5\xb3" | ||
190 | "\xf2\xf1\x92\xdb\xea\xca\x03\xc1\x27\x40\x05\x71\x13\xbf\x1f\x06" | ||
191 | "\x69\xac\x22\xe9\xf3\xa7\x85\x2e\x3c\x15\xd9\x13\xca\xb0\xb8\x86" | ||
192 | "\x3a\x95\xc9\x92\x94\xce\x86\x74\x21\x49\x54\x61\x03\x46\xf4\xd4" | ||
193 | "\x74\xb2\x6f\x7c\x48\xb4\x2e\xe6\x8e\x1f\x57\x2a\x1f\xc4\x02\x6a" | ||
194 | "\xc4\x56\xb4\xf5\x9f\x7b\x62\x1e\xa1\xb9\xd8\x8f\x64\x20\x2f\xb1"; | ||
195 | |||
196 | SetKey; | ||
197 | } | ||
198 | |||
199 | static int pad_unknown(void) | ||
200 | { | ||
201 | unsigned long l; | ||
202 | while ((l = ERR_get_error()) != 0) | ||
203 | if (ERR_GET_REASON(l) == RSA_R_UNKNOWN_PADDING_TYPE) | ||
204 | return(1); | ||
205 | return(0); | ||
206 | } | ||
207 | |||
208 | static const char rnd_seed[] = "string to make the random number generator think it has entropy"; | ||
209 | |||
210 | int main(int argc, char *argv[]) | ||
211 | { | ||
212 | int err=0; | ||
213 | int v; | ||
214 | RSA *key; | ||
215 | unsigned char ptext[256]; | ||
216 | unsigned char ctext[256]; | ||
217 | static unsigned char ptext_ex[] = "\x54\x85\x9b\x34\x2c\x49\xea\x2a"; | ||
218 | unsigned char ctext_ex[256]; | ||
219 | int plen; | ||
220 | int clen = 0; | ||
221 | int num; | ||
222 | |||
223 | CRYPTO_malloc_debug_init(); | ||
224 | CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL); | ||
225 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
226 | |||
227 | RAND_seed(rnd_seed, sizeof rnd_seed); /* or OAEP may fail */ | ||
228 | |||
229 | plen = sizeof(ptext_ex) - 1; | ||
230 | |||
231 | for (v = 0; v < 3; v++) | ||
232 | { | ||
233 | key = RSA_new(); | ||
234 | switch (v) { | ||
235 | case 0: | ||
236 | clen = key1(key, ctext_ex); | ||
237 | break; | ||
238 | case 1: | ||
239 | clen = key2(key, ctext_ex); | ||
240 | break; | ||
241 | case 2: | ||
242 | clen = key3(key, ctext_ex); | ||
243 | break; | ||
244 | } | ||
245 | |||
246 | num = RSA_public_encrypt(plen, ptext_ex, ctext, key, | ||
247 | RSA_PKCS1_PADDING); | ||
248 | if (num != clen) | ||
249 | { | ||
250 | printf("PKCS#1 v1.5 encryption failed!\n"); | ||
251 | err=1; | ||
252 | goto oaep; | ||
253 | } | ||
254 | |||
255 | num = RSA_private_decrypt(num, ctext, ptext, key, | ||
256 | RSA_PKCS1_PADDING); | ||
257 | if (num != plen || memcmp(ptext, ptext_ex, num) != 0) | ||
258 | { | ||
259 | printf("PKCS#1 v1.5 decryption failed!\n"); | ||
260 | err=1; | ||
261 | } | ||
262 | else | ||
263 | printf("PKCS #1 v1.5 encryption/decryption ok\n"); | ||
264 | |||
265 | oaep: | ||
266 | ERR_clear_error(); | ||
267 | num = RSA_public_encrypt(plen, ptext_ex, ctext, key, | ||
268 | RSA_PKCS1_OAEP_PADDING); | ||
269 | if (num == -1 && pad_unknown()) | ||
270 | { | ||
271 | printf("No OAEP support\n"); | ||
272 | goto next; | ||
273 | } | ||
274 | if (num != clen) | ||
275 | { | ||
276 | printf("OAEP encryption failed!\n"); | ||
277 | err=1; | ||
278 | goto next; | ||
279 | } | ||
280 | |||
281 | num = RSA_private_decrypt(num, ctext, ptext, key, | ||
282 | RSA_PKCS1_OAEP_PADDING); | ||
283 | if (num != plen || memcmp(ptext, ptext_ex, num) != 0) | ||
284 | { | ||
285 | printf("OAEP decryption (encrypted data) failed!\n"); | ||
286 | err=1; | ||
287 | } | ||
288 | else if (memcmp(ctext, ctext_ex, num) == 0) | ||
289 | { | ||
290 | printf("OAEP test vector %d passed!\n", v); | ||
291 | goto next; | ||
292 | } | ||
293 | |||
294 | /* Different ciphertexts (rsa_oaep.c without -DPKCS_TESTVECT). | ||
295 | Try decrypting ctext_ex */ | ||
296 | |||
297 | num = RSA_private_decrypt(clen, ctext_ex, ptext, key, | ||
298 | RSA_PKCS1_OAEP_PADDING); | ||
299 | |||
300 | if (num != plen || memcmp(ptext, ptext_ex, num) != 0) | ||
301 | { | ||
302 | printf("OAEP decryption (test vector data) failed!\n"); | ||
303 | err=1; | ||
304 | } | ||
305 | else | ||
306 | printf("OAEP encryption/decryption ok\n"); | ||
307 | next: | ||
308 | RSA_free(key); | ||
309 | } | ||
310 | |||
311 | CRYPTO_cleanup_all_ex_data(); | ||
312 | ERR_remove_state(0); | ||
313 | |||
314 | CRYPTO_mem_leaks_fp(stderr); | ||
315 | |||
316 | return err; | ||
317 | } | ||
318 | #endif | ||
diff --git a/src/lib/libssl/test/tcrl.com b/src/lib/libssl/test/tcrl.com new file mode 100644 index 0000000000..2e6ab2814d --- /dev/null +++ b/src/lib/libssl/test/tcrl.com | |||
@@ -0,0 +1,81 @@ | |||
1 | $! TCRL.COM -- Tests crl keys | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ cmd := mcr 'exe_dir'openssl crl | ||
8 | $ | ||
9 | $ t := testcrl.pem | ||
10 | $ if p1 .nes. "" then t = p1 | ||
11 | $ | ||
12 | $ write sys$output "testing CRL conversions" | ||
13 | $ if f$search("fff.*") .nes "" then delete fff.*;* | ||
14 | $ if f$search("ff.*") .nes "" then delete ff.*;* | ||
15 | $ if f$search("f.*") .nes "" then delete f.*;* | ||
16 | $ copy 't' fff.p | ||
17 | $ | ||
18 | $ write sys$output "p -> d" | ||
19 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
20 | $ if $severity .ne. 1 then exit 3 | ||
21 | $! write sys$output "p -> t" | ||
22 | $! 'cmd' -in fff.p -inform p -outform t -out f.t | ||
23 | $! if $severity .ne. 1 then exit 3 | ||
24 | $ write sys$output "p -> p" | ||
25 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
26 | $ if $severity .ne. 1 then exit 3 | ||
27 | $ | ||
28 | $ write sys$output "d -> d" | ||
29 | $ 'cmd' -in f.d -inform d -outform d -out ff.d1 | ||
30 | $ if $severity .ne. 1 then exit 3 | ||
31 | $! write sys$output "t -> d" | ||
32 | $! 'cmd' -in f.t -inform t -outform d -out ff.d2 | ||
33 | $! if $severity .ne. 1 then exit 3 | ||
34 | $ write sys$output "p -> d" | ||
35 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
36 | $ if $severity .ne. 1 then exit 3 | ||
37 | $ | ||
38 | $! write sys$output "d -> t" | ||
39 | $! 'cmd' -in f.d -inform d -outform t -out ff.t1 | ||
40 | $! if $severity .ne. 1 then exit 3 | ||
41 | $! write sys$output "t -> t" | ||
42 | $! 'cmd' -in f.t -inform t -outform t -out ff.t2 | ||
43 | $! if $severity .ne. 1 then exit 3 | ||
44 | $! write sys$output "p -> t" | ||
45 | $! 'cmd' -in f.p -inform p -outform t -out ff.t3 | ||
46 | $! if $severity .ne. 1 then exit 3 | ||
47 | $ | ||
48 | $ write sys$output "d -> p" | ||
49 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
50 | $ if $severity .ne. 1 then exit 3 | ||
51 | $! write sys$output "t -> p" | ||
52 | $! 'cmd' -in f.t -inform t -outform p -out ff.p2 | ||
53 | $! if $severity .ne. 1 then exit 3 | ||
54 | $ write sys$output "p -> p" | ||
55 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ | ||
58 | $ backup/compare fff.p f.p | ||
59 | $ if $severity .ne. 1 then exit 3 | ||
60 | $ backup/compare fff.p ff.p1 | ||
61 | $ if $severity .ne. 1 then exit 3 | ||
62 | $! backup/compare fff.p ff.p2 | ||
63 | $! if $severity .ne. 1 then exit 3 | ||
64 | $ backup/compare fff.p ff.p3 | ||
65 | $ if $severity .ne. 1 then exit 3 | ||
66 | $ | ||
67 | $! backup/compare f.t ff.t1 | ||
68 | $! if $severity .ne. 1 then exit 3 | ||
69 | $! backup/compare f.t ff.t2 | ||
70 | $! if $severity .ne. 1 then exit 3 | ||
71 | $! backup/compare f.t ff.t3 | ||
72 | $! if $severity .ne. 1 then exit 3 | ||
73 | $ | ||
74 | $ backup/compare f.p ff.p1 | ||
75 | $ if $severity .ne. 1 then exit 3 | ||
76 | $! backup/compare f.p ff.p2 | ||
77 | $! if $severity .ne. 1 then exit 3 | ||
78 | $ backup/compare f.p ff.p3 | ||
79 | $ if $severity .ne. 1 then exit 3 | ||
80 | $ | ||
81 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/testca.com b/src/lib/libssl/test/testca.com new file mode 100644 index 0000000000..c670f2bf5f --- /dev/null +++ b/src/lib/libssl/test/testca.com | |||
@@ -0,0 +1,78 @@ | |||
1 | $! TESTCA.COM | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ openssl := mcr 'exe_dir'openssl | ||
8 | $ | ||
9 | $ SSLEAY_CONFIG="-config ""CAss.cnf""" | ||
10 | $ | ||
11 | $ set noon | ||
12 | $ if f$search("demoCA.dir") .nes. "" | ||
13 | $ then | ||
14 | $ call deltree [.demoCA]*.* | ||
15 | $ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) demoCA.dir;* | ||
16 | $ delete demoCA.dir;* | ||
17 | $ endif | ||
18 | $ set on | ||
19 | $ open/read sys$ca_input VMSca-response.1 | ||
20 | $ @[-.apps]CA.com -input sys$ca_input -newca | ||
21 | $ close sys$ca_input | ||
22 | $ if $severity .ne. 1 then exit 3 | ||
23 | $ | ||
24 | $ | ||
25 | $ SSLEAY_CONFIG="-config ""Uss.cnf""" | ||
26 | $ @[-.apps]CA.com -newreq | ||
27 | $ if $severity .ne. 1 then exit 3 | ||
28 | $ | ||
29 | $ | ||
30 | $ SSLEAY_CONFIG="-config [-.apps]openssl-vms.cnf" | ||
31 | $ open/read sys$ca_input VMSca-response.2 | ||
32 | $ @[-.apps]CA.com -input sys$ca_input -sign | ||
33 | $ close sys$ca_input | ||
34 | $ if $severity .ne. 1 then exit 3 | ||
35 | $ | ||
36 | $ | ||
37 | $ @[-.apps]CA.com -verify newcert.pem | ||
38 | $ if $severity .ne. 1 then exit 3 | ||
39 | $ | ||
40 | $ set noon | ||
41 | $ call deltree [.demoCA]*.* | ||
42 | $ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) demoCA.dir;* | ||
43 | $ delete demoCA.dir;* | ||
44 | $ if f$search("newcert.pem") .nes. "" then delete newcert.pem;* | ||
45 | $ if f$search("newcert.pem") .nes. "" then delete newreq.pem;* | ||
46 | $ set on | ||
47 | $! #usage: CA -newcert|-newreq|-newca|-sign|-verify | ||
48 | $ | ||
49 | $ exit | ||
50 | $ | ||
51 | $ deltree: subroutine ! P1 is a name of a directory | ||
52 | $ on control_y then goto dt_STOP | ||
53 | $ on warning then goto dt_exit | ||
54 | $ _dt_def = f$trnlnm("SYS$DISK")+f$directory() | ||
55 | $ if f$parse(p1) .eqs. "" then exit | ||
56 | $ set default 'f$parse(p1,,,"DEVICE")''f$parse(p1,,,"DIRECTORY")' | ||
57 | $ p1 = f$parse(p1,,,"NAME") + f$parse(p1,,,"TYPE") | ||
58 | $ _fp = f$parse(".DIR",p1) | ||
59 | $ dt_loop: | ||
60 | $ _f = f$search(_fp) | ||
61 | $ if _f .eqs. "" then goto dt_loopend | ||
62 | $ call deltree [.'f$parse(_f,,,"NAME")']*.* | ||
63 | $ goto dt_loop | ||
64 | $ dt_loopend: | ||
65 | $ _fp = f$parse(p1,".;*") | ||
66 | $ if f$search(_fp) .eqs. "" then goto dt_exit | ||
67 | $ set noon | ||
68 | $ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) '_fp' | ||
69 | $ set on | ||
70 | $ delete/nolog '_fp' | ||
71 | $ dt_exit: | ||
72 | $ set default '_dt_def' | ||
73 | $ exit | ||
74 | $ dt_STOP: | ||
75 | $ set default '_dt_def' | ||
76 | $ stop/id="" | ||
77 | $ exit | ||
78 | $ endsubroutine | ||
diff --git a/src/lib/libssl/test/testenc.com b/src/lib/libssl/test/testenc.com new file mode 100644 index 0000000000..3b66f2e0d0 --- /dev/null +++ b/src/lib/libssl/test/testenc.com | |||
@@ -0,0 +1,60 @@ | |||
1 | $! TESTENC.COM -- Test encoding and decoding | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ testsrc := makefile.ssl | ||
8 | $ test := p.txt | ||
9 | $ cmd := mcr 'exe_dir'openssl | ||
10 | $ | ||
11 | $ if f$search(test) .nes. "" then delete 'test';* | ||
12 | $ copy 'testsrc' 'test' | ||
13 | $ | ||
14 | $ if f$search(test+"-cipher") .nes. "" then delete 'test'-cipher;* | ||
15 | $ if f$search(test+"-clear") .nes. "" then delete 'test'-clear;* | ||
16 | $ | ||
17 | $ write sys$output "cat" | ||
18 | $ 'cmd' enc -in 'test' -out 'test'-cipher | ||
19 | $ 'cmd' enc -in 'test'-cipher -out 'test'-clear | ||
20 | $ backup/compare 'test' 'test'-clear | ||
21 | $ if $severity .ne. 1 then exit 3 | ||
22 | $ delete 'test'-cipher;*,'test'-clear;* | ||
23 | $ | ||
24 | $ write sys$output "base64" | ||
25 | $ 'cmd' enc -a -e -in 'test' -out 'test'-cipher | ||
26 | $ 'cmd' enc -a -d -in 'test'-cipher -out 'test'-clear | ||
27 | $ backup/compare 'test' 'test'-clear | ||
28 | $ if $severity .ne. 1 then exit 3 | ||
29 | $ delete 'test'-cipher;*,'test'-clear;* | ||
30 | $ | ||
31 | $ define/user sys$output 'test'-cipher-commands | ||
32 | $ 'cmd' list-cipher-commands | ||
33 | $ open/read f 'test'-cipher-commands | ||
34 | $ loop_cipher_commands: | ||
35 | $ read/end=loop_cipher_commands_end f i | ||
36 | $ write sys$output i | ||
37 | $ | ||
38 | $ if f$search(test+"-"+i+"-cipher") .nes. "" then - | ||
39 | delete 'test'-'i'-cipher;* | ||
40 | $ if f$search(test+"-"+i+"-clear") .nes. "" then - | ||
41 | delete 'test'-'i'-clear;* | ||
42 | $ | ||
43 | $ 'cmd' 'i' -bufsize 113 -e -k test -in 'test' -out 'test'-'i'-cipher | ||
44 | $ 'cmd' 'i' -bufsize 157 -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear | ||
45 | $ backup/compare 'test' 'test'-'i'-clear | ||
46 | $ if $severity .ne. 1 then exit 3 | ||
47 | $ delete 'test'-'i'-cipher;*,'test'-'i'-clear;* | ||
48 | $ | ||
49 | $ write sys$output i," base64" | ||
50 | $ 'cmd' 'i' -bufsize 113 -a -e -k test -in 'test' -out 'test'-'i'-cipher | ||
51 | $ 'cmd' 'i' -bufsize 157 -a -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear | ||
52 | $ backup/compare 'test' 'test'-'i'-clear | ||
53 | $ if $severity .ne. 1 then exit 3 | ||
54 | $ delete 'test'-'i'-cipher;*,'test'-'i'-clear;* | ||
55 | $ | ||
56 | $ goto loop_cipher_commands | ||
57 | $ loop_cipher_commands_end: | ||
58 | $ close f | ||
59 | $ delete 'test'-cipher-commands;* | ||
60 | $ delete 'test';* | ||
diff --git a/src/lib/libssl/test/testgen.com b/src/lib/libssl/test/testgen.com new file mode 100644 index 0000000000..5d28ebec72 --- /dev/null +++ b/src/lib/libssl/test/testgen.com | |||
@@ -0,0 +1,52 @@ | |||
1 | $! TETSGEN.COM | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ T := testcert | ||
8 | $ KEY = 512 | ||
9 | $ CA := [-.certs]testca.pem | ||
10 | $ | ||
11 | $ set noon | ||
12 | $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* | ||
13 | $ if f$search(T+".2;*") .nes. "" then delete 'T'.2;* | ||
14 | $ if f$search(T+".key;*") .nes. "" then delete 'T'.key;* | ||
15 | $ set on | ||
16 | $ | ||
17 | $ write sys$output "generating certificate request" | ||
18 | $ | ||
19 | $ append/new nl: .rnd | ||
20 | $ open/append random_file .rnd | ||
21 | $ write random_file "string to make the random number generator think it has entropy" | ||
22 | $ close random_file | ||
23 | $ | ||
24 | $ set noon | ||
25 | $ define/user sys$output nla0: | ||
26 | $ mcr 'exe_dir'openssl no-rsa | ||
27 | $ save_severity=$SEVERITY | ||
28 | $ set on | ||
29 | $ if save_severity | ||
30 | $ then | ||
31 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" | ||
32 | $ else | ||
33 | $ req_new="-new" | ||
34 | $ write sys$output "There should be a 2 sequences of .'s and some +'s." | ||
35 | $ write sys$output "There should not be more that at most 80 per line" | ||
36 | $ endif | ||
37 | $ | ||
38 | $ write sys$output "This could take some time." | ||
39 | $ | ||
40 | $ mcr 'exe_dir'openssl req -config test.cnf 'req_new' -out testreq.pem | ||
41 | $ if $severity .ne. 1 | ||
42 | $ then | ||
43 | $ write sys$output "problems creating request" | ||
44 | $ exit 3 | ||
45 | $ endif | ||
46 | $ | ||
47 | $ mcr 'exe_dir'openssl req -config test.cnf -verify -in testreq.pem -noout | ||
48 | $ if $severity .ne. 1 | ||
49 | $ then | ||
50 | $ write sys$output "signature on req is wrong" | ||
51 | $ exit 3 | ||
52 | $ endif | ||
diff --git a/src/lib/libssl/test/tests.com b/src/lib/libssl/test/tests.com new file mode 100644 index 0000000000..07a3c7f16d --- /dev/null +++ b/src/lib/libssl/test/tests.com | |||
@@ -0,0 +1,246 @@ | |||
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_md4,test_md5,test_hmac,- | ||
23 | test_md2,test_mdc2,- | ||
24 | test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_rd,- | ||
25 | test_rand,test_bn,test_ec,test_enc,test_x509,test_rsa,test_crl,test_sid,- | ||
26 | test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- | ||
27 | test_ss,test_ca,test_engine,test_ssl,test_evp | ||
28 | $ endif | ||
29 | $ tests = f$edit(tests,"COLLAPSE") | ||
30 | $ | ||
31 | $ BNTEST := bntest | ||
32 | $ ECTEST := ectest | ||
33 | $ EXPTEST := exptest | ||
34 | $ IDEATEST := ideatest | ||
35 | $ SHATEST := shatest | ||
36 | $ SHA1TEST := sha1test | ||
37 | $ MDC2TEST := mdc2test | ||
38 | $ RMDTEST := rmdtest | ||
39 | $ MD2TEST := md2test | ||
40 | $ MD4TEST := md4test | ||
41 | $ MD5TEST := md5test | ||
42 | $ HMACTEST := hmactest | ||
43 | $ RC2TEST := rc2test | ||
44 | $ RC4TEST := rc4test | ||
45 | $ RC5TEST := rc5test | ||
46 | $ BFTEST := bftest | ||
47 | $ CASTTEST := casttest | ||
48 | $ DESTEST := destest | ||
49 | $ RANDTEST := randtest | ||
50 | $ DHTEST := dhtest | ||
51 | $ DSATEST := dsatest | ||
52 | $ METHTEST := methtest | ||
53 | $ SSLTEST := ssltest | ||
54 | $ RSATEST := rsa_test | ||
55 | $ ENGINETEST := enginetest | ||
56 | $ EVPTEST := evp_test | ||
57 | $ | ||
58 | $ tests_i = 0 | ||
59 | $ loop_tests: | ||
60 | $ tests_e = f$element(tests_i,",",tests) | ||
61 | $ tests_i = tests_i + 1 | ||
62 | $ if tests_e .eqs. "," then goto exit | ||
63 | $ gosub 'tests_e' | ||
64 | $ goto loop_tests | ||
65 | $ | ||
66 | $ test_evp: | ||
67 | $ mcr 'texe_dir''evptest' evptests.txt | ||
68 | $ return | ||
69 | $ test_des: | ||
70 | $ mcr 'texe_dir''destest' | ||
71 | $ return | ||
72 | $ test_idea: | ||
73 | $ mcr 'texe_dir''ideatest' | ||
74 | $ return | ||
75 | $ test_sha: | ||
76 | $ mcr 'texe_dir''shatest' | ||
77 | $ mcr 'texe_dir''sha1test' | ||
78 | $ return | ||
79 | $ test_mdc2: | ||
80 | $ mcr 'texe_dir''mdc2test' | ||
81 | $ return | ||
82 | $ test_md5: | ||
83 | $ mcr 'texe_dir''md5test' | ||
84 | $ return | ||
85 | $ test_md4: | ||
86 | $ mcr 'texe_dir''md4test' | ||
87 | $ return | ||
88 | $ test_hmac: | ||
89 | $ mcr 'texe_dir''hmactest' | ||
90 | $ return | ||
91 | $ test_md2: | ||
92 | $ mcr 'texe_dir''md2test' | ||
93 | $ return | ||
94 | $ test_rmd: | ||
95 | $ mcr 'texe_dir''rmdtest' | ||
96 | $ return | ||
97 | $ test_bf: | ||
98 | $ mcr 'texe_dir''bftest' | ||
99 | $ return | ||
100 | $ test_cast: | ||
101 | $ mcr 'texe_dir''casttest' | ||
102 | $ return | ||
103 | $ test_rc2: | ||
104 | $ mcr 'texe_dir''rc2test' | ||
105 | $ return | ||
106 | $ test_rc4: | ||
107 | $ mcr 'texe_dir''rc4test' | ||
108 | $ return | ||
109 | $ test_rc5: | ||
110 | $ mcr 'texe_dir''rc5test' | ||
111 | $ return | ||
112 | $ test_rand: | ||
113 | $ mcr 'texe_dir''randtest' | ||
114 | $ return | ||
115 | $ test_enc: | ||
116 | $ @testenc.com | ||
117 | $ return | ||
118 | $ test_x509: | ||
119 | $ define sys$error nla0: | ||
120 | $ write sys$output "test normal x509v1 certificate" | ||
121 | $ @tx509.com | ||
122 | $ write sys$output "test first x509v3 certificate" | ||
123 | $ @tx509.com v3-cert1.pem | ||
124 | $ write sys$output "test second x509v3 certificate" | ||
125 | $ @tx509.com v3-cert2.pem | ||
126 | $ deassign sys$error | ||
127 | $ return | ||
128 | $ test_rsa: | ||
129 | $ define sys$error nla0: | ||
130 | $ @trsa.com | ||
131 | $ deassign sys$error | ||
132 | $ mcr 'texe_dir''rsatest' | ||
133 | $ return | ||
134 | $ test_crl: | ||
135 | $ define sys$error nla0: | ||
136 | $ @tcrl.com | ||
137 | $ deassign sys$error | ||
138 | $ return | ||
139 | $ test_sid: | ||
140 | $ define sys$error nla0: | ||
141 | $ @tsid.com | ||
142 | $ deassign sys$error | ||
143 | $ return | ||
144 | $ test_req: | ||
145 | $ define sys$error nla0: | ||
146 | $ @treq.com | ||
147 | $ @treq.com testreq2.pem | ||
148 | $ deassign sys$error | ||
149 | $ return | ||
150 | $ test_pkcs7: | ||
151 | $ define sys$error nla0: | ||
152 | $ @tpkcs7.com | ||
153 | $ @tpkcs7d.com | ||
154 | $ deassign sys$error | ||
155 | $ return | ||
156 | $ test_bn: | ||
157 | $ write sys$output "starting big number library test, could take a while..." | ||
158 | $ create bntest-vms.fdl | ||
159 | FILE | ||
160 | ORGANIZATION sequential | ||
161 | RECORD | ||
162 | FORMAT stream_lf | ||
163 | $ create/fdl=bntest-vms.fdl bntest-vms.sh | ||
164 | $ open/append foo bntest-vms.sh | ||
165 | $ type/output=foo: sys$input: | ||
166 | << __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"' | ||
167 | $ define/user sys$output bntest-vms.tmp | ||
168 | $ mcr 'texe_dir''bntest' | ||
169 | $ copy bntest-vms.tmp foo: | ||
170 | $ delete bntest-vms.tmp;* | ||
171 | $ type/output=foo: sys$input: | ||
172 | __FOO__ | ||
173 | $ close foo | ||
174 | $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and" | ||
175 | $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations" | ||
176 | $ write sys$output "-- went well." | ||
177 | $ write sys$output "" | ||
178 | $ write sys$output "test a^b%c implementations" | ||
179 | $ mcr 'texe_dir''exptest' | ||
180 | $ return | ||
181 | $ test_ec: | ||
182 | $ write sys$output "test elliptic curves" | ||
183 | $ mcr 'texe_dir''ectest' | ||
184 | $ return | ||
185 | $ test_verify: | ||
186 | $ write sys$output "The following command should have some OK's and some failures" | ||
187 | $ write sys$output "There are definitly a few expired certificates" | ||
188 | $ @tverify.com | ||
189 | $ return | ||
190 | $ test_dh: | ||
191 | $ write sys$output "Generate a set of DH parameters" | ||
192 | $ mcr 'texe_dir''dhtest' | ||
193 | $ return | ||
194 | $ test_dsa: | ||
195 | $ write sys$output "Generate a set of DSA parameters" | ||
196 | $ mcr 'texe_dir''dsatest' | ||
197 | $ return | ||
198 | $ test_gen: | ||
199 | $ write sys$output "Generate and verify a certificate request" | ||
200 | $ @testgen.com | ||
201 | $ return | ||
202 | $ maybe_test_ss: | ||
203 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) | ||
204 | $ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then - | ||
205 | goto test_ss | ||
206 | $ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then - | ||
207 | goto test_ss | ||
208 | $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then - | ||
209 | goto test_ss | ||
210 | $ return | ||
211 | $ test_ss: | ||
212 | $ write sys$output "Generate and certify a test certificate" | ||
213 | $ @testss.com | ||
214 | $ return | ||
215 | $ test_engine: | ||
216 | $ write sys$output "Manipulate the ENGINE structures" | ||
217 | $ mcr 'texe_dir''enginetest' | ||
218 | $ return | ||
219 | $ test_ssl: | ||
220 | $ write sys$output "test SSL protocol" | ||
221 | $ gosub maybe_test_ss | ||
222 | $ @testssl.com keyU.ss certU.ss certCA.ss | ||
223 | $ return | ||
224 | $ test_ca: | ||
225 | $ set noon | ||
226 | $ define/user sys$output nla0: | ||
227 | $ mcr 'exe_dir'openssl no-rsa | ||
228 | $ save_severity=$SEVERITY | ||
229 | $ set on | ||
230 | $ if save_severity | ||
231 | $ then | ||
232 | $ write sys$output "skipping CA.com test -- requires RSA" | ||
233 | $ else | ||
234 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | ||
235 | $ @testca.com | ||
236 | $ endif | ||
237 | $ return | ||
238 | $ test_rd: | ||
239 | $ write sys$output "test Rijndael" | ||
240 | $ !mcr 'texe_dir''rdtest' | ||
241 | $ return | ||
242 | $ | ||
243 | $ | ||
244 | $ exit: | ||
245 | $ set default '__save_default' | ||
246 | $ exit | ||
diff --git a/src/lib/libssl/test/testss.com b/src/lib/libssl/test/testss.com new file mode 100644 index 0000000000..685ae5043d --- /dev/null +++ b/src/lib/libssl/test/testss.com | |||
@@ -0,0 +1,118 @@ | |||
1 | $! TESTSS.COM | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ digest="-md5" | ||
8 | $ reqcmd := mcr 'exe_dir'openssl req | ||
9 | $ x509cmd := mcr 'exe_dir'openssl x509 'digest' | ||
10 | $ verifycmd := mcr 'exe_dir'openssl verify | ||
11 | $ dummycnf := sys$disk:[-.apps]openssl-vms.cnf | ||
12 | $ | ||
13 | $ CAkey="""keyCA.ss""" | ||
14 | $ CAcert="""certCA.ss""" | ||
15 | $ CAreq="""reqCA.ss""" | ||
16 | $ CAconf="""CAss.cnf""" | ||
17 | $ CAreq2="""req2CA.ss""" ! temp | ||
18 | $ | ||
19 | $ Uconf="""Uss.cnf""" | ||
20 | $ Ukey="""keyU.ss""" | ||
21 | $ Ureq="""reqU.ss""" | ||
22 | $ Ucert="""certU.ss""" | ||
23 | $ | ||
24 | $ write sys$output "" | ||
25 | $ write sys$output "make a certificate request using 'req'" | ||
26 | $ | ||
27 | $ set noon | ||
28 | $ define/user sys$output nla0: | ||
29 | $ mcr 'exe_dir'openssl no-rsa | ||
30 | $ save_severity=$SEVERITY | ||
31 | $ set on | ||
32 | $ if save_severity | ||
33 | $ then | ||
34 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" | ||
35 | $ else | ||
36 | $ req_new="-new" | ||
37 | $ endif | ||
38 | $ | ||
39 | $ 'reqcmd' -config 'CAconf' -out 'CAreq' -keyout 'CAkey' 'req_new' ! -out err.ss | ||
40 | $ if $severity .ne. 1 | ||
41 | $ then | ||
42 | $ write sys$output "error using 'req' to generate a certificate request" | ||
43 | $ exit 3 | ||
44 | $ endif | ||
45 | $ write sys$output "" | ||
46 | $ write sys$output "convert the certificate request into a self signed certificate using 'x509'" | ||
47 | $ define /user sys$output err.ss | ||
48 | $ 'x509cmd' "-CAcreateserial" -in 'CAreq' -days 30 -req -out 'CAcert' -signkey 'CAkey' | ||
49 | $ if $severity .ne. 1 | ||
50 | $ then | ||
51 | $ write sys$output "error using 'x509' to self sign a certificate request" | ||
52 | $ exit 3 | ||
53 | $ endif | ||
54 | $ | ||
55 | $ write sys$output "" | ||
56 | $ write sys$output "convert a certificate into a certificate request using 'x509'" | ||
57 | $ define /user sys$output err.ss | ||
58 | $ 'x509cmd' -in 'CAcert' -x509toreq -signkey 'CAkey' -out 'CAreq2' | ||
59 | $ if $severity .ne. 1 | ||
60 | $ then | ||
61 | $ write sys$output "error using 'x509' convert a certificate to a certificate request" | ||
62 | $ exit 3 | ||
63 | $ endif | ||
64 | $ | ||
65 | $ 'reqcmd' -config 'dummycnf' -verify -in 'CAreq' -noout | ||
66 | $ if $severity .ne. 1 | ||
67 | $ then | ||
68 | $ write sys$output "first generated request is invalid" | ||
69 | $ exit 3 | ||
70 | $ endif | ||
71 | $ | ||
72 | $ 'reqcmd' -config 'dummycnf' -verify -in 'CAreq2' -noout | ||
73 | $ if $severity .ne. 1 | ||
74 | $ then | ||
75 | $ write sys$output "second generated request is invalid" | ||
76 | $ exit 3 | ||
77 | $ endif | ||
78 | $ | ||
79 | $ 'verifycmd' "-CAfile" 'CAcert' 'CAcert' | ||
80 | $ if $severity .ne. 1 | ||
81 | $ then | ||
82 | $ write sys$output "first generated cert is invalid" | ||
83 | $ exit 3 | ||
84 | $ endif | ||
85 | $ | ||
86 | $ write sys$output "" | ||
87 | $ write sys$output "make another certificate request using 'req'" | ||
88 | $ define /user sys$output err.ss | ||
89 | $ 'reqcmd' -config 'Uconf' -out 'Ureq' -keyout 'Ukey' 'req_new' | ||
90 | $ if $severity .ne. 1 | ||
91 | $ then | ||
92 | $ write sys$output "error using 'req' to generate a certificate request" | ||
93 | $ exit 3 | ||
94 | $ endif | ||
95 | $ | ||
96 | $ write sys$output "" | ||
97 | $ write sys$output "sign certificate request with the just created CA via 'x509'" | ||
98 | $ define /user sys$output err.ss | ||
99 | $ 'x509cmd' "-CAcreateserial" -in 'Ureq' -days 30 -req -out 'Ucert' "-CA" 'CAcert' "-CAkey" 'CAkey' | ||
100 | $ if $severity .ne. 1 | ||
101 | $ then | ||
102 | $ write sys$output "error using 'x509' to sign a certificate request" | ||
103 | $ exit 3 | ||
104 | $ endif | ||
105 | $ | ||
106 | $ 'verifycmd' "-CAfile" 'CAcert' 'Ucert' | ||
107 | $ write sys$output "" | ||
108 | $ write sys$output "Certificate details" | ||
109 | $ 'x509cmd' -subject -issuer -startdate -enddate -noout -in 'Ucert' | ||
110 | $ | ||
111 | $ write sys$output "" | ||
112 | $ write sys$output "The generated CA certificate is ",CAcert | ||
113 | $ write sys$output "The generated CA private key is ",CAkey | ||
114 | $ | ||
115 | $ write sys$output "The generated user certificate is ",Ucert | ||
116 | $ write sys$output "The generated user private key is ",Ukey | ||
117 | $ | ||
118 | $ if f$search("err.ss;*") .nes. "" then delete err.ss;* | ||
diff --git a/src/lib/libssl/test/testssl.com b/src/lib/libssl/test/testssl.com new file mode 100644 index 0000000000..785f262f5a --- /dev/null +++ b/src/lib/libssl/test/testssl.com | |||
@@ -0,0 +1,190 @@ | |||
1 | $! TESTSSL.COM | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ texe_dir := sys$disk:[-.'__arch'.exe.test] | ||
6 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
7 | $ | ||
8 | $ if p1 .eqs. "" | ||
9 | $ then | ||
10 | $ key="[-.apps]server.pem" | ||
11 | $ else | ||
12 | $ key=p1 | ||
13 | $ endif | ||
14 | $ if p2 .eqs. "" | ||
15 | $ then | ||
16 | $ cert="[-.apps]server.pem" | ||
17 | $ else | ||
18 | $ cert=p2 | ||
19 | $ endif | ||
20 | $ ssltest := mcr 'texe_dir'ssltest -key 'key' -cert 'cert' -c_key 'key' -c_cert 'cert' | ||
21 | $ | ||
22 | $ define/user sys$output testssl-x509-output. | ||
23 | $ define/user sys$error nla0: | ||
24 | $ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout | ||
25 | $ set noon | ||
26 | $ define/user sys$error nla0: | ||
27 | $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact | ||
28 | $ if $severity .eq. 1 | ||
29 | $ then | ||
30 | $ dsa_cert := YES | ||
31 | $ else | ||
32 | $ dsa_cert := NO | ||
33 | $ endif | ||
34 | $ set on | ||
35 | $ delete testssl-x509-output.;* | ||
36 | $ | ||
37 | $ if p3 .eqs. "" | ||
38 | $ then | ||
39 | $ copy/concatenate [-.certs]*.pem certs.tmp | ||
40 | $ CA = """-CAfile"" certs.tmp" | ||
41 | $ else | ||
42 | $ CA = """-CAfile"" "+p3 | ||
43 | $ endif | ||
44 | $ | ||
45 | $!########################################################################### | ||
46 | $ | ||
47 | $ write sys$output "test sslv2" | ||
48 | $ 'ssltest' -ssl2 | ||
49 | $ if $severity .ne. 1 then goto exit3 | ||
50 | $ | ||
51 | $ write sys$output "test sslv2 with server authentication" | ||
52 | $ 'ssltest' -ssl2 -server_auth 'CA' | ||
53 | $ if $severity .ne. 1 then goto exit3 | ||
54 | $ | ||
55 | $ if .not. dsa_cert | ||
56 | $ then | ||
57 | $ write sys$output "test sslv2 with client authentication" | ||
58 | $ 'ssltest' -ssl2 -client_auth 'CA' | ||
59 | $ if $severity .ne. 1 then goto exit3 | ||
60 | $ | ||
61 | $ write sys$output "test sslv2 with both client and server authentication" | ||
62 | $ 'ssltest' -ssl2 -server_auth -client_auth 'CA' | ||
63 | $ if $severity .ne. 1 then goto exit3 | ||
64 | $ endif | ||
65 | $ | ||
66 | $ write sys$output "test sslv3" | ||
67 | $ 'ssltest' -ssl3 | ||
68 | $ if $severity .ne. 1 then goto exit3 | ||
69 | $ | ||
70 | $ write sys$output "test sslv3 with server authentication" | ||
71 | $ 'ssltest' -ssl3 -server_auth 'CA' | ||
72 | $ if $severity .ne. 1 then goto exit3 | ||
73 | $ | ||
74 | $ write sys$output "test sslv3 with client authentication" | ||
75 | $ 'ssltest' -ssl3 -client_auth 'CA' | ||
76 | $ if $severity .ne. 1 then goto exit3 | ||
77 | $ | ||
78 | $ write sys$output "test sslv3 with both client and server authentication" | ||
79 | $ 'ssltest' -ssl3 -server_auth -client_auth 'CA' | ||
80 | $ if $severity .ne. 1 then goto exit3 | ||
81 | $ | ||
82 | $ write sys$output "test sslv2/sslv3" | ||
83 | $ 'ssltest' | ||
84 | $ if $severity .ne. 1 then goto exit3 | ||
85 | $ | ||
86 | $ write sys$output "test sslv2/sslv3 with server authentication" | ||
87 | $ 'ssltest' -server_auth 'CA' | ||
88 | $ if $severity .ne. 1 then goto exit3 | ||
89 | $ | ||
90 | $ write sys$output "test sslv2/sslv3 with client authentication" | ||
91 | $ 'ssltest' -client_auth 'CA' | ||
92 | $ if $severity .ne. 1 then goto exit3 | ||
93 | $ | ||
94 | $ write sys$output "test sslv2/sslv3 with both client and server authentication" | ||
95 | $ 'ssltest' -server_auth -client_auth 'CA' | ||
96 | $ if $severity .ne. 1 then goto exit3 | ||
97 | $ | ||
98 | $ write sys$output "test sslv2 via BIO pair" | ||
99 | $ 'ssltest' -bio_pair -ssl2 | ||
100 | $ if $severity .ne. 1 then goto exit3 | ||
101 | $ | ||
102 | $ write sys$output "test sslv2 with server authentication via BIO pair" | ||
103 | $ 'ssltest' -bio_pair -ssl2 -server_auth 'CA' | ||
104 | $ if $severity .ne. 1 then goto exit3 | ||
105 | $ | ||
106 | $ if .not. dsa_cert | ||
107 | $ then | ||
108 | $ write sys$output "test sslv2 with client authentication via BIO pair" | ||
109 | $ 'ssltest' -bio_pair -ssl2 -client_auth 'CA' | ||
110 | $ if $severity .ne. 1 then goto exit3 | ||
111 | $ | ||
112 | $ write sys$output "test sslv2 with both client and server authentication via BIO pair" | ||
113 | $ 'ssltest' -bio_pair -ssl2 -server_auth -client_auth 'CA' | ||
114 | $ if $severity .ne. 1 then goto exit3 | ||
115 | $ endif | ||
116 | $ | ||
117 | $ write sys$output "test sslv3 via BIO pair" | ||
118 | $ 'ssltest' -bio_pair -ssl3 | ||
119 | $ if $severity .ne. 1 then goto exit3 | ||
120 | $ | ||
121 | $ write sys$output "test sslv3 with server authentication via BIO pair" | ||
122 | $ 'ssltest' -bio_pair -ssl3 -server_auth 'CA' | ||
123 | $ if $severity .ne. 1 then goto exit3 | ||
124 | $ | ||
125 | $ write sys$output "test sslv3 with client authentication via BIO pair" | ||
126 | $ 'ssltest' -bio_pair -ssl3 -client_auth 'CA' | ||
127 | $ if $severity .ne. 1 then goto exit3 | ||
128 | |||
129 | $ write sys$output "test sslv3 with both client and server authentication via BIO pair" | ||
130 | $ 'ssltest' -bio_pair -ssl3 -server_auth -client_auth 'CA' | ||
131 | $ if $severity .ne. 1 then goto exit3 | ||
132 | $ | ||
133 | $ write sys$output "test sslv2/sslv3 via BIO pair" | ||
134 | $ 'ssltest' | ||
135 | $ if $severity .ne. 1 then goto exit3 | ||
136 | $ | ||
137 | $ if .not. dsa_cert | ||
138 | $ then | ||
139 | $ write sys$output "test sslv2/sslv3 w/o DHE via BIO pair" | ||
140 | $ 'ssltest' -bio_pair -no_dhe | ||
141 | $ if $severity .ne. 1 then goto exit3 | ||
142 | $ endif | ||
143 | $ | ||
144 | $ write sys$output "test sslv2/sslv3 with 1024 bit DHE via BIO pair" | ||
145 | $ 'ssltest' -bio_pair -dhe1024dsa -v | ||
146 | $ if $severity .ne. 1 then goto exit3 | ||
147 | $ | ||
148 | $ write sys$output "test sslv2/sslv3 with server authentication" | ||
149 | $ 'ssltest' -bio_pair -server_auth 'CA' | ||
150 | $ if $severity .ne. 1 then goto exit3 | ||
151 | $ | ||
152 | $ write sys$output "test sslv2/sslv3 with client authentication via BIO pair" | ||
153 | $ 'ssltest' -bio_pair -client_auth 'CA' | ||
154 | $ if $severity .ne. 1 then goto exit3 | ||
155 | $ | ||
156 | $ write sys$output "test sslv2/sslv3 with both client and server authentication via BIO pair" | ||
157 | $ 'ssltest' -bio_pair -server_auth -client_auth 'CA' | ||
158 | $ if $severity .ne. 1 then goto exit3 | ||
159 | $ | ||
160 | $!########################################################################### | ||
161 | $ | ||
162 | $ write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes" | ||
163 | $ 'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time | ||
164 | $ if $severity .ne. 1 then goto exit3 | ||
165 | $ | ||
166 | $ set noon | ||
167 | $ define/user sys$output nla0: | ||
168 | $ mcr 'exe_dir'openssl no-rsa | ||
169 | $ save_severity=$SEVERITY | ||
170 | $ set on | ||
171 | $ if save_severity | ||
172 | $ then | ||
173 | $ write sys$output "skipping RSA tests" | ||
174 | $ else | ||
175 | $ write sys$output "test tls1 with 1024bit RSA, no DHE, multiple handshakes" | ||
176 | $ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -no_dhe -num 10 -f -time | ||
177 | $ if $severity .ne. 1 then goto exit3 | ||
178 | $ | ||
179 | $ write sys$output "test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes" | ||
180 | $ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -dhe1024dsa -num 10 -f -time | ||
181 | $ if $severity .ne. 1 then goto exit3 | ||
182 | $ endif | ||
183 | $ | ||
184 | $ RET = 1 | ||
185 | $ goto exit | ||
186 | $ exit3: | ||
187 | $ RET = 3 | ||
188 | $ exit: | ||
189 | $ if p3 .eqs. "" then delete certs.tmp;* | ||
190 | $ exit 'RET' | ||
diff --git a/src/lib/libssl/test/tpkcs7.com b/src/lib/libssl/test/tpkcs7.com new file mode 100644 index 0000000000..9e345937c6 --- /dev/null +++ b/src/lib/libssl/test/tpkcs7.com | |||
@@ -0,0 +1,52 @@ | |||
1 | $! TPKCS7.COM -- Tests pkcs7 keys | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ cmd := mcr 'exe_dir'openssl pkcs7 | ||
8 | $ | ||
9 | $ t := testp7.pem | ||
10 | $ if p1 .nes. "" then t = p1 | ||
11 | $ | ||
12 | $ write sys$output "testing PKCS7 conversions" | ||
13 | $ if f$search("fff.*") .nes "" then delete fff.*;* | ||
14 | $ if f$search("ff.*") .nes "" then delete ff.*;* | ||
15 | $ if f$search("f.*") .nes "" then delete f.*;* | ||
16 | $ copy 't' fff.p | ||
17 | $ | ||
18 | $ write sys$output "p -> d" | ||
19 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
20 | $ if $severity .ne. 1 then exit 3 | ||
21 | $ write sys$output "p -> p" | ||
22 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
23 | $ if $severity .ne. 1 then exit 3 | ||
24 | $ | ||
25 | $ write sys$output "d -> d" | ||
26 | $ 'cmd' -in f.d -inform d -outform d -out ff.d1 | ||
27 | $ if $severity .ne. 1 then exit 3 | ||
28 | $ write sys$output "p -> d" | ||
29 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
30 | $ if $severity .ne. 1 then exit 3 | ||
31 | $ | ||
32 | $ | ||
33 | $ write sys$output "d -> p" | ||
34 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
35 | $ if $severity .ne. 1 then exit 3 | ||
36 | $ write sys$output "p -> p" | ||
37 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
38 | $ if $severity .ne. 1 then exit 3 | ||
39 | $ | ||
40 | $ backup/compare fff.p f.p | ||
41 | $ if $severity .ne. 1 then exit 3 | ||
42 | $ backup/compare fff.p ff.p1 | ||
43 | $ if $severity .ne. 1 then exit 3 | ||
44 | $ backup/compare fff.p ff.p3 | ||
45 | $ if $severity .ne. 1 then exit 3 | ||
46 | $ | ||
47 | $ backup/compare f.p ff.p1 | ||
48 | $ if $severity .ne. 1 then exit 3 | ||
49 | $ backup/compare f.p ff.p3 | ||
50 | $ if $severity .ne. 1 then exit 3 | ||
51 | $ | ||
52 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/tpkcs7d.com b/src/lib/libssl/test/tpkcs7d.com new file mode 100644 index 0000000000..7d4f8794a4 --- /dev/null +++ b/src/lib/libssl/test/tpkcs7d.com | |||
@@ -0,0 +1,45 @@ | |||
1 | $! TPKCS7.COM -- Tests pkcs7 keys | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ cmd := mcr 'exe_dir'openssl pkcs7 | ||
8 | $ | ||
9 | $ t := pkcs7-1.pem | ||
10 | $ if p1 .nes. "" then t = p1 | ||
11 | $ | ||
12 | $ write sys$output "testing PKCS7 conversions (2)" | ||
13 | $ if f$search("fff.*") .nes "" then delete fff.*;* | ||
14 | $ if f$search("ff.*") .nes "" then delete ff.*;* | ||
15 | $ if f$search("f.*") .nes "" then delete f.*;* | ||
16 | $ copy 't' fff.p | ||
17 | $ | ||
18 | $ write sys$output "p -> d" | ||
19 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
20 | $ if $severity .ne. 1 then exit 3 | ||
21 | $ write sys$output "p -> p" | ||
22 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
23 | $ if $severity .ne. 1 then exit 3 | ||
24 | $ | ||
25 | $ write sys$output "d -> d" | ||
26 | $ 'cmd' -in f.d -inform d -outform d -out ff.d1 | ||
27 | $ if $severity .ne. 1 then exit 3 | ||
28 | $ write sys$output "p -> d" | ||
29 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
30 | $ if $severity .ne. 1 then exit 3 | ||
31 | $ | ||
32 | $ | ||
33 | $ write sys$output "d -> p" | ||
34 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
35 | $ if $severity .ne. 1 then exit 3 | ||
36 | $ write sys$output "p -> p" | ||
37 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
38 | $ if $severity .ne. 1 then exit 3 | ||
39 | $ | ||
40 | $ backup/compare f.p ff.p1 | ||
41 | $ if $severity .ne. 1 then exit 3 | ||
42 | $ backup/compare f.p ff.p3 | ||
43 | $ if $severity .ne. 1 then exit 3 | ||
44 | $ | ||
45 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/treq.com b/src/lib/libssl/test/treq.com new file mode 100644 index 0000000000..22c22c3aa9 --- /dev/null +++ b/src/lib/libssl/test/treq.com | |||
@@ -0,0 +1,81 @@ | |||
1 | $! TREQ.COM -- Tests req keys | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ cmd := mcr 'exe_dir'openssl req -config [-.apps]openssl-vms.cnf | ||
8 | $ | ||
9 | $ t := testreq.pem | ||
10 | $ if p1 .nes. "" then t = p1 | ||
11 | $ | ||
12 | $ write sys$output "testing req conversions" | ||
13 | $ if f$search("fff.*") .nes "" then delete fff.*;* | ||
14 | $ if f$search("ff.*") .nes "" then delete ff.*;* | ||
15 | $ if f$search("f.*") .nes "" then delete f.*;* | ||
16 | $ copy 't' fff.p | ||
17 | $ | ||
18 | $ write sys$output "p -> d" | ||
19 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
20 | $ if $severity .ne. 1 then exit 3 | ||
21 | $! write sys$output "p -> t" | ||
22 | $! 'cmd' -in fff.p -inform p -outform t -out f.t | ||
23 | $! if $severity .ne. 1 then exit 3 | ||
24 | $ write sys$output "p -> p" | ||
25 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
26 | $ if $severity .ne. 1 then exit 3 | ||
27 | $ | ||
28 | $ write sys$output "d -> d" | ||
29 | $ 'cmd' -verify -in f.d -inform d -outform d -out ff.d1 | ||
30 | $ if $severity .ne. 1 then exit 3 | ||
31 | $! write sys$output "t -> d" | ||
32 | $! 'cmd' -verify -in f.t -inform t -outform d -out ff.d2 | ||
33 | $! if $severity .ne. 1 then exit 3 | ||
34 | $ write sys$output "p -> d" | ||
35 | $ 'cmd' -verify -in f.p -inform p -outform d -out ff.d3 | ||
36 | $ if $severity .ne. 1 then exit 3 | ||
37 | $ | ||
38 | $! write sys$output "d -> t" | ||
39 | $! 'cmd' -in f.d -inform d -outform t -out ff.t1 | ||
40 | $! if $severity .ne. 1 then exit 3 | ||
41 | $! write sys$output "t -> t" | ||
42 | $! 'cmd' -in f.t -inform t -outform t -out ff.t2 | ||
43 | $! if $severity .ne. 1 then exit 3 | ||
44 | $! write sys$output "p -> t" | ||
45 | $! 'cmd' -in f.p -inform p -outform t -out ff.t3 | ||
46 | $! if $severity .ne. 1 then exit 3 | ||
47 | $ | ||
48 | $ write sys$output "d -> p" | ||
49 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
50 | $ if $severity .ne. 1 then exit 3 | ||
51 | $! write sys$output "t -> p" | ||
52 | $! 'cmd' -in f.t -inform t -outform p -out ff.p2 | ||
53 | $! if $severity .ne. 1 then exit 3 | ||
54 | $ write sys$output "p -> p" | ||
55 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ | ||
58 | $ backup/compare fff.p f.p | ||
59 | $ if $severity .ne. 1 then exit 3 | ||
60 | $ backup/compare fff.p ff.p1 | ||
61 | $ if $severity .ne. 1 then exit 3 | ||
62 | $! backup/compare fff.p ff.p2 | ||
63 | $! if $severity .ne. 1 then exit 3 | ||
64 | $ backup/compare fff.p ff.p3 | ||
65 | $ if $severity .ne. 1 then exit 3 | ||
66 | $ | ||
67 | $! backup/compare f.t ff.t1 | ||
68 | $! if $severity .ne. 1 then exit 3 | ||
69 | $! backup/compare f.t ff.t2 | ||
70 | $! if $severity .ne. 1 then exit 3 | ||
71 | $! backup/compare f.t ff.t3 | ||
72 | $! if $severity .ne. 1 then exit 3 | ||
73 | $ | ||
74 | $ backup/compare f.p ff.p1 | ||
75 | $ if $severity .ne. 1 then exit 3 | ||
76 | $! backup/compare f.p ff.p2 | ||
77 | $! if $severity .ne. 1 then exit 3 | ||
78 | $ backup/compare f.p ff.p3 | ||
79 | $ if $severity .ne. 1 then exit 3 | ||
80 | $ | ||
81 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/trsa.com b/src/lib/libssl/test/trsa.com new file mode 100644 index 0000000000..6b6c318e2b --- /dev/null +++ b/src/lib/libssl/test/trsa.com | |||
@@ -0,0 +1,92 @@ | |||
1 | $! TRSA.COM -- Tests rsa keys | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ set noon | ||
8 | $ define/user sys$output nla0: | ||
9 | $ mcr 'exe_dir'openssl no-rsa | ||
10 | $ save_severity=$SEVERITY | ||
11 | $ set on | ||
12 | $ if save_severity | ||
13 | $ then | ||
14 | $ write sys$output "skipping RSA conversion test" | ||
15 | $ exit | ||
16 | $ endif | ||
17 | $ | ||
18 | $ cmd := mcr 'exe_dir'openssl rsa | ||
19 | $ | ||
20 | $ t := testrsa.pem | ||
21 | $ if p1 .nes. "" then t = p1 | ||
22 | $ | ||
23 | $ write sys$output "testing RSA conversions" | ||
24 | $ if f$search("fff.*") .nes "" then delete fff.*;* | ||
25 | $ if f$search("ff.*") .nes "" then delete ff.*;* | ||
26 | $ if f$search("f.*") .nes "" then delete f.*;* | ||
27 | $ copy 't' fff.p | ||
28 | $ | ||
29 | $ write sys$output "p -> d" | ||
30 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
31 | $ if $severity .ne. 1 then exit 3 | ||
32 | $! write sys$output "p -> t" | ||
33 | $! 'cmd' -in fff.p -inform p -outform t -out f.t | ||
34 | $! if $severity .ne. 1 then exit 3 | ||
35 | $ write sys$output "p -> p" | ||
36 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
37 | $ if $severity .ne. 1 then exit 3 | ||
38 | $ | ||
39 | $ write sys$output "d -> d" | ||
40 | $ 'cmd' -in f.d -inform d -outform d -out ff.d1 | ||
41 | $ if $severity .ne. 1 then exit 3 | ||
42 | $! write sys$output "t -> d" | ||
43 | $! 'cmd' -in f.t -inform t -outform d -out ff.d2 | ||
44 | $! if $severity .ne. 1 then exit 3 | ||
45 | $ write sys$output "p -> d" | ||
46 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
47 | $ if $severity .ne. 1 then exit 3 | ||
48 | $ | ||
49 | $! write sys$output "d -> t" | ||
50 | $! 'cmd' -in f.d -inform d -outform t -out ff.t1 | ||
51 | $! if $severity .ne. 1 then exit 3 | ||
52 | $! write sys$output "t -> t" | ||
53 | $! 'cmd' -in f.t -inform t -outform t -out ff.t2 | ||
54 | $! if $severity .ne. 1 then exit 3 | ||
55 | $! write sys$output "p -> t" | ||
56 | $! 'cmd' -in f.p -inform p -outform t -out ff.t3 | ||
57 | $! if $severity .ne. 1 then exit 3 | ||
58 | $ | ||
59 | $ write sys$output "d -> p" | ||
60 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
61 | $ if $severity .ne. 1 then exit 3 | ||
62 | $! write sys$output "t -> p" | ||
63 | $! 'cmd' -in f.t -inform t -outform p -out ff.p2 | ||
64 | $! if $severity .ne. 1 then exit 3 | ||
65 | $ write sys$output "p -> p" | ||
66 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
67 | $ if $severity .ne. 1 then exit 3 | ||
68 | $ | ||
69 | $ backup/compare fff.p f.p | ||
70 | $ if $severity .ne. 1 then exit 3 | ||
71 | $ backup/compare fff.p ff.p1 | ||
72 | $ if $severity .ne. 1 then exit 3 | ||
73 | $! backup/compare fff.p ff.p2 | ||
74 | $! if $severity .ne. 1 then exit 3 | ||
75 | $ backup/compare fff.p ff.p3 | ||
76 | $ if $severity .ne. 1 then exit 3 | ||
77 | $ | ||
78 | $! backup/compare f.t ff.t1 | ||
79 | $! if $severity .ne. 1 then exit 3 | ||
80 | $! backup/compare f.t ff.t2 | ||
81 | $! if $severity .ne. 1 then exit 3 | ||
82 | $! backup/compare f.t ff.t3 | ||
83 | $! if $severity .ne. 1 then exit 3 | ||
84 | $ | ||
85 | $ backup/compare f.p ff.p1 | ||
86 | $ if $severity .ne. 1 then exit 3 | ||
87 | $! backup/compare f.p ff.p2 | ||
88 | $! if $severity .ne. 1 then exit 3 | ||
89 | $ backup/compare f.p ff.p3 | ||
90 | $ if $severity .ne. 1 then exit 3 | ||
91 | $ | ||
92 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/tsid.com b/src/lib/libssl/test/tsid.com new file mode 100644 index 0000000000..bde23f9bb9 --- /dev/null +++ b/src/lib/libssl/test/tsid.com | |||
@@ -0,0 +1,81 @@ | |||
1 | $! TSID.COM -- Tests sid keys | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ cmd := mcr 'exe_dir'openssl sess_id | ||
8 | $ | ||
9 | $ t := testsid.pem | ||
10 | $ if p1 .nes. "" then t = p1 | ||
11 | $ | ||
12 | $ write sys$output "testing session-id conversions" | ||
13 | $ if f$search("fff.*") .nes "" then delete fff.*;* | ||
14 | $ if f$search("ff.*") .nes "" then delete ff.*;* | ||
15 | $ if f$search("f.*") .nes "" then delete f.*;* | ||
16 | $ copy 't' fff.p | ||
17 | $ | ||
18 | $ write sys$output "p -> d" | ||
19 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
20 | $ if $severity .ne. 1 then exit 3 | ||
21 | $! write sys$output "p -> t" | ||
22 | $! 'cmd' -in fff.p -inform p -outform t -out f.t | ||
23 | $! if $severity .ne. 1 then exit 3 | ||
24 | $ write sys$output "p -> p" | ||
25 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
26 | $ if $severity .ne. 1 then exit 3 | ||
27 | $ | ||
28 | $ write sys$output "d -> d" | ||
29 | $ 'cmd' -in f.d -inform d -outform d -out ff.d1 | ||
30 | $ if $severity .ne. 1 then exit 3 | ||
31 | $! write sys$output "t -> d" | ||
32 | $! 'cmd' -in f.t -inform t -outform d -out ff.d2 | ||
33 | $! if $severity .ne. 1 then exit 3 | ||
34 | $ write sys$output "p -> d" | ||
35 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
36 | $ if $severity .ne. 1 then exit 3 | ||
37 | $ | ||
38 | $! write sys$output "d -> t" | ||
39 | $! 'cmd' -in f.d -inform d -outform t -out ff.t1 | ||
40 | $! if $severity .ne. 1 then exit 3 | ||
41 | $! write sys$output "t -> t" | ||
42 | $! 'cmd' -in f.t -inform t -outform t -out ff.t2 | ||
43 | $! if $severity .ne. 1 then exit 3 | ||
44 | $! write sys$output "p -> t" | ||
45 | $! 'cmd' -in f.p -inform p -outform t -out ff.t3 | ||
46 | $! if $severity .ne. 1 then exit 3 | ||
47 | $ | ||
48 | $ write sys$output "d -> p" | ||
49 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
50 | $ if $severity .ne. 1 then exit 3 | ||
51 | $! write sys$output "t -> p" | ||
52 | $! 'cmd' -in f.t -inform t -outform p -out ff.p2 | ||
53 | $! if $severity .ne. 1 then exit 3 | ||
54 | $ write sys$output "p -> p" | ||
55 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ | ||
58 | $ backup/compare fff.p f.p | ||
59 | $ if $severity .ne. 1 then exit 3 | ||
60 | $ backup/compare fff.p ff.p1 | ||
61 | $ if $severity .ne. 1 then exit 3 | ||
62 | $! backup/compare fff.p ff.p2 | ||
63 | $! if $severity .ne. 1 then exit 3 | ||
64 | $ backup/compare fff.p ff.p3 | ||
65 | $ if $severity .ne. 1 then exit 3 | ||
66 | $ | ||
67 | $! backup/compare f.t ff.t1 | ||
68 | $! if $severity .ne. 1 then exit 3 | ||
69 | $! backup/compare f.t ff.t2 | ||
70 | $! if $severity .ne. 1 then exit 3 | ||
71 | $! backup/compare f.t ff.t3 | ||
72 | $! if $severity .ne. 1 then exit 3 | ||
73 | $ | ||
74 | $ backup/compare f.p ff.p1 | ||
75 | $ if $severity .ne. 1 then exit 3 | ||
76 | $! backup/compare f.p ff.p2 | ||
77 | $! if $severity .ne. 1 then exit 3 | ||
78 | $ backup/compare f.p ff.p3 | ||
79 | $ if $severity .ne. 1 then exit 3 | ||
80 | $ | ||
81 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/tverify.com b/src/lib/libssl/test/tverify.com new file mode 100644 index 0000000000..f97e71478f --- /dev/null +++ b/src/lib/libssl/test/tverify.com | |||
@@ -0,0 +1,26 @@ | |||
1 | $! TVERIFY.COM | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ copy/concatenate [-.certs]*.pem certs.tmp | ||
8 | $ | ||
9 | $ old_f := | ||
10 | $ loop_certs: | ||
11 | $ c := NO | ||
12 | $ certs := | ||
13 | $ loop_certs2: | ||
14 | $ f = f$search("[-.certs]*.pem") | ||
15 | $ if f .nes. "" .and. f .nes. old_f | ||
16 | $ then | ||
17 | $ certs = certs + " [-.certs]" + f$parse(f,,,"NAME") + ".pem" | ||
18 | $ if f$length(certs) .lt. 180 then goto loop_certs2 | ||
19 | $ c := YES | ||
20 | $ endif | ||
21 | $ certs = certs - " " | ||
22 | $ | ||
23 | $ mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs' | ||
24 | $ if c then goto loop_certs | ||
25 | $ | ||
26 | $ delete certs.tmp;* | ||
diff --git a/src/lib/libssl/test/tx509.com b/src/lib/libssl/test/tx509.com new file mode 100644 index 0000000000..985969c566 --- /dev/null +++ b/src/lib/libssl/test/tx509.com | |||
@@ -0,0 +1,81 @@ | |||
1 | $! TX509.COM -- Tests x509 certificates | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
6 | $ | ||
7 | $ cmd := mcr 'exe_dir'openssl x509 | ||
8 | $ | ||
9 | $ t := testx509.pem | ||
10 | $ if p1 .nes. "" then t = p1 | ||
11 | $ | ||
12 | $ write sys$output "testing X509 conversions" | ||
13 | $ if f$search("fff.*") .nes "" then delete fff.*;* | ||
14 | $ if f$search("ff.*") .nes "" then delete ff.*;* | ||
15 | $ if f$search("f.*") .nes "" then delete f.*;* | ||
16 | $ copy 't' fff.p | ||
17 | $ | ||
18 | $ write sys$output "p -> d" | ||
19 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
20 | $ if $severity .ne. 1 then exit 3 | ||
21 | $ write sys$output "p -> n" | ||
22 | $ 'cmd' -in fff.p -inform p -outform n -out f.n | ||
23 | $ if $severity .ne. 1 then exit 3 | ||
24 | $ write sys$output "p -> p" | ||
25 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
26 | $ if $severity .ne. 1 then exit 3 | ||
27 | $ | ||
28 | $ write sys$output "d -> d" | ||
29 | $ 'cmd' -in f.d -inform d -outform d -out ff.d1 | ||
30 | $ if $severity .ne. 1 then exit 3 | ||
31 | $ write sys$output "n -> d" | ||
32 | $ 'cmd' -in f.n -inform n -outform d -out ff.d2 | ||
33 | $ if $severity .ne. 1 then exit 3 | ||
34 | $ write sys$output "p -> d" | ||
35 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
36 | $ if $severity .ne. 1 then exit 3 | ||
37 | $ | ||
38 | $ write sys$output "d -> n" | ||
39 | $ 'cmd' -in f.d -inform d -outform n -out ff.n1 | ||
40 | $ if $severity .ne. 1 then exit 3 | ||
41 | $ write sys$output "n -> n" | ||
42 | $ 'cmd' -in f.n -inform n -outform n -out ff.n2 | ||
43 | $ if $severity .ne. 1 then exit 3 | ||
44 | $ write sys$output "p -> n" | ||
45 | $ 'cmd' -in f.p -inform p -outform n -out ff.n3 | ||
46 | $ if $severity .ne. 1 then exit 3 | ||
47 | $ | ||
48 | $ write sys$output "d -> p" | ||
49 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
50 | $ if $severity .ne. 1 then exit 3 | ||
51 | $ write sys$output "n -> p" | ||
52 | $ 'cmd' -in f.n -inform n -outform p -out ff.p2 | ||
53 | $ if $severity .ne. 1 then exit 3 | ||
54 | $ write sys$output "p -> p" | ||
55 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ | ||
58 | $ backup/compare fff.p f.p | ||
59 | $ if $severity .ne. 1 then exit 3 | ||
60 | $ backup/compare fff.p ff.p1 | ||
61 | $ if $severity .ne. 1 then exit 3 | ||
62 | $ backup/compare fff.p ff.p2 | ||
63 | $ if $severity .ne. 1 then exit 3 | ||
64 | $ backup/compare fff.p ff.p3 | ||
65 | $ if $severity .ne. 1 then exit 3 | ||
66 | $ | ||
67 | $ backup/compare f.n ff.n1 | ||
68 | $ if $severity .ne. 1 then exit 3 | ||
69 | $ backup/compare f.n ff.n2 | ||
70 | $ if $severity .ne. 1 then exit 3 | ||
71 | $ backup/compare f.n ff.n3 | ||
72 | $ if $severity .ne. 1 then exit 3 | ||
73 | $ | ||
74 | $ backup/compare f.p ff.p1 | ||
75 | $ if $severity .ne. 1 then exit 3 | ||
76 | $ backup/compare f.p ff.p2 | ||
77 | $ if $severity .ne. 1 then exit 3 | ||
78 | $ backup/compare f.p ff.p3 | ||
79 | $ if $severity .ne. 1 then exit 3 | ||
80 | $ | ||
81 | $ delete f.*;*,ff.*;*,fff.*;* | ||