diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libssl/test | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libssl/test')
40 files changed, 2324 insertions, 396 deletions
diff --git a/src/lib/libssl/test/.rnd b/src/lib/libssl/test/.rnd deleted file mode 100644 index 234970e241..0000000000 --- a/src/lib/libssl/test/.rnd +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/lib/libssl/test/Makefile.ssl b/src/lib/libssl/test/Makefile.ssl index b3de76751e..2133ff1575 100644 --- a/src/lib/libssl/test/Makefile.ssl +++ b/src/lib/libssl/test/Makefile.ssl | |||
@@ -7,17 +7,22 @@ TOP= .. | |||
7 | CC= cc | 7 | CC= cc |
8 | INCLUDES= -I../include | 8 | INCLUDES= -I../include |
9 | CFLAG= -g | 9 | CFLAG= -g |
10 | INSTALL_PREFIX= | ||
11 | OPENSSLDIR= /usr/local/ssl | ||
10 | INSTALLTOP= /usr/local/ssl | 12 | INSTALLTOP= /usr/local/ssl |
11 | MAKEFILE= Makefile.ssl | 13 | MAKEFILE= Makefile.ssl |
12 | MAKE= make -f $(MAKEFILE) | 14 | MAKE= make -f $(MAKEFILE) |
13 | MAKEDEPEND= makedepend -f$(MAKEFILE) | 15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) |
14 | 16 | ||
15 | PEX_LIBS= | 17 | PEX_LIBS= |
16 | EX_LIBS= #-lnsl -lsocket | 18 | EX_LIBS= #-lnsl -lsocket |
17 | 19 | ||
18 | CFLAGS= $(INCLUDES) $(CFLAG) | 20 | CFLAGS= $(INCLUDES) $(CFLAG) |
19 | 21 | ||
20 | GENERAL=Makefile.ssl | 22 | GENERAL=Makefile.ssl maketests.com \ |
23 | tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \ | ||
24 | tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \ | ||
25 | testca.com VMSca-response.1 VMSca-response.2 | ||
21 | 26 | ||
22 | DLIBCRYPTO= ../libcrypto.a | 27 | DLIBCRYPTO= ../libcrypto.a |
23 | DLIBSSL= ../libssl.a | 28 | DLIBSSL= ../libssl.a |
@@ -45,12 +50,13 @@ DHTEST= dhtest | |||
45 | DSATEST= dsatest | 50 | DSATEST= dsatest |
46 | METHTEST= methtest | 51 | METHTEST= methtest |
47 | SSLTEST= ssltest | 52 | SSLTEST= ssltest |
53 | RSATEST= rsa_oaep_test | ||
48 | 54 | ||
49 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ | 55 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ |
50 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | 56 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ |
51 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | 57 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ |
52 | $(RANDTEST) $(DHTEST) \ | 58 | $(RANDTEST) $(DHTEST) \ |
53 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) | 59 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) $(RSATEST) |
54 | 60 | ||
55 | # $(METHTEST) | 61 | # $(METHTEST) |
56 | 62 | ||
@@ -58,12 +64,12 @@ OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD5TEST).o $(HMACTEST).o \ | |||
58 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | 64 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ |
59 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | 65 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ |
60 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ | 66 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ |
61 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o | 67 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o $(RSATEST).o |
62 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ | 68 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ |
63 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | 69 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ |
64 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | 70 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ |
65 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ | 71 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ |
66 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c | 72 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c $(RSATEST).c |
67 | 73 | ||
68 | EXHEADER= | 74 | EXHEADER= |
69 | HEADER= $(EXHEADER) | 75 | HEADER= $(EXHEADER) |
@@ -78,11 +84,10 @@ all: exe | |||
78 | exe: $(EXE) | 84 | exe: $(EXE) |
79 | 85 | ||
80 | files: | 86 | files: |
81 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | 87 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO |
82 | 88 | ||
83 | links: | 89 | links: |
84 | /bin/rm -f Makefile | 90 | @@$(TOP)/util/point.sh Makefile.ssl Makefile |
85 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
86 | 91 | ||
87 | errors: | 92 | errors: |
88 | 93 | ||
@@ -94,15 +99,15 @@ tags: | |||
94 | tests: exe apps \ | 99 | tests: exe apps \ |
95 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ | 100 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ |
96 | test_rc2 test_rc4 test_rc5 test_bf test_cast \ | 101 | test_rc2 test_rc4 test_rc5 test_bf test_cast \ |
97 | test_rand test_enc test_x509 test_rsa test_crl test_sid test_req \ | 102 | test_rand test_bn test_enc test_x509 test_rsa test_crl test_sid \ |
98 | test_pkcs7 test_bn test_verify test_dh test_dsa test_reqgen \ | 103 | test_reqgen test_req test_pkcs7 test_verify test_dh test_dsa \ |
99 | test_ss test_ssl test_ca | 104 | test_ss test_ssl test_ca |
100 | 105 | ||
101 | apps: | 106 | apps: |
102 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) | 107 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) |
103 | 108 | ||
104 | test_des: | 109 | test_des: |
105 | #./$(DESTEST) | 110 | ./$(DESTEST) |
106 | 111 | ||
107 | test_idea: | 112 | test_idea: |
108 | ./$(IDEATEST) | 113 | ./$(IDEATEST) |
@@ -157,6 +162,7 @@ test_x509: | |||
157 | 162 | ||
158 | test_rsa: | 163 | test_rsa: |
159 | @sh ./trsa 2>/dev/null | 164 | @sh ./trsa 2>/dev/null |
165 | ./$(RSATEST) | ||
160 | 166 | ||
161 | test_crl: | 167 | test_crl: |
162 | @sh ./tcrl 2>/dev/null | 168 | @sh ./tcrl 2>/dev/null |
@@ -173,17 +179,17 @@ test_pkcs7: | |||
173 | @sh ./tpkcs7d 2>/dev/null | 179 | @sh ./tpkcs7d 2>/dev/null |
174 | 180 | ||
175 | test_bn: | 181 | test_bn: |
176 | @echo 'test a^b%c implementations' | ||
177 | ./$(EXPTEST) | ||
178 | @echo starting big number library test, could take a while... | 182 | @echo starting big number library test, could take a while... |
179 | @(./$(BNTEST)|bc) | awk '{ \ | 183 | @(./$(BNTEST)|bc) | awk '{ \ |
180 | if ($$0 != "0") {print "error"; exit(1); } \ | 184 | if ($$0 != "0") {print "error"; exit(1); } \ |
181 | if (((NR+1)%64) == 0) print NR+1," tests done"; }' | 185 | if (((NR+1)%64) == 0) print NR+1," tests done"; }' |
186 | @echo 'test a^b%c implementations' | ||
187 | ./$(EXPTEST) | ||
182 | 188 | ||
183 | test_verify: | 189 | test_verify: |
184 | @echo "The following command should have some OK's and some failures" | 190 | @echo "The following command should have some OK's and some failures" |
185 | @echo "There are definitly a few expired certificates" | 191 | @echo "There are definitly a few expired certificates" |
186 | ../apps/ssleay verify -CApath ../certs ../certs/*.pem | 192 | ../apps/openssl verify -CApath ../certs ../certs/*.pem |
187 | 193 | ||
188 | test_dh: | 194 | test_dh: |
189 | @echo "Generate as set of DH parameters" | 195 | @echo "Generate as set of DH parameters" |
@@ -213,14 +219,14 @@ lint: | |||
213 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 219 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
214 | 220 | ||
215 | depend: | 221 | depend: |
216 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC) | 222 | $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(SRC) |
217 | 223 | ||
218 | dclean: | 224 | dclean: |
219 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | 225 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
220 | mv -f Makefile.new $(MAKEFILE) | 226 | mv -f Makefile.new $(MAKEFILE) |
221 | 227 | ||
222 | clean: | 228 | clean: |
223 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log | 229 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log |
224 | 230 | ||
225 | $(DLIBSSL): | 231 | $(DLIBSSL): |
226 | (cd ../ssl; $(MAKE)) | 232 | (cd ../ssl; $(MAKE)) |
@@ -228,6 +234,9 @@ $(DLIBSSL): | |||
228 | $(DLIBCRYPTO): | 234 | $(DLIBCRYPTO): |
229 | (cd ../crypto; $(MAKE)) | 235 | (cd ../crypto; $(MAKE)) |
230 | 236 | ||
237 | $(RSATEST): $(RSATEST).o $(DLIBCRYPTO) | ||
238 | $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
239 | |||
231 | $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) | 240 | $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) |
232 | $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | 241 | $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) |
233 | 242 | ||
@@ -292,3 +301,88 @@ $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | |||
292 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | 301 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) |
293 | 302 | ||
294 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 303 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
304 | |||
305 | bftest.o: ../include/openssl/blowfish.h | ||
306 | bntest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
307 | bntest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | ||
308 | bntest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | ||
309 | bntest.o: ../include/openssl/des.h ../include/openssl/dh.h | ||
310 | bntest.o: ../include/openssl/dsa.h ../include/openssl/e_os.h | ||
311 | bntest.o: ../include/openssl/e_os2.h ../include/openssl/err.h | ||
312 | bntest.o: ../include/openssl/evp.h ../include/openssl/idea.h | ||
313 | bntest.o: ../include/openssl/md2.h ../include/openssl/md5.h | ||
314 | bntest.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | ||
315 | bntest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
316 | bntest.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h | ||
317 | bntest.o: ../include/openssl/rc2.h ../include/openssl/rc4.h | ||
318 | bntest.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h | ||
319 | bntest.o: ../include/openssl/rsa.h ../include/openssl/safestack.h | ||
320 | bntest.o: ../include/openssl/sha.h ../include/openssl/stack.h | ||
321 | bntest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | ||
322 | casttest.o: ../include/openssl/cast.h | ||
323 | destest.o: ../include/openssl/des.h ../include/openssl/e_os2.h | ||
324 | destest.o: ../include/openssl/opensslconf.h | ||
325 | dhtest.o: ../include/openssl/bio.h ../include/openssl/bn.h | ||
326 | dhtest.o: ../include/openssl/crypto.h ../include/openssl/dh.h | ||
327 | dhtest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
328 | dhtest.o: ../include/openssl/stack.h | ||
329 | dsatest.o: ../include/openssl/bio.h ../include/openssl/bn.h | ||
330 | dsatest.o: ../include/openssl/crypto.h ../include/openssl/dh.h | ||
331 | dsatest.o: ../include/openssl/dsa.h ../include/openssl/err.h | ||
332 | dsatest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
333 | dsatest.o: ../include/openssl/rand.h ../include/openssl/stack.h | ||
334 | exptest.o: ../include/openssl/bio.h ../include/openssl/bn.h | ||
335 | exptest.o: ../include/openssl/crypto.h ../include/openssl/err.h | ||
336 | exptest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
337 | exptest.o: ../include/openssl/rand.h ../include/openssl/stack.h | ||
338 | hmactest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
339 | hmactest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | ||
340 | hmactest.o: ../include/openssl/cast.h ../include/openssl/crypto.h | ||
341 | hmactest.o: ../include/openssl/des.h ../include/openssl/dh.h | ||
342 | hmactest.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h | ||
343 | hmactest.o: ../include/openssl/evp.h ../include/openssl/hmac.h | ||
344 | hmactest.o: ../include/openssl/idea.h ../include/openssl/md2.h | ||
345 | hmactest.o: ../include/openssl/md5.h ../include/openssl/mdc2.h | ||
346 | hmactest.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h | ||
347 | hmactest.o: ../include/openssl/opensslv.h ../include/openssl/rc2.h | ||
348 | hmactest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
349 | hmactest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
350 | hmactest.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
351 | hmactest.o: ../include/openssl/stack.h | ||
352 | ideatest.o: ../include/openssl/idea.h ../include/openssl/opensslconf.h | ||
353 | md2test.o: ../include/openssl/md2.h ../include/openssl/opensslconf.h | ||
354 | md5test.o: ../include/openssl/md5.h | ||
355 | mdc2test.o: ../include/openssl/des.h ../include/openssl/e_os2.h | ||
356 | mdc2test.o: ../include/openssl/mdc2.h ../include/openssl/opensslconf.h | ||
357 | randtest.o: ../include/openssl/rand.h | ||
358 | rc2test.o: ../include/openssl/opensslconf.h ../include/openssl/rc2.h | ||
359 | rc4test.o: ../include/openssl/opensslconf.h ../include/openssl/rc4.h | ||
360 | rc5test.o: ../include/openssl/rc5.h | ||
361 | rmdtest.o: ../include/openssl/ripemd.h | ||
362 | rsa_oaep_test.o: ../include/openssl/bn.h ../include/openssl/crypto.h | ||
363 | rsa_oaep_test.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | ||
364 | rsa_oaep_test.o: ../include/openssl/err.h ../include/openssl/opensslconf.h | ||
365 | rsa_oaep_test.o: ../include/openssl/opensslv.h ../include/openssl/rsa.h | ||
366 | rsa_oaep_test.o: ../include/openssl/stack.h | ||
367 | sha1test.o: ../include/openssl/sha.h | ||
368 | shatest.o: ../include/openssl/sha.h | ||
369 | ssltest.o: ../include/openssl/asn1.h ../include/openssl/bio.h | ||
370 | ssltest.o: ../include/openssl/blowfish.h ../include/openssl/bn.h | ||
371 | ssltest.o: ../include/openssl/buffer.h ../include/openssl/cast.h | ||
372 | ssltest.o: ../include/openssl/crypto.h ../include/openssl/des.h | ||
373 | ssltest.o: ../include/openssl/dh.h ../include/openssl/dsa.h | ||
374 | ssltest.o: ../include/openssl/e_os.h ../include/openssl/e_os2.h | ||
375 | ssltest.o: ../include/openssl/err.h ../include/openssl/evp.h | ||
376 | ssltest.o: ../include/openssl/idea.h ../include/openssl/lhash.h | ||
377 | ssltest.o: ../include/openssl/md2.h ../include/openssl/md5.h | ||
378 | ssltest.o: ../include/openssl/mdc2.h ../include/openssl/objects.h | ||
379 | ssltest.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h | ||
380 | ssltest.o: ../include/openssl/pem.h ../include/openssl/pem2.h | ||
381 | ssltest.o: ../include/openssl/pkcs7.h ../include/openssl/rc2.h | ||
382 | ssltest.o: ../include/openssl/rc4.h ../include/openssl/rc5.h | ||
383 | ssltest.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h | ||
384 | ssltest.o: ../include/openssl/safestack.h ../include/openssl/sha.h | ||
385 | ssltest.o: ../include/openssl/ssl.h ../include/openssl/ssl2.h | ||
386 | ssltest.o: ../include/openssl/ssl23.h ../include/openssl/ssl3.h | ||
387 | ssltest.o: ../include/openssl/stack.h ../include/openssl/tls1.h | ||
388 | ssltest.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h | ||
diff --git a/src/lib/libssl/test/VMSca-response.1 b/src/lib/libssl/test/VMSca-response.1 new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/src/lib/libssl/test/VMSca-response.1 | |||
@@ -0,0 +1 @@ | |||
diff --git a/src/lib/libssl/test/VMSca-response.2 b/src/lib/libssl/test/VMSca-response.2 new file mode 100644 index 0000000000..9b48ee4cf9 --- /dev/null +++ b/src/lib/libssl/test/VMSca-response.2 | |||
@@ -0,0 +1,2 @@ | |||
1 | y | ||
2 | y | ||
diff --git a/src/lib/libssl/test/certCA.srl b/src/lib/libssl/test/certCA.srl deleted file mode 100644 index 39f5b69311..0000000000 --- a/src/lib/libssl/test/certCA.srl +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | 71 | ||
diff --git a/src/lib/libssl/test/maketests.com b/src/lib/libssl/test/maketests.com new file mode 100644 index 0000000000..e4b052e688 --- /dev/null +++ b/src/lib/libssl/test/maketests.com | |||
@@ -0,0 +1,1053 @@ | |||
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,IDEATEST,MD2TEST,MD5TEST,HMACTEST,"+ - | ||
147 | "RC2TEST,RC4TEST,RC5TEST,"+ - | ||
148 | "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ - | ||
149 | "RANDTEST,DHTEST,"+ - | ||
150 | "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_OAEP_TEST" | ||
151 | $ TCPIP_PROGRAMS = ",," | ||
152 | $ IF COMPILER .EQS. "VAXC" THEN - | ||
153 | TCPIP_PROGRAMS = ",SSLTEST," | ||
154 | $! | ||
155 | $! Define A File Counter And Set It To "0". | ||
156 | $! | ||
157 | $ FILE_COUNTER = 0 | ||
158 | $! | ||
159 | $! Top Of The File Loop. | ||
160 | $! | ||
161 | $ NEXT_FILE: | ||
162 | $! | ||
163 | $! O.K, Extract The File Name From The File List. | ||
164 | $! | ||
165 | $ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",TEST_FILES) | ||
166 | $! | ||
167 | $! Check To See If We Are At The End Of The File List. | ||
168 | $! | ||
169 | $ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE | ||
170 | $! | ||
171 | $! Increment The Counter. | ||
172 | $! | ||
173 | $ FILE_COUNTER = FILE_COUNTER + 1 | ||
174 | $! | ||
175 | $! Create The Source File Name. | ||
176 | $! | ||
177 | $ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME + ".C" | ||
178 | $! | ||
179 | $! Create The Object File Name. | ||
180 | $! | ||
181 | $ OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ" | ||
182 | $! | ||
183 | $! Create The Executable File Name. | ||
184 | $! | ||
185 | $ EXE_FILE = EXE_DIR + FILE_NAME + ".EXE" | ||
186 | $ ON WARNING THEN GOTO NEXT_FILE | ||
187 | $! | ||
188 | $! Check To See If The File We Want To Compile Actually Exists. | ||
189 | $! | ||
190 | $ IF (F$SEARCH(SOURCE_FILE).EQS."") | ||
191 | $ THEN | ||
192 | $! | ||
193 | $! Tell The User That The File Dosen't Exist. | ||
194 | $! | ||
195 | $ WRITE SYS$OUTPUT "" | ||
196 | $ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist." | ||
197 | $ WRITE SYS$OUTPUT "" | ||
198 | $! | ||
199 | $! Exit The Build. | ||
200 | $! | ||
201 | $ GOTO EXIT | ||
202 | $ ENDIF | ||
203 | $! | ||
204 | $! Tell The User What We Are Building. | ||
205 | $! | ||
206 | $ WRITE SYS$OUTPUT "Building The ",FILE_NAME," Test Program." | ||
207 | $! | ||
208 | $! Compile The File. | ||
209 | $! | ||
210 | $ ON ERROR THEN GOTO NEXT_FILE | ||
211 | $ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE' | ||
212 | $ ON WARNING THEN GOTO NEXT_FILE | ||
213 | $! | ||
214 | $! Check If What We Are About To Compile Works Without A TCP/IP Library. | ||
215 | $! | ||
216 | $ IF ((TCPIP_LIB.EQS."").AND.((TCPIP_PROGRAMS-FILE_NAME).NES.TCPIP_PROGRAMS)) | ||
217 | $ THEN | ||
218 | $! | ||
219 | $! Inform The User That A TCP/IP Library Is Needed To Compile This Program. | ||
220 | $! | ||
221 | $ WRITE SYS$OUTPUT FILE_NAME," Needs A TCP/IP Library. Can't Link. Skipping..." | ||
222 | $ GOTO NEXT_FILE | ||
223 | $! | ||
224 | $! End The TCP/IP Library Check. | ||
225 | $! | ||
226 | $ ENDIF | ||
227 | $! | ||
228 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. | ||
229 | $! | ||
230 | $ IF (RSAREF.EQS."TRUE") | ||
231 | $ THEN | ||
232 | $! | ||
233 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | ||
234 | $! | ||
235 | $ IF (TCPIP_LIB.NES."") | ||
236 | $ THEN | ||
237 | $! | ||
238 | $! Link With The RSAREF Library And A Specific TCP/IP Library. | ||
239 | $! | ||
240 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
241 | 'OBJECT_FILE',- | ||
242 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, - | ||
243 | 'TCPIP_LIB','OPT_FILE'/OPTION | ||
244 | $! | ||
245 | $! Else... | ||
246 | $! | ||
247 | $ ELSE | ||
248 | $! | ||
249 | $! Link With The RSAREF Library And NO TCP/IP Library. | ||
250 | $! | ||
251 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
252 | 'OBJECT_FILE', - | ||
253 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, - | ||
254 | 'OPT_FILE'/OPTION | ||
255 | $! | ||
256 | $! End The TCP/IP Library Check. | ||
257 | $! | ||
258 | $ ENDIF | ||
259 | $! | ||
260 | $! Else... | ||
261 | $! | ||
262 | $ ELSE | ||
263 | $! | ||
264 | $! Don't Link With The RSAREF Routines. | ||
265 | $! | ||
266 | $! | ||
267 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | ||
268 | $! | ||
269 | $ IF (TCPIP_LIB.NES."") | ||
270 | $ THEN | ||
271 | $! | ||
272 | $! Don't Link With The RSAREF Routines And TCP/IP Library. | ||
273 | $! | ||
274 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
275 | 'OBJECT_FILE', - | ||
276 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, - | ||
277 | 'TCPIP_LIB','OPT_FILE'/OPTION | ||
278 | $! | ||
279 | $! Else... | ||
280 | $! | ||
281 | $ ELSE | ||
282 | $! | ||
283 | $! Don't Link With The RSAREF Routines And Link With A TCP/IP Library. | ||
284 | $! | ||
285 | $ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' - | ||
286 | 'OBJECT_FILE', - | ||
287 | 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, - | ||
288 | 'OPT_FILE'/OPTION | ||
289 | $! | ||
290 | $! End The TCP/IP Library Check. | ||
291 | $! | ||
292 | $ ENDIF | ||
293 | $! | ||
294 | $! End The RSAREF Link Check. | ||
295 | $! | ||
296 | $ ENDIF | ||
297 | $! | ||
298 | $! Go Back And Do It Again. | ||
299 | $! | ||
300 | $ GOTO NEXT_FILE | ||
301 | $! | ||
302 | $! All Done With This Library Part. | ||
303 | $! | ||
304 | $ FILE_DONE: | ||
305 | $! | ||
306 | $! All Done, Time To Exit. | ||
307 | $! | ||
308 | $ EXIT: | ||
309 | $ GOSUB CLEANUP | ||
310 | $ EXIT | ||
311 | $! | ||
312 | $! Check For The Link Option FIle. | ||
313 | $! | ||
314 | $ CHECK_OPT_FILE: | ||
315 | $! | ||
316 | $! Check To See If We Need To Make A VAX C Option File. | ||
317 | $! | ||
318 | $ IF (COMPILER.EQS."VAXC") | ||
319 | $ THEN | ||
320 | $! | ||
321 | $! Check To See If We Already Have A VAX C Linker Option File. | ||
322 | $! | ||
323 | $ IF (F$SEARCH(OPT_FILE).EQS."") | ||
324 | $ THEN | ||
325 | $! | ||
326 | $! We Need A VAX C Linker Option File. | ||
327 | $! | ||
328 | $ CREATE 'OPT_FILE' | ||
329 | $DECK | ||
330 | ! | ||
331 | ! Default System Options File To Link Agianst | ||
332 | ! The Sharable VAX C Runtime Library. | ||
333 | ! | ||
334 | SYS$SHARE:VAXCRTL.EXE/SHARE | ||
335 | $EOD | ||
336 | $! | ||
337 | $! End The Option File Check. | ||
338 | $! | ||
339 | $ ENDIF | ||
340 | $! | ||
341 | $! End The VAXC Check. | ||
342 | $! | ||
343 | $ ENDIF | ||
344 | $! | ||
345 | $! Check To See If We Need A GNU C Option File. | ||
346 | $! | ||
347 | $ IF (COMPILER.EQS."GNUC") | ||
348 | $ THEN | ||
349 | $! | ||
350 | $! Check To See If We Already Have A GNU C Linker Option File. | ||
351 | $! | ||
352 | $ IF (F$SEARCH(OPT_FILE).EQS."") | ||
353 | $ THEN | ||
354 | $! | ||
355 | $! We Need A GNU C Linker Option File. | ||
356 | $! | ||
357 | $ CREATE 'OPT_FILE' | ||
358 | $DECK | ||
359 | ! | ||
360 | ! Default System Options File To Link Agianst | ||
361 | ! The Sharable C Runtime Library. | ||
362 | ! | ||
363 | GNU_CC:[000000]GCCLIB/LIBRARY | ||
364 | SYS$SHARE:VAXCRTL/SHARE | ||
365 | $EOD | ||
366 | $! | ||
367 | $! End The Option File Check. | ||
368 | $! | ||
369 | $ ENDIF | ||
370 | $! | ||
371 | $! End The GNU C Check. | ||
372 | $! | ||
373 | $ ENDIF | ||
374 | $! | ||
375 | $! Check To See If We Need A DEC C Option File. | ||
376 | $! | ||
377 | $ IF (COMPILER.EQS."DECC") | ||
378 | $ THEN | ||
379 | $! | ||
380 | $! Check To See If We Already Have A DEC C Linker Option File. | ||
381 | $! | ||
382 | $ IF (F$SEARCH(OPT_FILE).EQS."") | ||
383 | $ THEN | ||
384 | $! | ||
385 | $! Figure Out If We Need An AXP Or A VAX Linker Option File. | ||
386 | $! | ||
387 | $ IF (ARCH.EQS."VAX") | ||
388 | $ THEN | ||
389 | $! | ||
390 | $! We Need A DEC C Linker Option File For VAX. | ||
391 | $! | ||
392 | $ CREATE 'OPT_FILE' | ||
393 | $DECK | ||
394 | ! | ||
395 | ! Default System Options File To Link Agianst | ||
396 | ! The Sharable DEC C Runtime Library. | ||
397 | ! | ||
398 | SYS$SHARE:DECC$SHR.EXE/SHARE | ||
399 | $EOD | ||
400 | $! | ||
401 | $! Else... | ||
402 | $! | ||
403 | $ ELSE | ||
404 | $! | ||
405 | $! Create The AXP Linker Option File. | ||
406 | $! | ||
407 | $ CREATE 'OPT_FILE' | ||
408 | $DECK | ||
409 | ! | ||
410 | ! Default System Options File For AXP To Link Agianst | ||
411 | ! The Sharable C Runtime Library. | ||
412 | ! | ||
413 | SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE | ||
414 | SYS$SHARE:CMA$OPEN_RTL/SHARE | ||
415 | $EOD | ||
416 | $! | ||
417 | $! End The VAX/AXP DEC C Option File Check. | ||
418 | $! | ||
419 | $ ENDIF | ||
420 | $! | ||
421 | $! End The Option File Search. | ||
422 | $! | ||
423 | $ ENDIF | ||
424 | $! | ||
425 | $! End The DEC C Check. | ||
426 | $! | ||
427 | $ ENDIF | ||
428 | $! | ||
429 | $! Tell The User What Linker Option File We Are Using. | ||
430 | $! | ||
431 | $ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"." | ||
432 | $! | ||
433 | $! Time To RETURN. | ||
434 | $! | ||
435 | $ RETURN | ||
436 | $! | ||
437 | $! Check To See If We Have The Appropiate Libraries. | ||
438 | $! | ||
439 | $ LIB_CHECK: | ||
440 | $! | ||
441 | $! Look For The Library LIBCRYPTO.OLB. | ||
442 | $! | ||
443 | $ IF (F$SEARCH(CRYPTO_LIB).EQS."") | ||
444 | $ THEN | ||
445 | $! | ||
446 | $! Tell The User We Can't Find The LIBCRYPTO.OLB Library. | ||
447 | $! | ||
448 | $ WRITE SYS$OUTPUT "" | ||
449 | $ WRITE SYS$OUTPUT "Can't Find The Library ",CRYPTO_LIB,"." | ||
450 | $ WRITE SYS$OUTPUT "We Can't Link Without It." | ||
451 | $ WRITE SYS$OUTPUT "" | ||
452 | $! | ||
453 | $! Since We Can't Link Without It, Exit. | ||
454 | $! | ||
455 | $ EXIT | ||
456 | $! | ||
457 | $! End The Crypto Library Check. | ||
458 | $! | ||
459 | $ ENDIF | ||
460 | $! | ||
461 | $! See If We Need The RSAREF Library... | ||
462 | $! | ||
463 | $ IF (RSAREF.EQS."TRUE") | ||
464 | $ THEN | ||
465 | $! | ||
466 | $! Look For The Library LIBRSAGLUE.OLB. | ||
467 | $! | ||
468 | $ IF (F$SEARCH(RSAREF_LIB).EQS."") | ||
469 | $ THEN | ||
470 | $! | ||
471 | $! Tell The User We Can't Find The LIBRSAGLUE.OLB Library. | ||
472 | $! | ||
473 | $ WRITE SYS$OUTPUT "" | ||
474 | $ WRITE SYS$OUTPUT "Can't Find The Library ",RSAREF_LIB,"." | ||
475 | $ WRITE SYS$OUTPUT "We Can't Link Without It." | ||
476 | $ WRITE SYS$OUTPUT "" | ||
477 | $! | ||
478 | $! Since We Can't Link Without It, Exit. | ||
479 | $! | ||
480 | $ EXIT | ||
481 | $ ENDIF | ||
482 | $! | ||
483 | $! End The RSAREF Library Check. | ||
484 | $! | ||
485 | $ ENDIF | ||
486 | $! | ||
487 | $! Look For The Library LIBSSL.OLB. | ||
488 | $! | ||
489 | $ IF (F$SEARCH(SSL_LIB).EQS."") | ||
490 | $ THEN | ||
491 | $! | ||
492 | $! Tell The User We Can't Find The LIBSSL.OLB Library. | ||
493 | $! | ||
494 | $ WRITE SYS$OUTPUT "" | ||
495 | $ WRITE SYS$OUTPUT "Can't Find The Library ",SSL_LIB,"." | ||
496 | $ WRITE SYS$OUTPUT "Some Of The Test Programs Need To Link To It." | ||
497 | $ WRITE SYS$OUTPUT "" | ||
498 | $! | ||
499 | $! Since We Can't Link Without It, Exit. | ||
500 | $! | ||
501 | $ EXIT | ||
502 | $! | ||
503 | $! End The SSL Library Check. | ||
504 | $! | ||
505 | $ ENDIF | ||
506 | $! | ||
507 | $! Time To Return. | ||
508 | $! | ||
509 | $ RETURN | ||
510 | $! | ||
511 | $! Check The User's Options. | ||
512 | $! | ||
513 | $ CHECK_OPTIONS: | ||
514 | $! | ||
515 | $! Check To See If P1 Is Blank. | ||
516 | $! | ||
517 | $ IF (P1.EQS."NORSAREF") | ||
518 | $ THEN | ||
519 | $! | ||
520 | $! P1 Is NORSAREF, So Compile With The Regular RSA Libraries. | ||
521 | $! | ||
522 | $ RSAREF = "FALSE" | ||
523 | $ ELSE | ||
524 | $! | ||
525 | $! Check To See If We Are To Use The RSAREF Library. | ||
526 | $! | ||
527 | $ IF (P1.EQS."RSAREF") | ||
528 | $ THEN | ||
529 | $! | ||
530 | $! Check To Make Sure We Have The RSAREF Source Code Directory. | ||
531 | $! | ||
532 | $ IF (F$SEARCH("SYS$DISK:[-.RSAREF]SOURCE.DIR").EQS."") | ||
533 | $ THEN | ||
534 | $! | ||
535 | $! We Don't Have The RSAREF Souce Code Directory, So Tell The | ||
536 | $! User This. | ||
537 | $! | ||
538 | $ WRITE SYS$OUTPUT "" | ||
539 | $ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code." | ||
540 | $ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to" | ||
541 | $ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the" | ||
542 | $ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file" | ||
543 | $ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory" | ||
544 | $ WRITE SYS$OUTPUT "as that is where the scripts will look for the files." | ||
545 | $ WRITE SYS$OUTPUT "" | ||
546 | $! | ||
547 | $! Time To Exit. | ||
548 | $! | ||
549 | $ EXIT | ||
550 | $! | ||
551 | $! Else, Compile Using The RSAREF Library. | ||
552 | $! | ||
553 | $ ELSE | ||
554 | $ RSAREF = "TRUE" | ||
555 | $ ENDIF | ||
556 | $ ELSE | ||
557 | $! | ||
558 | $! They Entered An Invalid Option.. | ||
559 | $! | ||
560 | $ WRITE SYS$OUTPUT "" | ||
561 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" | ||
562 | $ WRITE SYS$OUTPUT "" | ||
563 | $ WRITE SYS$OUTPUT " RSAREF : Compile With The RSAREF Library." | ||
564 | $ WRITE SYS$OUTPUT " NORSAREF : Compile With The Regular RSA Library." | ||
565 | $ WRITE SYS$OUTPUT "" | ||
566 | $! | ||
567 | $! Time To EXIT. | ||
568 | $! | ||
569 | $ EXIT | ||
570 | $! | ||
571 | $! End The Valid Arguement Check. | ||
572 | $! | ||
573 | $ ENDIF | ||
574 | $! | ||
575 | $! End The P1 Check. | ||
576 | $! | ||
577 | $ ENDIF | ||
578 | $! | ||
579 | $! Check To See If P2 Is Blank. | ||
580 | $! | ||
581 | $ IF (P2.EQS."NODEBUG") | ||
582 | $ THEN | ||
583 | $! | ||
584 | $! P2 Is NODEBUG, So Compile Without Debugger Information. | ||
585 | $! | ||
586 | $ DEBUGGER = "NODEBUG" | ||
587 | $ TRACEBACK = "NOTRACEBACK" | ||
588 | $ GCC_OPTIMIZE = "OPTIMIZE" | ||
589 | $ CC_OPTIMIZE = "OPTIMIZE" | ||
590 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | ||
591 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
592 | $! | ||
593 | $! Else... | ||
594 | $! | ||
595 | $ ELSE | ||
596 | $! | ||
597 | $! Check To See If We Are To Compile With Debugger Information. | ||
598 | $! | ||
599 | $ IF (P2.EQS."DEBUG") | ||
600 | $ THEN | ||
601 | $! | ||
602 | $! Compile With Debugger Information. | ||
603 | $! | ||
604 | $ DEBUGGER = "DEBUG" | ||
605 | $ TRACEBACK = "TRACEBACK" | ||
606 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | ||
607 | $ CC_OPTIMIZE = "NOOPTIMIZE" | ||
608 | $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile." | ||
609 | $ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization." | ||
610 | $! | ||
611 | $! Else... | ||
612 | $! | ||
613 | $ ELSE | ||
614 | $! | ||
615 | $! Tell The User Entered An Invalid Option.. | ||
616 | $! | ||
617 | $ WRITE SYS$OUTPUT "" | ||
618 | $ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:" | ||
619 | $ WRITE SYS$OUTPUT "" | ||
620 | $ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information." | ||
621 | $ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information." | ||
622 | $ WRITE SYS$OUTPUT "" | ||
623 | $! | ||
624 | $! Time To EXIT. | ||
625 | $! | ||
626 | $ EXIT | ||
627 | $! | ||
628 | $! End The Valid Arguement Check. | ||
629 | $! | ||
630 | $ ENDIF | ||
631 | $! | ||
632 | $! End The P3 Check. | ||
633 | $! | ||
634 | $ ENDIF | ||
635 | $! | ||
636 | $! Check To See If P3 Is Blank. | ||
637 | $! | ||
638 | $ IF (P3.EQS."") | ||
639 | $ THEN | ||
640 | $! | ||
641 | $! O.K., The User Didn't Specify A Compiler, Let's Try To | ||
642 | $! Find Out Which One To Use. | ||
643 | $! | ||
644 | $! Check To See If We Have GNU C. | ||
645 | $! | ||
646 | $ IF (F$TRNLNM("GNU_CC").NES."") | ||
647 | $ THEN | ||
648 | $! | ||
649 | $! Looks Like GNUC, Set To Use GNUC. | ||
650 | $! | ||
651 | $ P3 = "GNUC" | ||
652 | $! | ||
653 | $! End The GNU C Compiler Check. | ||
654 | $! | ||
655 | $ ELSE | ||
656 | $! | ||
657 | $! Check To See If We Have VAXC Or DECC. | ||
658 | $! | ||
659 | $ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."") | ||
660 | $ THEN | ||
661 | $! | ||
662 | $! Looks Like DECC, Set To Use DECC. | ||
663 | $! | ||
664 | $ P3 = "DECC" | ||
665 | $! | ||
666 | $! Else... | ||
667 | $! | ||
668 | $ ELSE | ||
669 | $! | ||
670 | $! Looks Like VAXC, Set To Use VAXC. | ||
671 | $! | ||
672 | $ P3 = "VAXC" | ||
673 | $! | ||
674 | $! End The VAXC Compiler Check. | ||
675 | $! | ||
676 | $ ENDIF | ||
677 | $! | ||
678 | $! End The DECC & VAXC Compiler Check. | ||
679 | $! | ||
680 | $ ENDIF | ||
681 | $! | ||
682 | $! End The Compiler Check. | ||
683 | $! | ||
684 | $ ENDIF | ||
685 | $! | ||
686 | $! Check To See If We Have A Option For P4. | ||
687 | $! | ||
688 | $ IF (P4.EQS."") | ||
689 | $ THEN | ||
690 | $! | ||
691 | $! Find out what socket library we have available | ||
692 | $! | ||
693 | $ IF F$PARSE("SOCKETSHR:") .NES. "" | ||
694 | $ THEN | ||
695 | $! | ||
696 | $! We have SOCKETSHR, and it is my opinion that it's the best to use. | ||
697 | $! | ||
698 | $ P4 = "SOCKETSHR" | ||
699 | $! | ||
700 | $! Tell the user | ||
701 | $! | ||
702 | $ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP" | ||
703 | $! | ||
704 | $! Else, let's look for something else | ||
705 | $! | ||
706 | $ ELSE | ||
707 | $! | ||
708 | $! Like UCX (the reason to do this before Multinet is that the UCX | ||
709 | $! emulation is easier to use...) | ||
710 | $! | ||
711 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" - | ||
712 | .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" - | ||
713 | .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. "" | ||
714 | $ THEN | ||
715 | $! | ||
716 | $! Last resort: a UCX or UCX-compatible library | ||
717 | $! | ||
718 | $ P4 = "UCX" | ||
719 | $! | ||
720 | $! Tell the user | ||
721 | $! | ||
722 | $ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP" | ||
723 | $! | ||
724 | $! That was all... | ||
725 | $! | ||
726 | $ ENDIF | ||
727 | $ ENDIF | ||
728 | $ ENDIF | ||
729 | $! | ||
730 | $! Set Up Initial CC Definitions, Possibly With User Ones | ||
731 | $! | ||
732 | $ CCDEFS = "VMS=1,TCPIP_TYPE_''P4'" | ||
733 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | ||
734 | $ CCEXTRAFLAGS = "" | ||
735 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | ||
736 | $ CCDISABLEWARNINGS = "" | ||
737 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | ||
738 | CCDISABLEWARNINGS = USER_CCDISABLEWARNINGS | ||
739 | $! | ||
740 | $! Check To See If The User Entered A Valid Paramter. | ||
741 | $! | ||
742 | $ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC") | ||
743 | $ THEN | ||
744 | $! | ||
745 | $! Check To See If The User Wanted DECC. | ||
746 | $! | ||
747 | $ IF (P3.EQS."DECC") | ||
748 | $ THEN | ||
749 | $! | ||
750 | $! Looks Like DECC, Set To Use DECC. | ||
751 | $! | ||
752 | $ COMPILER = "DECC" | ||
753 | $! | ||
754 | $! Tell The User We Are Using DECC. | ||
755 | $! | ||
756 | $ WRITE SYS$OUTPUT "Using DECC 'C' Compiler." | ||
757 | $! | ||
758 | $! Use DECC... | ||
759 | $! | ||
760 | $ CC = "CC" | ||
761 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | ||
762 | THEN CC = "CC/DECC" | ||
763 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + - | ||
764 | "/NOLIST/PREFIX=ALL" + CCEXTRAFLAGS | ||
765 | $! | ||
766 | $! Define The Linker Options File Name. | ||
767 | $! | ||
768 | $ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT" | ||
769 | $! | ||
770 | $! End DECC Check. | ||
771 | $! | ||
772 | $ ENDIF | ||
773 | $! | ||
774 | $! Check To See If We Are To Use VAXC. | ||
775 | $! | ||
776 | $ IF (P3.EQS."VAXC") | ||
777 | $ THEN | ||
778 | $! | ||
779 | $! Looks Like VAXC, Set To Use VAXC. | ||
780 | $! | ||
781 | $ COMPILER = "VAXC" | ||
782 | $! | ||
783 | $! Tell The User We Are Using VAX C. | ||
784 | $! | ||
785 | $ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler." | ||
786 | $! | ||
787 | $! Compile Using VAXC. | ||
788 | $! | ||
789 | $ CC = "CC" | ||
790 | $ IF ARCH.EQS."AXP" | ||
791 | $ THEN | ||
792 | $ WRITE SYS$OUTPUT "There is no VAX C on Alpha!" | ||
793 | $ EXIT | ||
794 | $ ENDIF | ||
795 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC" | ||
796 | $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS | ||
797 | $ CCDEFS = CCDEFS + ",""VAXC""" | ||
798 | $! | ||
799 | $! Define <sys> As SYS$COMMON:[SYSLIB] | ||
800 | $! | ||
801 | $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB] | ||
802 | $! | ||
803 | $! Define The Linker Options File Name. | ||
804 | $! | ||
805 | $ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT" | ||
806 | $! | ||
807 | $! End VAXC Check | ||
808 | $! | ||
809 | $ ENDIF | ||
810 | $! | ||
811 | $! Check To See If We Are To Use GNU C. | ||
812 | $! | ||
813 | $ IF (P3.EQS."GNUC") | ||
814 | $ THEN | ||
815 | $! | ||
816 | $! Looks Like GNUC, Set To Use GNUC. | ||
817 | $! | ||
818 | $ COMPILER = "GNUC" | ||
819 | $! | ||
820 | $! Tell The User We Are Using GNUC. | ||
821 | $! | ||
822 | $ WRITE SYS$OUTPUT "Using GNU 'C' Compiler." | ||
823 | $! | ||
824 | $! Use GNU C... | ||
825 | $! | ||
826 | $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS | ||
827 | $! | ||
828 | $! Define The Linker Options File Name. | ||
829 | $! | ||
830 | $ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT" | ||
831 | $! | ||
832 | $! End The GNU C Check. | ||
833 | $! | ||
834 | $ ENDIF | ||
835 | $! | ||
836 | $! Set up default defines | ||
837 | $! | ||
838 | $ CCDEFS = """FLAT_INC=1""," + CCDEFS | ||
839 | $! | ||
840 | $! Check To See If We Are To Compile With RSAREF Routines. | ||
841 | $! | ||
842 | $ IF (RSAREF.EQS."TRUE") | ||
843 | $ THEN | ||
844 | $! | ||
845 | $! Compile With RSAREF. | ||
846 | $! | ||
847 | $ CCDEFS = CCDEFS + ",""RSAref=1""" | ||
848 | $! | ||
849 | $! Tell The User This. | ||
850 | $! | ||
851 | $ WRITE SYS$OUTPUT "Compiling With RSAREF Routines." | ||
852 | $! | ||
853 | $! Else, We Don't Care. Compile Without The RSAREF Library. | ||
854 | $! | ||
855 | $ ELSE | ||
856 | $! | ||
857 | $! Tell The User We Are Compile Without The RSAREF Routines. | ||
858 | $! | ||
859 | $ WRITE SYS$OUTPUT "Compiling Without The RSAREF Routines. | ||
860 | $! | ||
861 | $! End The RSAREF Check. | ||
862 | $! | ||
863 | $ ENDIF | ||
864 | $! | ||
865 | $! Finish up the definition of CC. | ||
866 | $! | ||
867 | $ IF COMPILER .EQS. "DECC" | ||
868 | $ THEN | ||
869 | $ IF CCDISABLEWARNINGS .EQS. "" | ||
870 | $ THEN | ||
871 | $ CC4DISABLEWARNINGS = "DOLLARID" | ||
872 | $ ELSE | ||
873 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" | ||
874 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | ||
875 | $ ENDIF | ||
876 | $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" | ||
877 | $ ELSE | ||
878 | $ CCDISABLEWARNINGS = "" | ||
879 | $ CC4DISABLEWARNINGS = "" | ||
880 | $ ENDIF | ||
881 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | ||
882 | $! | ||
883 | $! Show user the result | ||
884 | $! | ||
885 | $ WRITE SYS$OUTPUT "Main Compiling Command: ",CC | ||
886 | $! | ||
887 | $! Else The User Entered An Invalid Arguement. | ||
888 | $! | ||
889 | $ ELSE | ||
890 | $! | ||
891 | $! Tell The User We Don't Know What They Want. | ||
892 | $! | ||
893 | $ WRITE SYS$OUTPUT "" | ||
894 | $ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:" | ||
895 | $ WRITE SYS$OUTPUT "" | ||
896 | $ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C." | ||
897 | $ WRITE SYS$OUTPUT " DECC : To Compile With DEC C." | ||
898 | $ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C." | ||
899 | $ WRITE SYS$OUTPUT "" | ||
900 | $! | ||
901 | $! Time To EXIT. | ||
902 | $! | ||
903 | $ EXIT | ||
904 | $ ENDIF | ||
905 | $! | ||
906 | $! Time to check the contents, and to make sure we get the correct library. | ||
907 | $! | ||
908 | $ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX" | ||
909 | $ THEN | ||
910 | $! | ||
911 | $! Check to see if SOCKETSHR was chosen | ||
912 | $! | ||
913 | $ IF P4.EQS."SOCKETSHR" | ||
914 | $ THEN | ||
915 | $! | ||
916 | $! Set the library to use SOCKETSHR | ||
917 | $! | ||
918 | $ TCPIP_LIB = "[-.VMS]SOCKETSHR_SHR.OPT/OPT" | ||
919 | $! | ||
920 | $! Done with SOCKETSHR | ||
921 | $! | ||
922 | $ ENDIF | ||
923 | $! | ||
924 | $! Check to see if MULTINET was chosen | ||
925 | $! | ||
926 | $ IF P4.EQS."MULTINET" | ||
927 | $ THEN | ||
928 | $! | ||
929 | $! Set the library to use UXC emulation. | ||
930 | $! | ||
931 | $ P4 = "UCX" | ||
932 | $! | ||
933 | $! Done with MULTINET | ||
934 | $! | ||
935 | $ ENDIF | ||
936 | $! | ||
937 | $! Check to see if UCX was chosen | ||
938 | $! | ||
939 | $ IF P4.EQS."UCX" | ||
940 | $ THEN | ||
941 | $! | ||
942 | $! Set the library to use UCX. | ||
943 | $! | ||
944 | $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC.OPT/OPT" | ||
945 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | ||
946 | $ THEN | ||
947 | $ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT" | ||
948 | $ ELSE | ||
949 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | ||
950 | TCPIP_LIB = "[-.VMS]UCX_SHR_VAXC.OPT/OPT" | ||
951 | $ ENDIF | ||
952 | $! | ||
953 | $! Done with UCX | ||
954 | $! | ||
955 | $ ENDIF | ||
956 | $! | ||
957 | $! Print info | ||
958 | $! | ||
959 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | ||
960 | $! | ||
961 | $! Else The User Entered An Invalid Arguement. | ||
962 | $! | ||
963 | $ ELSE | ||
964 | $! | ||
965 | $! Tell The User We Don't Know What They Want. | ||
966 | $! | ||
967 | $ WRITE SYS$OUTPUT "" | ||
968 | $ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:" | ||
969 | $ WRITE SYS$OUTPUT "" | ||
970 | $ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library." | ||
971 | $ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library." | ||
972 | $ WRITE SYS$OUTPUT "" | ||
973 | $! | ||
974 | $! Time To EXIT. | ||
975 | $! | ||
976 | $ EXIT | ||
977 | $! | ||
978 | $! Done with TCP/IP libraries | ||
979 | $! | ||
980 | $ ENDIF | ||
981 | $! | ||
982 | $! Special Threads For OpenVMS v7.1 Or Later | ||
983 | $! | ||
984 | $! Written By: Richard Levitte | ||
985 | $! richard@levitte.org | ||
986 | $! | ||
987 | $! | ||
988 | $! Check To See If We Have A Option For P5. | ||
989 | $! | ||
990 | $ IF (P5.EQS."") | ||
991 | $ THEN | ||
992 | $! | ||
993 | $! Get The Version Of VMS We Are Using. | ||
994 | $! | ||
995 | $ ISSEVEN := | ||
996 | $ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION"))) | ||
997 | $ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP)) | ||
998 | $! | ||
999 | $! Check To See If The VMS Version Is v7.1 Or Later. | ||
1000 | $! | ||
1001 | $ IF (TMP.GE.71) | ||
1002 | $ THEN | ||
1003 | $! | ||
1004 | $! We Have OpenVMS v7.1 Or Later, So Use The Special Threads. | ||
1005 | $! | ||
1006 | $ ISSEVEN := ,PTHREAD_USE_D4 | ||
1007 | $! | ||
1008 | $! End The VMS Version Check. | ||
1009 | $! | ||
1010 | $ ENDIF | ||
1011 | $! | ||
1012 | $! End The P5 Check. | ||
1013 | $! | ||
1014 | $ ENDIF | ||
1015 | $! | ||
1016 | $! Time To RETURN... | ||
1017 | $! | ||
1018 | $ RETURN | ||
1019 | $! | ||
1020 | $ INITIALISE: | ||
1021 | $! | ||
1022 | $! Save old value of the logical name OPENSSL | ||
1023 | $! | ||
1024 | $ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE") | ||
1025 | $! | ||
1026 | $! Save directory information | ||
1027 | $! | ||
1028 | $ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;" | ||
1029 | $ __TOP = __HERE - "TEST]" | ||
1030 | $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]" | ||
1031 | $! | ||
1032 | $! Set up the logical name OPENSSL to point at the include directory | ||
1033 | $! | ||
1034 | $ DEFINE OPENSSL/NOLOG '__INCLUDE' | ||
1035 | $! | ||
1036 | $! Done | ||
1037 | $! | ||
1038 | $ RETURN | ||
1039 | $! | ||
1040 | $ CLEANUP: | ||
1041 | $! | ||
1042 | $! Restore the logical name OPENSSL if it had a value | ||
1043 | $! | ||
1044 | $ IF __SAVE_OPENSSL .EQS. "" | ||
1045 | $ THEN | ||
1046 | $ DEASSIGN OPENSSL | ||
1047 | $ ELSE | ||
1048 | $ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL' | ||
1049 | $ ENDIF | ||
1050 | $! | ||
1051 | $! Done | ||
1052 | $! | ||
1053 | $ RETURN | ||
diff --git a/src/lib/libssl/test/methtest.c b/src/lib/libssl/test/methtest.c index 630d29dc91..06ccb3b310 100644 --- a/src/lib/libssl/test/methtest.c +++ b/src/lib/libssl/test/methtest.c | |||
@@ -58,10 +58,10 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include "rsa.h" | 61 | #include <openssl/rsa.h> |
62 | #include "x509.h" | 62 | #include <openssl/x509.h> |
63 | #include "meth.h" | 63 | #include "meth.h" |
64 | #include "err.h" | 64 | #include <openssl/err.h> |
65 | 65 | ||
66 | int main(argc,argv) | 66 | int main(argc,argv) |
67 | int argc; | 67 | int argc; |
diff --git a/src/lib/libssl/test/p b/src/lib/libssl/test/p deleted file mode 100644 index b3de76751e..0000000000 --- a/src/lib/libssl/test/p +++ /dev/null | |||
@@ -1,294 +0,0 @@ | |||
1 | # | ||
2 | # test/Makefile.ssl | ||
3 | # | ||
4 | |||
5 | DIR= test | ||
6 | TOP= .. | ||
7 | CC= cc | ||
8 | INCLUDES= -I../include | ||
9 | CFLAG= -g | ||
10 | INSTALLTOP= /usr/local/ssl | ||
11 | MAKEFILE= Makefile.ssl | ||
12 | MAKE= make -f $(MAKEFILE) | ||
13 | MAKEDEPEND= makedepend -f$(MAKEFILE) | ||
14 | |||
15 | PEX_LIBS= | ||
16 | EX_LIBS= #-lnsl -lsocket | ||
17 | |||
18 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
19 | |||
20 | GENERAL=Makefile.ssl | ||
21 | |||
22 | DLIBCRYPTO= ../libcrypto.a | ||
23 | DLIBSSL= ../libssl.a | ||
24 | LIBCRYPTO= -L.. -lcrypto | ||
25 | LIBSSL= -L.. -lssl | ||
26 | |||
27 | BNTEST= bntest | ||
28 | EXPTEST= exptest | ||
29 | IDEATEST= ideatest | ||
30 | SHATEST= shatest | ||
31 | SHA1TEST= sha1test | ||
32 | MDC2TEST= mdc2test | ||
33 | RMDTEST= rmdtest | ||
34 | MD2TEST= md2test | ||
35 | MD5TEST= md5test | ||
36 | HMACTEST= hmactest | ||
37 | RC2TEST= rc2test | ||
38 | RC4TEST= rc4test | ||
39 | RC5TEST= rc5test | ||
40 | BFTEST= bftest | ||
41 | CASTTEST= casttest | ||
42 | DESTEST= destest | ||
43 | RANDTEST= randtest | ||
44 | DHTEST= dhtest | ||
45 | DSATEST= dsatest | ||
46 | METHTEST= methtest | ||
47 | SSLTEST= ssltest | ||
48 | |||
49 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ | ||
50 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | ||
51 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | ||
52 | $(RANDTEST) $(DHTEST) \ | ||
53 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) | ||
54 | |||
55 | # $(METHTEST) | ||
56 | |||
57 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD5TEST).o $(HMACTEST).o \ | ||
58 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | ||
59 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | ||
60 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ | ||
61 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o | ||
62 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ | ||
63 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | ||
64 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | ||
65 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ | ||
66 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c | ||
67 | |||
68 | EXHEADER= | ||
69 | HEADER= $(EXHEADER) | ||
70 | |||
71 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
72 | |||
73 | top: | ||
74 | (cd ..; $(MAKE) DIRS=$(DIR) all) | ||
75 | |||
76 | all: exe | ||
77 | |||
78 | exe: $(EXE) | ||
79 | |||
80 | files: | ||
81 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
82 | |||
83 | links: | ||
84 | /bin/rm -f Makefile | ||
85 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
86 | |||
87 | errors: | ||
88 | |||
89 | install: | ||
90 | |||
91 | tags: | ||
92 | ctags $(SRC) | ||
93 | |||
94 | tests: exe apps \ | ||
95 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ | ||
96 | test_rc2 test_rc4 test_rc5 test_bf test_cast \ | ||
97 | test_rand test_enc test_x509 test_rsa test_crl test_sid test_req \ | ||
98 | test_pkcs7 test_bn test_verify test_dh test_dsa test_reqgen \ | ||
99 | test_ss test_ssl test_ca | ||
100 | |||
101 | apps: | ||
102 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) | ||
103 | |||
104 | test_des: | ||
105 | #./$(DESTEST) | ||
106 | |||
107 | test_idea: | ||
108 | ./$(IDEATEST) | ||
109 | |||
110 | test_sha: | ||
111 | ./$(SHATEST) | ||
112 | ./$(SHA1TEST) | ||
113 | |||
114 | test_mdc2: | ||
115 | ./$(MDC2TEST) | ||
116 | |||
117 | test_md5: | ||
118 | ./$(MD5TEST) | ||
119 | |||
120 | test_hmac: | ||
121 | ./$(HMACTEST) | ||
122 | |||
123 | test_md2: | ||
124 | ./$(MD2TEST) | ||
125 | |||
126 | test_rmd: | ||
127 | ./$(RMDTEST) | ||
128 | |||
129 | test_bf: | ||
130 | ./$(BFTEST) | ||
131 | |||
132 | test_cast: | ||
133 | ./$(CASTTEST) | ||
134 | |||
135 | test_rc2: | ||
136 | ./$(RC2TEST) | ||
137 | |||
138 | test_rc4: | ||
139 | ./$(RC4TEST) | ||
140 | |||
141 | test_rc5: | ||
142 | ./$(RC5TEST) | ||
143 | |||
144 | test_rand: | ||
145 | ./$(RANDTEST) | ||
146 | |||
147 | test_enc: | ||
148 | @sh ./testenc | ||
149 | |||
150 | test_x509: | ||
151 | echo test normal x509v1 certificate | ||
152 | sh ./tx509 2>/dev/null | ||
153 | echo test first x509v3 certificate | ||
154 | sh ./tx509 v3-cert1.pem 2>/dev/null | ||
155 | echo test second x509v3 certificate | ||
156 | sh ./tx509 v3-cert2.pem 2>/dev/null | ||
157 | |||
158 | test_rsa: | ||
159 | @sh ./trsa 2>/dev/null | ||
160 | |||
161 | test_crl: | ||
162 | @sh ./tcrl 2>/dev/null | ||
163 | |||
164 | test_sid: | ||
165 | @sh ./tsid 2>/dev/null | ||
166 | |||
167 | test_req: | ||
168 | @sh ./treq 2>/dev/null | ||
169 | @sh ./treq testreq2.pem 2>/dev/null | ||
170 | |||
171 | test_pkcs7: | ||
172 | @sh ./tpkcs7 2>/dev/null | ||
173 | @sh ./tpkcs7d 2>/dev/null | ||
174 | |||
175 | test_bn: | ||
176 | @echo 'test a^b%c implementations' | ||
177 | ./$(EXPTEST) | ||
178 | @echo starting big number library test, could take a while... | ||
179 | @(./$(BNTEST)|bc) | awk '{ \ | ||
180 | if ($$0 != "0") {print "error"; exit(1); } \ | ||
181 | if (((NR+1)%64) == 0) print NR+1," tests done"; }' | ||
182 | |||
183 | test_verify: | ||
184 | @echo "The following command should have some OK's and some failures" | ||
185 | @echo "There are definitly a few expired certificates" | ||
186 | ../apps/ssleay verify -CApath ../certs ../certs/*.pem | ||
187 | |||
188 | test_dh: | ||
189 | @echo "Generate as set of DH parameters" | ||
190 | ./$(DHTEST) | ||
191 | |||
192 | test_dsa: | ||
193 | @echo "Generate as set of DSA parameters" | ||
194 | ./$(DSATEST) | ||
195 | |||
196 | test_reqgen: | ||
197 | @echo "Generate and verify a certificate request" | ||
198 | @sh ./testgen | ||
199 | |||
200 | test_ss: | ||
201 | @echo "Generate and certify a test certificate" | ||
202 | @sh ./testss | ||
203 | |||
204 | test_ssl: | ||
205 | @echo "test SSL protocol" | ||
206 | @sh ./testssl | ||
207 | |||
208 | test_ca: | ||
209 | @echo "Generate and certify a test certificate via the 'ca' program" | ||
210 | @sh ./testca | ||
211 | |||
212 | lint: | ||
213 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
214 | |||
215 | depend: | ||
216 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC) | ||
217 | |||
218 | dclean: | ||
219 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
220 | mv -f Makefile.new $(MAKEFILE) | ||
221 | |||
222 | clean: | ||
223 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log | ||
224 | |||
225 | $(DLIBSSL): | ||
226 | (cd ../ssl; $(MAKE)) | ||
227 | |||
228 | $(DLIBCRYPTO): | ||
229 | (cd ../crypto; $(MAKE)) | ||
230 | |||
231 | $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) | ||
232 | $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
233 | |||
234 | $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) | ||
235 | $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
236 | |||
237 | $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) | ||
238 | $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
239 | |||
240 | $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) | ||
241 | $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
242 | |||
243 | $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) | ||
244 | $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
245 | |||
246 | $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) | ||
247 | $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
248 | |||
249 | $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) | ||
250 | $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
251 | |||
252 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) | ||
253 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
254 | |||
255 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) | ||
256 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
257 | |||
258 | $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) | ||
259 | $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
260 | |||
261 | $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) | ||
262 | $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
263 | |||
264 | $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) | ||
265 | $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
266 | |||
267 | $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) | ||
268 | $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
269 | |||
270 | $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) | ||
271 | $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
272 | |||
273 | $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) | ||
274 | $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
275 | |||
276 | $(DESTEST): $(DESTEST).o $(DLIBCRYPTO) | ||
277 | $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
278 | |||
279 | $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) | ||
280 | $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
281 | |||
282 | $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) | ||
283 | $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
284 | |||
285 | $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) | ||
286 | $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
287 | |||
288 | $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) | ||
289 | $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
290 | |||
291 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | ||
292 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | ||
293 | |||
294 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/test/riptest b/src/lib/libssl/test/riptest deleted file mode 100644 index 8685d0ce53..0000000000 --- a/src/lib/libssl/test/riptest +++ /dev/null | |||
Binary files differ | |||
diff --git a/src/lib/libssl/test/tcrl b/src/lib/libssl/test/tcrl index 859fba452f..acaf8f3c47 100644 --- a/src/lib/libssl/test/tcrl +++ b/src/lib/libssl/test/tcrl | |||
@@ -3,7 +3,7 @@ | |||
3 | PATH=../apps:$PATH | 3 | PATH=../apps:$PATH |
4 | export PATH | 4 | export PATH |
5 | 5 | ||
6 | cmd='../apps/ssleay crl' | 6 | cmd='../apps/openssl crl' |
7 | 7 | ||
8 | if [ "$1"x != "x" ]; then | 8 | if [ "$1"x != "x" ]; then |
9 | t=$1 | 9 | t=$1 |
diff --git a/src/lib/libssl/test/tcrl.com b/src/lib/libssl/test/tcrl.com new file mode 100644 index 0000000000..cef21467bb --- /dev/null +++ b/src/lib/libssl/test/tcrl.com | |||
@@ -0,0 +1,78 @@ | |||
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 | $ copy 't' fff.p | ||
14 | $ | ||
15 | $ write sys$output "p -> d" | ||
16 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $! write sys$output "p -> t" | ||
19 | $! 'cmd' -in fff.p -inform p -outform t -out f.t | ||
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 "t -> d" | ||
29 | $! 'cmd' -in f.t -inform t -outform d -out ff.d2 | ||
30 | $! if $severity .ne. 1 then exit 3 | ||
31 | $ write sys$output "p -> d" | ||
32 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
33 | $ if $severity .ne. 1 then exit 3 | ||
34 | $ | ||
35 | $! write sys$output "d -> t" | ||
36 | $! 'cmd' -in f.d -inform d -outform t -out ff.t1 | ||
37 | $! if $severity .ne. 1 then exit 3 | ||
38 | $! write sys$output "t -> t" | ||
39 | $! 'cmd' -in f.t -inform t -outform t -out ff.t2 | ||
40 | $! if $severity .ne. 1 then exit 3 | ||
41 | $! write sys$output "p -> t" | ||
42 | $! 'cmd' -in f.p -inform p -outform t -out ff.t3 | ||
43 | $! if $severity .ne. 1 then exit 3 | ||
44 | $ | ||
45 | $ write sys$output "d -> p" | ||
46 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
47 | $ if $severity .ne. 1 then exit 3 | ||
48 | $! write sys$output "t -> p" | ||
49 | $! 'cmd' -in f.t -inform t -outform p -out ff.p2 | ||
50 | $! if $severity .ne. 1 then exit 3 | ||
51 | $ write sys$output "p -> p" | ||
52 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
53 | $ if $severity .ne. 1 then exit 3 | ||
54 | $ | ||
55 | $ difference/output=nl: fff.p f.p | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ difference/output=nl: fff.p ff.p1 | ||
58 | $ if $severity .ne. 1 then exit 3 | ||
59 | $! difference/output=nl: fff.p ff.p2 | ||
60 | $! if $severity .ne. 1 then exit 3 | ||
61 | $ difference/output=nl: fff.p ff.p3 | ||
62 | $ if $severity .ne. 1 then exit 3 | ||
63 | $ | ||
64 | $! difference/output=nl: f.t ff.t1 | ||
65 | $! if $severity .ne. 1 then exit 3 | ||
66 | $! difference/output=nl: f.t ff.t2 | ||
67 | $! if $severity .ne. 1 then exit 3 | ||
68 | $! difference/output=nl: f.t ff.t3 | ||
69 | $! if $severity .ne. 1 then exit 3 | ||
70 | $ | ||
71 | $ difference/output=nl: f.p ff.p1 | ||
72 | $ if $severity .ne. 1 then exit 3 | ||
73 | $! difference/output=nl: f.p ff.p2 | ||
74 | $! if $severity .ne. 1 then exit 3 | ||
75 | $ difference/output=nl: f.p ff.p3 | ||
76 | $ if $severity .ne. 1 then exit 3 | ||
77 | $ | ||
78 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/test.txt b/src/lib/libssl/test/test.txt deleted file mode 100644 index c6d8d50ba9..0000000000 --- a/src/lib/libssl/test/test.txt +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | test=./test.txt | ||
4 | |||
5 | cat $0 >$test; | ||
6 | |||
7 | for i in rc4 des-cfb des-ofb des-ecb des-cbc des-ede des-ede3 \ | ||
8 | des-cbc-ede des-cbc-ede3 idea-ecb idea-cfb idea-ofb idea-cbc | ||
9 | do | ||
10 | echo $i | ||
11 | ../apps/ssleay $i -e -k test < $test > $test.$i.cipher | ||
12 | ../apps/ssleay $i -d -k test < $test.$i.cipher >$test.$i.clear | ||
13 | cmp $test $test.$i.clear | ||
14 | if [ $? != 0 ] | ||
15 | then | ||
16 | exit 1 | ||
17 | else | ||
18 | /bin/rm $test.$i.cipher $test.$i.clear | ||
19 | fi | ||
20 | |||
21 | echo $i base64 | ||
22 | ../apps/ssleay $i -a -e -k test < $test > $test.$i.cipher | ||
23 | ../apps/ssleay $i -a -d -k test < $test.$i.cipher >$test.$i.clear | ||
24 | cmp $test $test.$i.clear | ||
25 | if [ $? != 0 ] | ||
26 | then | ||
27 | exit 1 | ||
28 | else | ||
29 | /bin/rm $test.$i.cipher $test.$i.clear | ||
30 | fi | ||
31 | done | ||
diff --git a/src/lib/libssl/test/testca b/src/lib/libssl/test/testca index a28402f9ca..88c186b6ab 100644 --- a/src/lib/libssl/test/testca +++ b/src/lib/libssl/test/testca | |||
@@ -23,7 +23,7 @@ if [ $? != 0 ]; then | |||
23 | fi | 23 | fi |
24 | 24 | ||
25 | 25 | ||
26 | SSLEAY_CONFIG="-config ../apps/ssleay.cnf" | 26 | SSLEAY_CONFIG="-config ../apps/openssl.cnf" |
27 | export SSLEAY_CONFIG | 27 | export SSLEAY_CONFIG |
28 | $SH ../apps/CA.sh -sign <<EOF | 28 | $SH ../apps/CA.sh -sign <<EOF |
29 | y | 29 | y |
diff --git a/src/lib/libssl/test/testca.com b/src/lib/libssl/test/testca.com new file mode 100644 index 0000000000..ea75479cd5 --- /dev/null +++ b/src/lib/libssl/test/testca.com | |||
@@ -0,0 +1,76 @@ | |||
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;*,newcert.pem;*,newreq.pem;* | ||
44 | $ set on | ||
45 | $! #usage: CA -newcert|-newreq|-newca|-sign|-verify | ||
46 | $ | ||
47 | $ exit | ||
48 | $ | ||
49 | $ deltree: subroutine ! P1 is a name of a directory | ||
50 | $ on control_y then goto dt_STOP | ||
51 | $ on warning then goto dt_exit | ||
52 | $ _dt_def = f$trnlnm("SYS$DISK")+f$directory() | ||
53 | $ if f$parse(p1) .eqs. "" then exit | ||
54 | $ set default 'f$parse(p1,,,"DEVICE")''f$parse(p1,,,"DIRECTORY")' | ||
55 | $ p1 = f$parse(p1,,,"NAME") + f$parse(p1,,,"TYPE") | ||
56 | $ _fp = f$parse(".DIR",p1) | ||
57 | $ dt_loop: | ||
58 | $ _f = f$search(_fp) | ||
59 | $ if _f .eqs. "" then goto dt_loopend | ||
60 | $ call deltree [.'f$parse(_f,,,"NAME")']*.* | ||
61 | $ goto dt_loop | ||
62 | $ dt_loopend: | ||
63 | $ _fp = f$parse(p1,".;*") | ||
64 | $ if f$search(_fp) .eqs. "" then goto dt_exit | ||
65 | $ set noon | ||
66 | $ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) '_fp' | ||
67 | $ set on | ||
68 | $ delete/nolog '_fp' | ||
69 | $ dt_exit: | ||
70 | $ set default '_dt_def' | ||
71 | $ exit | ||
72 | $ dt_STOP: | ||
73 | $ set default '_dt_def' | ||
74 | $ stop/id="" | ||
75 | $ exit | ||
76 | $ endsubroutine | ||
diff --git a/src/lib/libssl/test/testenc b/src/lib/libssl/test/testenc index 42db56c2be..0656c7f525 100644 --- a/src/lib/libssl/test/testenc +++ b/src/lib/libssl/test/testenc | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | testsrc=Makefile.ssl | 3 | testsrc=Makefile.ssl |
4 | test=./p | 4 | test=./p |
5 | cmd=../apps/ssleay | 5 | cmd=../apps/openssl |
6 | 6 | ||
7 | cat $testsrc >$test; | 7 | cat $testsrc >$test; |
8 | 8 | ||
@@ -27,15 +27,7 @@ else | |||
27 | /bin/rm $test.cipher $test.clear | 27 | /bin/rm $test.cipher $test.clear |
28 | fi | 28 | fi |
29 | 29 | ||
30 | for i in rc4 \ | 30 | for i in `$cmd list-cipher-commands` |
31 | des-cfb des-ede-cfb des-ede3-cfb \ | ||
32 | des-ofb des-ede-ofb des-ede3-ofb \ | ||
33 | des-ecb des-ede des-ede3 desx \ | ||
34 | des-cbc des-ede-cbc des-ede3-cbc \ | ||
35 | idea-ecb idea-cfb idea-ofb idea-cbc \ | ||
36 | rc2-ecb rc2-cfb rc2-ofb rc2-cbc \ | ||
37 | bf-ecb bf-cfb bf-ofb bf-cbc rc4 \ | ||
38 | cast5-ecb cast5-cfb cast5-ofb cast5-cbc | ||
39 | do | 31 | do |
40 | echo $i | 32 | echo $i |
41 | $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher | 33 | $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher |
diff --git a/src/lib/libssl/test/testenc.com b/src/lib/libssl/test/testenc.com new file mode 100644 index 0000000000..0756e8bada --- /dev/null +++ b/src/lib/libssl/test/testenc.com | |||
@@ -0,0 +1,50 @@ | |||
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 | $ copy 'testsrc' 'test' | ||
12 | $ | ||
13 | $ write sys$output "cat" | ||
14 | $ 'cmd' enc -in 'test' -out 'test'-cipher | ||
15 | $ 'cmd' enc -in 'test'-cipher -out 'test'-clear | ||
16 | $ difference/output=nl: 'test' 'test'-clear | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $ delete 'test'-cipher;*,'test'-clear;* | ||
19 | $ | ||
20 | $ write sys$output "base64" | ||
21 | $ 'cmd' enc -a -e -in 'test' -out 'test'-cipher | ||
22 | $ 'cmd' enc -a -d -in 'test'-cipher -out 'test'-clear | ||
23 | $ difference/output=nl: 'test' 'test'-clear | ||
24 | $ if $severity .ne. 1 then exit 3 | ||
25 | $ delete 'test'-cipher;*,'test'-clear;* | ||
26 | $ | ||
27 | $ define/user sys$output 'test'-cipher-commands | ||
28 | $ 'cmd' list-cipher-commands | ||
29 | $ open/read f 'test'-cipher-commands | ||
30 | $ loop_cipher_commands: | ||
31 | $ read/end=loop_cipher_commands_end f i | ||
32 | $ write sys$output i | ||
33 | $ 'cmd' 'i' -bufsize 113 -e -k test -in 'test' -out 'test'-'i'-cipher | ||
34 | $ 'cmd' 'i' -bufsize 157 -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear | ||
35 | $ difference/output=nl: 'test' 'test'-'i'-clear | ||
36 | $ if $severity .ne. 1 then exit 3 | ||
37 | $ delete 'test'-'i'-cipher;*,'test'-'i'-clear;* | ||
38 | $ | ||
39 | $ write sys$output i," base64" | ||
40 | $ 'cmd' 'i' -bufsize 113 -a -e -k test -in 'test' -out 'test'-'i'-cipher | ||
41 | $ 'cmd' 'i' -bufsize 157 -a -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear | ||
42 | $ difference/output=nl: 'test' 'test'-'i'-clear | ||
43 | $ if $severity .ne. 1 then exit 3 | ||
44 | $ delete 'test'-'i'-cipher;*,'test'-'i'-clear;* | ||
45 | $ | ||
46 | $ goto loop_cipher_commands | ||
47 | $ loop_cipher_commands_end: | ||
48 | $ close f | ||
49 | $ delete 'test'-cipher-commands;* | ||
50 | $ delete 'test';* | ||
diff --git a/src/lib/libssl/test/testgen b/src/lib/libssl/test/testgen index 12a4ca4cea..3534f5821f 100644 --- a/src/lib/libssl/test/testgen +++ b/src/lib/libssl/test/testgen | |||
@@ -15,13 +15,13 @@ echo "There should be a 2 sequences of .'s and some +'s." | |||
15 | echo "There should not be more that at most 80 per line" | 15 | echo "There should not be more that at most 80 per line" |
16 | echo "This could take some time." | 16 | echo "This could take some time." |
17 | 17 | ||
18 | ../apps/ssleay req -config test.cnf -new -out testreq.pem | 18 | ../apps/openssl req -config test.cnf -new -out testreq.pem |
19 | if [ $? != 0 ]; then | 19 | if [ $? != 0 ]; then |
20 | echo problems creating request | 20 | echo problems creating request |
21 | exit 1 | 21 | exit 1 |
22 | fi | 22 | fi |
23 | 23 | ||
24 | ../apps/ssleay req -verify -in testreq.pem -noout | 24 | ../apps/openssl req -config test.cnf -verify -in testreq.pem -noout |
25 | if [ $? != 0 ]; then | 25 | if [ $? != 0 ]; then |
26 | echo signature on req is wrong | 26 | echo signature on req is wrong |
27 | exit 1 | 27 | exit 1 |
diff --git a/src/lib/libssl/test/testgen.com b/src/lib/libssl/test/testgen.com new file mode 100644 index 0000000000..ec302f524a --- /dev/null +++ b/src/lib/libssl/test/testgen.com | |||
@@ -0,0 +1,35 @@ | |||
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 | $ write sys$output "There should be a 2 sequences of .'s and some +'s." | ||
20 | $ write sys$output "There should not be more that at most 80 per line" | ||
21 | $ write sys$output "This could take some time." | ||
22 | $ | ||
23 | $ mcr 'exe_dir'openssl req -config test.cnf -new -out testreq.pem | ||
24 | $ if $severity .ne. 1 | ||
25 | $ then | ||
26 | $ write sys$output "problems creating request" | ||
27 | $ exit 3 | ||
28 | $ endif | ||
29 | $ | ||
30 | $ mcr 'exe_dir'openssl req -verify -in testreq.pem -noout | ||
31 | $ if $severity .ne. 1 | ||
32 | $ then | ||
33 | $ write sys$output "signature on req is wrong" | ||
34 | $ exit 3 | ||
35 | $ endif | ||
diff --git a/src/lib/libssl/test/testkey.pem b/src/lib/libssl/test/testkey.pem deleted file mode 100644 index edd5a5773f..0000000000 --- a/src/lib/libssl/test/testkey.pem +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | -----BEGIN RSA PRIVATE KEY----- | ||
2 | -----END RSA PRIVATE KEY----- | ||
diff --git a/src/lib/libssl/test/testp7.pem b/src/lib/libssl/test/testp7.pem index b3b6dba830..6bba16f137 100644 --- a/src/lib/libssl/test/testp7.pem +++ b/src/lib/libssl/test/testp7.pem | |||
@@ -33,14 +33,14 @@ AQEFAANLADBIAkEA7Fc6zYJw4WwCWa1ni3fYNbzGSQNluuw990024GusjLfhEk1h | |||
33 | MsIUukTT/n8yxoO7rYp4x+LS+tHF2tBtuxg7CwIDAQABoyIwIDALBgNVHQ8EBAMC | 33 | MsIUukTT/n8yxoO7rYp4x+LS+tHF2tBtuxg7CwIDAQABoyIwIDALBgNVHQ8EBAMC |
34 | AQYwEQYJYIZIAYb4QgEBBAQDAgIEMA0GCSqGSIb3DQEBAgUAA0EAFKem0cJGg9nd | 34 | AQYwEQYJYIZIAYb4QgEBBAQDAgIEMA0GCSqGSIb3DQEBAgUAA0EAFKem0cJGg9nd |
35 | TAbP5o1HIEyNn11ZlvLU5v1Hejs1MKQt72IMm4jjgOH+pjguXW8lB6yzrK4oVOO2 | 35 | TAbP5o1HIEyNn11ZlvLU5v1Hejs1MKQt72IMm4jjgOH+pjguXW8lB6yzrK4oVOO2 |
36 | UNCaNQ1H26GCAa0wgeYwgZEwDQYJKoZIhvcNAQECBQAwYjERMA8GA1UEBxMISW50 | 36 | UNCaNQ1H26GCAa0wgcEwbTANBgkqhkiG9w0BAQIFADA+MQswCQYDVQQGEwJVUzEX |
37 | ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJpU2ln | 37 | MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xFjAUBgNVBAsTDVRFU1QgUm9vdCBQQ0EX |
38 | biBDbGFzcyAxIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyFw05NjA3MTcxNzU5 | 38 | DTk2MDcxNzE3NDQwOVoXDTk4MDcxNzAwMDAwMFowDQYJKoZIhvcNAQECBQADQQB4 |
39 | MjlaFw05NzA3MTgwMDAwMDBaMA0GCSqGSIb3DQEBAgUAA0EAubVWYTsWsQmste9f | 39 | rQNP8QLpAox83odQDE/5dqAuvDfshW/miTxwQTMXOoBtjGiowTcG+YXF1JZTJRMT |
40 | +UgMw8BkjDlM25fwQLrCfmmnLxjewey10kSROypUaJLb+r4oRALc0fG9XfZsaiiI | 40 | jQN47tdH+6MCKt7N8MddMIHmMIGRMA0GCSqGSIb3DQEBAgUAMGIxETAPBgNVBAcT |
41 | gotQHjCBwTBtMA0GCSqGSIb3DQEBAgUAMD4xCzAJBgNVBAYTAlVTMRcwFQYDVQQK | 41 | CEludGVybmV0MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVy |
42 | Ew5WZXJpU2lnbiwgSW5jLjEWMBQGA1UECxMNVEVTVCBSb290IFBDQRcNOTYwNzE3 | 42 | aVNpZ24gQ2xhc3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlchcNOTYwNzE3 |
43 | MTc0NDA5WhcNOTgwNzE3MDAwMDAwWjANBgkqhkiG9w0BAQIFAANBAHitA0/xAukC | 43 | MTc1OTI5WhcNOTcwNzE4MDAwMDAwWjANBgkqhkiG9w0BAQIFAANBALm1VmE7FrEJ |
44 | jHzeh1AMT/l2oC68N+yFb+aJPHBBMxc6gG2MaKjBNwb5hcXUllMlExONA3ju10f7 | 44 | rLXvX/lIDMPAZIw5TNuX8EC6wn5ppy8Y3sHstdJEkTsqVGiS2/q+KEQC3NHxvV32 |
45 | owIq3s3wx10xAAAAAAA= | 45 | bGooiIKLUB4xAAAAAAA= |
46 | -----END PKCS7----- | 46 | -----END PKCS7----- |
diff --git a/src/lib/libssl/test/testreq.pem b/src/lib/libssl/test/testreq.pem deleted file mode 100644 index 1311fa7785..0000000000 --- a/src/lib/libssl/test/testreq.pem +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | -----BEGIN CERTIFICATE REQUEST----- | ||
2 | MIIBQjCB7QIBADCBhzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQx | ||
3 | ETAPBgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdFNvZnQgUHR5IEx0ZDET | ||
4 | MBEGA1UEAxMKRXJpYyBZb3VuZzEfMB0GCSqGSIb3DQEJARYQZWF5QG1pbmNvbS5v | ||
5 | ei5hdTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDVKdT5QB2ZojtNQGjA/9J7s2o4 | ||
6 | RNkuSq8l377uWLAyMljtdkcoRsvUy5lZ997UDHFTbVFA038ZBrmw7l5EyHeXAgMB | ||
7 | AAGgADANBgkqhkiG9w0BAQQFAANBAKnaFr4u7PTdfmpjiX/H8Ho4UWGVRWUlvD2R | ||
8 | /D9yoTj7TN3uODx2BD0drErVBe/Zjv81vhH6Yo3cJO/hRS3A7jw= | ||
9 | -----END CERTIFICATE REQUEST----- | ||
diff --git a/src/lib/libssl/test/tests.com b/src/lib/libssl/test/tests.com new file mode 100644 index 0000000000..147b8aa838 --- /dev/null +++ b/src/lib/libssl/test/tests.com | |||
@@ -0,0 +1,203 @@ | |||
1 | $! TESTS.COM -- Performs the necessary tests | ||
2 | $! | ||
3 | $! P1 tests to be performed. Empty means all. | ||
4 | $ | ||
5 | $ __proc = f$element(0,";",f$environment("procedure")) | ||
6 | $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;" | ||
7 | $ __save_default = f$environment("default") | ||
8 | $ __arch := VAX | ||
9 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
10 | $ texe_dir := sys$disk:[-.'__arch'.exe.test] | ||
11 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | ||
12 | $ | ||
13 | $ set default '__here' | ||
14 | $ on control_y then goto exit | ||
15 | $ on error then goto exit | ||
16 | $ | ||
17 | $ if p1 .nes. "" | ||
18 | $ then | ||
19 | $ tests = p1 | ||
20 | $ else | ||
21 | $ tests := - | ||
22 | test_des,test_idea,test_sha,test_md5,test_hmac,test_md2,test_mdc2,- | ||
23 | test_rc2,test_rc4,test_rc5,test_bf,test_cast,- | ||
24 | test_rand,test_bn,test_enc,test_x509,test_rsa,test_crl,test_sid,- | ||
25 | test_reqgen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- | ||
26 | test_ss,test_ssl,test_ca | ||
27 | $ endif | ||
28 | $ tests = f$edit(tests,"COLLAPSE") | ||
29 | $ | ||
30 | $ BNTEST := bntest | ||
31 | $ EXPTEST := exptest | ||
32 | $ IDEATEST := ideatest | ||
33 | $ SHATEST := shatest | ||
34 | $ SHA1TEST := sha1test | ||
35 | $ MDC2TEST := mdc2test | ||
36 | $ RMDTEST := rmdtest | ||
37 | $ MD2TEST := md2test | ||
38 | $ MD5TEST := md5test | ||
39 | $ HMACTEST := hmactest | ||
40 | $ RC2TEST := rc2test | ||
41 | $ RC4TEST := rc4test | ||
42 | $ RC5TEST := rc5test | ||
43 | $ BFTEST := bftest | ||
44 | $ CASTTEST := casttest | ||
45 | $ DESTEST := destest | ||
46 | $ RANDTEST := randtest | ||
47 | $ DHTEST := dhtest | ||
48 | $ DSATEST := dsatest | ||
49 | $ METHTEST := methtest | ||
50 | $ SSLTEST := ssltest | ||
51 | $ RSATEST := rsa_oaep_test | ||
52 | $ | ||
53 | $ tests_i = 0 | ||
54 | $ loop_tests: | ||
55 | $ tests_e = f$element(tests_i,",",tests) | ||
56 | $ tests_i = tests_i + 1 | ||
57 | $ if tests_e .eqs. "," then goto exit | ||
58 | $ goto 'tests_e' | ||
59 | $ | ||
60 | $ test_des: | ||
61 | $ mcr 'texe_dir''destest' | ||
62 | $ goto loop_tests | ||
63 | $ test_idea: | ||
64 | $ mcr 'texe_dir''ideatest' | ||
65 | $ goto loop_tests | ||
66 | $ test_sha: | ||
67 | $ mcr 'texe_dir''shatest' | ||
68 | $ mcr 'texe_dir''sha1test' | ||
69 | $ goto loop_tests | ||
70 | $ test_mdc2: | ||
71 | $ mcr 'texe_dir''mdc2test' | ||
72 | $ goto loop_tests | ||
73 | $ test_md5: | ||
74 | $ mcr 'texe_dir''md5test' | ||
75 | $ goto loop_tests | ||
76 | $ test_hmac: | ||
77 | $ mcr 'texe_dir''hmactest' | ||
78 | $ goto loop_tests | ||
79 | $ test_md2: | ||
80 | $ mcr 'texe_dir''md2test' | ||
81 | $ goto loop_tests | ||
82 | $ test_rmd: | ||
83 | $ mcr 'texe_dir''rmdtest' | ||
84 | $ goto loop_tests | ||
85 | $ test_bf: | ||
86 | $ mcr 'texe_dir''bftest' | ||
87 | $ goto loop_tests | ||
88 | $ test_cast: | ||
89 | $ mcr 'texe_dir''casttest' | ||
90 | $ goto loop_tests | ||
91 | $ test_rc2: | ||
92 | $ mcr 'texe_dir''rc2test' | ||
93 | $ goto loop_tests | ||
94 | $ test_rc4: | ||
95 | $ mcr 'texe_dir''rc4test' | ||
96 | $ goto loop_tests | ||
97 | $ test_rc5: | ||
98 | $ mcr 'texe_dir''rc5test' | ||
99 | $ goto loop_tests | ||
100 | $ test_rand: | ||
101 | $ mcr 'texe_dir''randtest' | ||
102 | $ goto loop_tests | ||
103 | $ test_enc: | ||
104 | $ @testenc.com | ||
105 | $ goto loop_tests | ||
106 | $ test_x509: | ||
107 | $ define sys$error nla0: | ||
108 | $ write sys$output "test normal x509v1 certificate" | ||
109 | $ @tx509.com | ||
110 | $ write sys$output "test first x509v3 certificate" | ||
111 | $ @tx509.com v3-cert1.pem | ||
112 | $ write sys$output "test second x509v3 certificate" | ||
113 | $ @tx509.com v3-cert2.pem | ||
114 | $ deassign sys$error | ||
115 | $ goto loop_tests | ||
116 | $ test_rsa: | ||
117 | $ define sys$error nla0: | ||
118 | $ @trsa.com | ||
119 | $ deassign sys$error | ||
120 | $ mcr 'texe_dir''rsatest' | ||
121 | $ goto loop_tests | ||
122 | $ test_crl: | ||
123 | $ define sys$error nla0: | ||
124 | $ @tcrl.com | ||
125 | $ deassign sys$error | ||
126 | $ goto loop_tests | ||
127 | $ test_sid: | ||
128 | $ define sys$error nla0: | ||
129 | $ @tsid.com | ||
130 | $ deassign sys$error | ||
131 | $ goto loop_tests | ||
132 | $ test_req: | ||
133 | $ define sys$error nla0: | ||
134 | $ @treq.com | ||
135 | $ @treq.com testreq2.pem | ||
136 | $ deassign sys$error | ||
137 | $ goto loop_tests | ||
138 | $ test_pkcs7: | ||
139 | $ define sys$error nla0: | ||
140 | $ @tpkcs7.com | ||
141 | $ @tpkcs7d.com | ||
142 | $ deassign sys$error | ||
143 | $ goto loop_tests | ||
144 | $ test_bn: | ||
145 | $ write sys$output "starting big number library test, could take a while..." | ||
146 | $ create bntest-vms.fdl | ||
147 | FILE | ||
148 | ORGANIZATION sequential | ||
149 | RECORD | ||
150 | FORMAT stream_lf | ||
151 | $ create/fdl=bntest-vms.fdl bntest-vms.sh | ||
152 | $ open/append foo bntest-vms.sh | ||
153 | $ type/output=foo: sys$input: | ||
154 | << __FOO__ bc | awk '{ \ | ||
155 | if ($$0 != "0") {print "error"; exit(1); } \ | ||
156 | if (((NR+1)%64) == 0) print NR+1," tests done"; }' | ||
157 | $ define/user sys$output bntest-vms.tmp | ||
158 | $ mcr 'texe_dir''bntest' | ||
159 | $ copy bntest-vms.tmp foo: | ||
160 | $ delete bntest-vms.tmp;* | ||
161 | $ type/output=foo: sys$input: | ||
162 | __FOO__ | ||
163 | $ close foo | ||
164 | $ write sys$output "-- copy the [.test]bntest-vms.sh file to a Unix system and run it" | ||
165 | $ write sys$output "-- through sh or bash to verify that the bignum operations went well." | ||
166 | $ write sys$output "" | ||
167 | $ write sys$output "test a^b%c implementations" | ||
168 | $ mcr 'texe_dir''exptest' | ||
169 | $ goto loop_tests | ||
170 | $ test_verify: | ||
171 | $ write sys$output "The following command should have some OK's and some failures" | ||
172 | $ write sys$output "There are definitly a few expired certificates" | ||
173 | $ @tverify.com | ||
174 | $ goto loop_tests | ||
175 | $ test_dh: | ||
176 | $ write sys$output "Generate as set of DH parameters" | ||
177 | $ mcr 'texe_dir''dhtest' | ||
178 | $ goto loop_tests | ||
179 | $ test_dsa: | ||
180 | $ write sys$output "Generate as set of DSA parameters" | ||
181 | $ mcr 'texe_dir''dsatest' | ||
182 | $ goto loop_tests | ||
183 | $ test_reqgen: | ||
184 | $ write sys$output "Generate and verify a certificate request" | ||
185 | $ @testgen.com | ||
186 | $ goto loop_tests | ||
187 | $ test_ss: | ||
188 | $ write sys$output "Generate and certify a test certificate" | ||
189 | $ @testss.com | ||
190 | $ goto loop_tests | ||
191 | $ test_ssl: | ||
192 | $ write sys$output "test SSL protocol" | ||
193 | $ @testssl.com | ||
194 | $ goto loop_tests | ||
195 | $ test_ca: | ||
196 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | ||
197 | $ @testca.com | ||
198 | $ goto loop_tests | ||
199 | $ | ||
200 | $ | ||
201 | $ exit: | ||
202 | $ set default '__save_default' | ||
203 | $ exit | ||
diff --git a/src/lib/libssl/test/testsid.pem b/src/lib/libssl/test/testsid.pem index cd8617be2e..7ffd008f66 100644 --- a/src/lib/libssl/test/testsid.pem +++ b/src/lib/libssl/test/testsid.pem | |||
@@ -1,5 +1,5 @@ | |||
1 | -----BEGIN SSL SESSION PARAMETERS----- | 1 | -----BEGIN SSL SESSION PARAMETERS----- |
2 | MIIBxwIBAQIBAgQDAQCABBCi11xa5qkOP8xrr02K/NQCBBBkIYQZM0Bt95W0EHNV | 2 | MIIB1gIBAQIBAgQDAQCABBCi11xa5qkOP8xrr02K/NQCBBBkIYQZM0Bt95W0EHNV |
3 | bA58oQYCBDIBr7WiBAICASyjggGGMIIBgjCCASwCAQMwDQYJKoZIhvcNAQEEBQAw | 3 | bA58oQYCBDIBr7WiBAICASyjggGGMIIBgjCCASwCAQMwDQYJKoZIhvcNAQEEBQAw |
4 | ODELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3Jz | 4 | ODELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA1FMRDEbMBkGA1UEAxMSU1NMZWF5L3Jz |
5 | YSB0ZXN0IENBMB4XDTk1MTAwOTIzMzEzNFoXDTk4MDcwNTIzMzEzNFowYDELMAkG | 5 | YSB0ZXN0IENBMB4XDTk1MTAwOTIzMzEzNFoXDTk4MDcwNTIzMzEzNFowYDELMAkG |
@@ -8,5 +8,5 @@ LjELMAkGA1UECxMCQ1MxGzAZBgNVBAMTElNTTGVheSBkZW1vIGNsaWVudDBcMA0G | |||
8 | CSqGSIb3DQEBAQUAA0sAMEgCQQC4pcXEL1lgVA+B5Q3TcuW/O3LZHoA73IYm8oFD | 8 | CSqGSIb3DQEBAQUAA0sAMEgCQQC4pcXEL1lgVA+B5Q3TcuW/O3LZHoA73IYm8oFD |
9 | TezgCDhL2RTMn+seKWF36UtJKRIOBU9jZHCVVd0Me5ls6BEjAgMBAAEwDQYJKoZI | 9 | TezgCDhL2RTMn+seKWF36UtJKRIOBU9jZHCVVd0Me5ls6BEjAgMBAAEwDQYJKoZI |
10 | hvcNAQEEBQADQQBoIpOcwUY1qlVF7j3ROSGvUsbvByOBFmYWkIBgsCqR+9qo1A7L | 10 | hvcNAQEEBQADQQBoIpOcwUY1qlVF7j3ROSGvUsbvByOBFmYWkIBgsCqR+9qo1A7L |
11 | CrWF5i8LWt/vLwAHaxWNx2YuBJMFyuK81fTv | 11 | CrWF5i8LWt/vLwAHaxWNx2YuBJMFyuK81fTvpA0EC3Rlc3Rjb250ZXh0 |
12 | -----END SSL SESSION PARAMETERS----- | 12 | -----END SSL SESSION PARAMETERS----- |
diff --git a/src/lib/libssl/test/testss b/src/lib/libssl/test/testss index a5aecf4694..da62997a5f 100644 --- a/src/lib/libssl/test/testss +++ b/src/lib/libssl/test/testss | |||
@@ -1,9 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | digest='-mdc2' | 3 | digest='-mdc2' |
4 | reqcmd="../apps/ssleay req" | 4 | reqcmd="../apps/openssl req" |
5 | x509cmd="../apps/ssleay x509 $digest" | 5 | x509cmd="../apps/openssl x509 $digest" |
6 | verifycmd="../apps/ssleay verify" | 6 | verifycmd="../apps/openssl verify" |
7 | dummycnf="../apps/openssl.cnf" | ||
7 | 8 | ||
8 | CAkey="keyCA.ss" | 9 | CAkey="keyCA.ss" |
9 | CAcert="certCA.ss" | 10 | CAcert="certCA.ss" |
@@ -39,13 +40,13 @@ if [ $? != 0 ]; then | |||
39 | exit 1 | 40 | exit 1 |
40 | fi | 41 | fi |
41 | 42 | ||
42 | $reqcmd -verify -in $CAreq -noout | 43 | $reqcmd -config $dummycnf -verify -in $CAreq -noout |
43 | if [ $? != 0 ]; then | 44 | if [ $? != 0 ]; then |
44 | echo first generated request is invalid | 45 | echo first generated request is invalid |
45 | exit 1 | 46 | exit 1 |
46 | fi | 47 | fi |
47 | 48 | ||
48 | $reqcmd -verify -in $CAreq2 -noout | 49 | $reqcmd -config $dummycnf -verify -in $CAreq2 -noout |
49 | if [ $? != 0 ]; then | 50 | if [ $? != 0 ]; then |
50 | echo second generated request is invalid | 51 | echo second generated request is invalid |
51 | exit 1 | 52 | exit 1 |
diff --git a/src/lib/libssl/test/testss.com b/src/lib/libssl/test/testss.com new file mode 100644 index 0000000000..ce2c4b43f6 --- /dev/null +++ b/src/lib/libssl/test/testss.com | |||
@@ -0,0 +1,105 @@ | |||
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="-mdc2" | ||
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 | $ 'reqcmd' -config 'CAconf' -out 'CAreq' -keyout 'CAkey' -new ! -out err.ss | ||
27 | $ if $severity .ne. 1 | ||
28 | $ then | ||
29 | $ write sys$output "error using 'req' to generate a certificate request" | ||
30 | $ exit 3 | ||
31 | $ endif | ||
32 | $ write sys$output "" | ||
33 | $ write sys$output "convert the certificate request into a self signed certificate using 'x509'" | ||
34 | $ define /user sys$output err.ss | ||
35 | $ 'x509cmd' "-CAcreateserial" -in 'CAreq' -days 30 -req -out 'CAcert' -signkey 'CAkey' | ||
36 | $ if $severity .ne. 1 | ||
37 | $ then | ||
38 | $ write sys$output "error using 'x509' to self sign a certificate request" | ||
39 | $ exit 3 | ||
40 | $ endif | ||
41 | $ | ||
42 | $ write sys$output "" | ||
43 | $ write sys$output "convert a certificate into a certificate request using 'x509'" | ||
44 | $ define /user sys$output err.ss | ||
45 | $ 'x509cmd' -in 'CAcert' -x509toreq -signkey 'CAkey' -out 'CAreq2' | ||
46 | $ if $severity .ne. 1 | ||
47 | $ then | ||
48 | $ write sys$output "error using 'x509' convert a certificate to a certificate request" | ||
49 | $ exit 3 | ||
50 | $ endif | ||
51 | $ | ||
52 | $ 'reqcmd' -config 'dummycnf' -verify -in 'CAreq' -noout | ||
53 | $ if $severity .ne. 1 | ||
54 | $ then | ||
55 | $ write sys$output "first generated request is invalid" | ||
56 | $ exit 3 | ||
57 | $ endif | ||
58 | $ | ||
59 | $ 'reqcmd' -config 'dummycnf' -verify -in 'CAreq2' -noout | ||
60 | $ if $severity .ne. 1 | ||
61 | $ then | ||
62 | $ write sys$output "second generated request is invalid" | ||
63 | $ exit 3 | ||
64 | $ endif | ||
65 | $ | ||
66 | $ 'verifycmd' "-CAfile" 'CAcert' 'CAcert' | ||
67 | $ if $severity .ne. 1 | ||
68 | $ then | ||
69 | $ write sys$output "first generated cert is invalid" | ||
70 | $ exit 3 | ||
71 | $ endif | ||
72 | $ | ||
73 | $ write sys$output "" | ||
74 | $ write sys$output "make another certificate request using 'req'" | ||
75 | $ define /user sys$output err.ss | ||
76 | $ 'reqcmd' -config 'Uconf' -out 'Ureq' -keyout 'Ukey' -new | ||
77 | $ if $severity .ne. 1 | ||
78 | $ then | ||
79 | $ write sys$output "error using 'req' to generate a certificate request" | ||
80 | $ exit 3 | ||
81 | $ endif | ||
82 | $ | ||
83 | $ write sys$output "" | ||
84 | $ write sys$output "sign certificate request with the just created CA via 'x509'" | ||
85 | $ define /user sys$output err.ss | ||
86 | $ 'x509cmd' "-CAcreateserial" -in 'Ureq' -days 30 -req -out 'Ucert' "-CA" 'CAcert' "-CAkey" 'CAkey' | ||
87 | $ if $severity .ne. 1 | ||
88 | $ then | ||
89 | $ write sys$output "error using 'x509' to sign a certificate request" | ||
90 | $ exit 3 | ||
91 | $ endif | ||
92 | $ | ||
93 | $ 'verifycmd' "-CAfile" 'CAcert' 'Ucert' | ||
94 | $ write sys$output "" | ||
95 | $ write sys$output "Certificate details" | ||
96 | $ 'x509cmd' -subject -issuer -startdate -enddate -noout -in 'Ucert' | ||
97 | $ | ||
98 | $ write sys$output "" | ||
99 | $ write sys$output "The generated CA certificate is ",CAcert | ||
100 | $ write sys$output "The generated CA private key is ",CAkey | ||
101 | $ | ||
102 | $ write sys$output "The generated user certificate is ",Ucert | ||
103 | $ write sys$output "The generated user private key is ",Ukey | ||
104 | $ | ||
105 | $ if f$search("err.ss;*") .nes. "" then delete err.ss;* | ||
diff --git a/src/lib/libssl/test/testssl b/src/lib/libssl/test/testssl index f115adb8e1..255ae5e976 100644 --- a/src/lib/libssl/test/testssl +++ b/src/lib/libssl/test/testssl | |||
@@ -36,5 +36,40 @@ echo test sslv2/sslv3 with client authentication | |||
36 | echo test sslv2/sslv3 with both client and server authentication | 36 | echo test sslv2/sslv3 with both client and server authentication |
37 | ./ssltest -server_auth -client_auth -CApath ../certs || exit 1 | 37 | ./ssltest -server_auth -client_auth -CApath ../certs || exit 1 |
38 | 38 | ||
39 | exit 0 | 39 | echo test sslv2 via BIO pair |
40 | ./ssltest -bio_pair -ssl2 || exit 1 | ||
41 | |||
42 | echo test sslv2 with server authentication via BIO pair | ||
43 | ./ssltest -bio_pair -ssl2 -server_auth -CApath ../certs || exit 1 | ||
44 | |||
45 | echo test sslv2 with client authentication via BIO pair | ||
46 | ./ssltest -bio_pair -ssl2 -client_auth -CApath ../certs || exit 1 | ||
47 | |||
48 | echo test sslv2 with both client and server authentication via BIO pair | ||
49 | ./ssltest -bio_pair -ssl2 -server_auth -client_auth -CApath ../certs || exit 1 | ||
50 | |||
51 | echo test sslv3 via BIO pair | ||
52 | ./ssltest -bio_pair -ssl3 || exit 1 | ||
53 | |||
54 | echo test sslv3 with server authentication via BIO pair | ||
55 | ./ssltest -bio_pair -ssl3 -server_auth -CApath ../certs || exit 1 | ||
56 | |||
57 | echo test sslv3 with client authentication via BIO pair | ||
58 | ./ssltest -bio_pair -ssl3 -client_auth -CApath ../certs || exit 1 | ||
59 | |||
60 | echo test sslv3 with both client and server authentication via BIO pair | ||
61 | ./ssltest -bio_pair -ssl3 -server_auth -client_auth -CApath ../certs || exit 1 | ||
40 | 62 | ||
63 | echo test sslv2/sslv3 via BIO pair | ||
64 | ./ssltest || exit 1 | ||
65 | |||
66 | echo test sslv2/sslv3 with server authentication | ||
67 | ./ssltest -bio_pair -server_auth -CApath ../certs || exit 1 | ||
68 | |||
69 | echo test sslv2/sslv3 with client authentication via BIO pair | ||
70 | ./ssltest -bio_pair -client_auth -CApath ../certs || exit 1 | ||
71 | |||
72 | echo test sslv2/sslv3 with both client and server authentication via BIO pair | ||
73 | ./ssltest -bio_pair -server_auth -client_auth -CApath ../certs || exit 1 | ||
74 | |||
75 | exit 0 | ||
diff --git a/src/lib/libssl/test/testssl.com b/src/lib/libssl/test/testssl.com new file mode 100644 index 0000000000..93a9aef802 --- /dev/null +++ b/src/lib/libssl/test/testssl.com | |||
@@ -0,0 +1,111 @@ | |||
1 | $! TESTSSL.COM | ||
2 | $ | ||
3 | $ __arch := VAX | ||
4 | $ if f$getsyi("cpu") .ge. 128 then __arch := AXP | ||
5 | $ exe_dir := sys$disk:[-.'__arch'.exe.test] | ||
6 | $ | ||
7 | $ copy/concatenate [-.certs]*.pem certs.tmp | ||
8 | $ | ||
9 | $ write sys$output "test sslv2" | ||
10 | $ mcr 'exe_dir'ssltest -ssl2 | ||
11 | $ if $severity .ne. 1 then goto exit3 | ||
12 | $ | ||
13 | $ write sys$output "test sslv2 with server authentication" | ||
14 | $ mcr 'exe_dir'ssltest -ssl2 -server_auth "-CAfile" certs.tmp | ||
15 | $ if $severity .ne. 1 then goto exit3 | ||
16 | $ | ||
17 | $ write sys$output "test sslv2 with client authentication" | ||
18 | $ mcr 'exe_dir'ssltest -ssl2 -client_auth "-CAfile" certs.tmp | ||
19 | $ if $severity .ne. 1 then goto exit3 | ||
20 | $ | ||
21 | $ write sys$output "test sslv2 with both client and server authentication" | ||
22 | $ mcr 'exe_dir'ssltest -ssl2 -server_auth -client_auth "-CAfile" certs.tmp | ||
23 | $ if $severity .ne. 1 then goto exit3 | ||
24 | $ | ||
25 | $ write sys$output "test sslv3" | ||
26 | $ mcr 'exe_dir'ssltest -ssl3 | ||
27 | $ if $severity .ne. 1 then goto exit3 | ||
28 | $ | ||
29 | $ write sys$output "test sslv3 with server authentication" | ||
30 | $ mcr 'exe_dir'ssltest -ssl3 -server_auth "-CAfile" certs.tmp | ||
31 | $ if $severity .ne. 1 then goto exit3 | ||
32 | $ | ||
33 | $ write sys$output "test sslv3 with client authentication" | ||
34 | $ mcr 'exe_dir'ssltest -ssl3 -client_auth "-CAfile" certs.tmp | ||
35 | $ if $severity .ne. 1 then goto exit3 | ||
36 | $ | ||
37 | $ write sys$output "test sslv3 with both client and server authentication" | ||
38 | $ mcr 'exe_dir'ssltest -ssl3 -server_auth -client_auth "-CAfile" certs.tmp | ||
39 | $ if $severity .ne. 1 then goto exit3 | ||
40 | $ | ||
41 | $ write sys$output "test sslv2/sslv3" | ||
42 | $ mcr 'exe_dir'ssltest | ||
43 | $ if $severity .ne. 1 then goto exit3 | ||
44 | $ | ||
45 | $ write sys$output "test sslv2/sslv3 with server authentication" | ||
46 | $ mcr 'exe_dir'ssltest -server_auth "-CAfile" certs.tmp | ||
47 | $ if $severity .ne. 1 then goto exit3 | ||
48 | $ | ||
49 | $ write sys$output "test sslv2/sslv3 with client authentication" | ||
50 | $ mcr 'exe_dir'ssltest -client_auth "-CAfile" certs.tmp | ||
51 | $ if $severity .ne. 1 then goto exit3 | ||
52 | $ | ||
53 | $ write sys$output "test sslv2/sslv3 with both client and server authentication" | ||
54 | $ mcr 'exe_dir'ssltest -server_auth -client_auth "-CAfile" certs.tmp | ||
55 | $ if $severity .ne. 1 then goto exit3 | ||
56 | $ | ||
57 | $ write sys$output "test sslv2 via BIO pair" | ||
58 | $ mcr 'exe_dir'ssltest -bio_pair -ssl2 | ||
59 | $ if $severity .ne. 1 then goto exit3 | ||
60 | $ | ||
61 | $ write sys$output "test sslv2 with server authentication via BIO pair" | ||
62 | $ mcr 'exe_dir'ssltest -bio_pair -ssl2 -server_auth "-CAfile" certs.tmp | ||
63 | $ if $severity .ne. 1 then goto exit3 | ||
64 | $ | ||
65 | $ write sys$output "test sslv2 with client authentication via BIO pair" | ||
66 | $ mcr 'exe_dir'ssltest -bio_pair -ssl2 -client_auth "-CAfile" certs.tmp | ||
67 | $ if $severity .ne. 1 then goto exit3 | ||
68 | $ | ||
69 | $ write sys$output "test sslv2 with both client and server authentication via BIO pair" | ||
70 | $ mcr 'exe_dir'ssltest -bio_pair -ssl2 -server_auth -client_auth "-CAfile" certs.tmp | ||
71 | $ if $severity .ne. 1 then goto exit3 | ||
72 | $ | ||
73 | $ write sys$output "test sslv3 via BIO pair" | ||
74 | $ mcr 'exe_dir'ssltest -bio_pair -ssl3 | ||
75 | $ if $severity .ne. 1 then goto exit3 | ||
76 | $ | ||
77 | $ write sys$output "test sslv3 with server authentication via BIO pair" | ||
78 | $ mcr 'exe_dir'ssltest -bio_pair -ssl3 -server_auth "-CAfile" certs.tmp | ||
79 | $ if $severity .ne. 1 then goto exit3 | ||
80 | $ | ||
81 | $ write sys$output "test sslv3 with client authentication via BIO pair" | ||
82 | $ mcr 'exe_dir'ssltest -bio_pair -ssl3 -client_auth "-CAfile" certs.tmp | ||
83 | $ if $severity .ne. 1 then goto exit3 | ||
84 | |||
85 | $ write sys$output "test sslv3 with both client and server authentication via BIO pair" | ||
86 | $ mcr 'exe_dir'ssltest -bio_pair -ssl3 -server_auth -client_auth "-CAfile" certs.tmp | ||
87 | $ if $severity .ne. 1 then goto exit3 | ||
88 | $ | ||
89 | $ write sys$output "test sslv2/sslv3 via BIO pair" | ||
90 | $ mcr 'exe_dir'ssltest | ||
91 | $ if $severity .ne. 1 then goto exit3 | ||
92 | $ | ||
93 | $ write sys$output "test sslv2/sslv3 with server authentication" | ||
94 | $ mcr 'exe_dir'ssltest -bio_pair -server_auth "-CAfile" certs.tmp | ||
95 | $ if $severity .ne. 1 then goto exit3 | ||
96 | $ | ||
97 | $ write sys$output "test sslv2/sslv3 with client authentication via BIO pair" | ||
98 | $ mcr 'exe_dir'ssltest -bio_pair -client_auth "-CAfile" certs.tmp | ||
99 | $ if $severity .ne. 1 then goto exit3 | ||
100 | $ | ||
101 | $ write sys$output "test sslv2/sslv3 with both client and server authentication via BIO pair" | ||
102 | $ mcr 'exe_dir'ssltest -bio_pair -server_auth -client_auth "-CAfile" certs.tmp | ||
103 | $ if $severity .ne. 1 then goto exit3 | ||
104 | $ | ||
105 | $ RET = 1 | ||
106 | $ goto exit | ||
107 | $ exit3: | ||
108 | $ RET = 3 | ||
109 | $ exit: | ||
110 | $ delete certs.tmp;* | ||
111 | $ exit 'RET' | ||
diff --git a/src/lib/libssl/test/tpkcs7 b/src/lib/libssl/test/tpkcs7 index ea1f005dac..15bbba42c0 100644 --- a/src/lib/libssl/test/tpkcs7 +++ b/src/lib/libssl/test/tpkcs7 | |||
@@ -3,7 +3,7 @@ | |||
3 | PATH=../apps:$PATH | 3 | PATH=../apps:$PATH |
4 | export PATH | 4 | export PATH |
5 | 5 | ||
6 | cmd='../apps/ssleay pkcs7' | 6 | cmd='../apps/openssl pkcs7' |
7 | 7 | ||
8 | if [ "$1"x != "x" ]; then | 8 | if [ "$1"x != "x" ]; then |
9 | t=$1 | 9 | t=$1 |
diff --git a/src/lib/libssl/test/tpkcs7.com b/src/lib/libssl/test/tpkcs7.com new file mode 100644 index 0000000000..5ed920ac34 --- /dev/null +++ b/src/lib/libssl/test/tpkcs7.com | |||
@@ -0,0 +1,49 @@ | |||
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 | $ copy 't' fff.p | ||
14 | $ | ||
15 | $ write sys$output "p -> d" | ||
16 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $ write sys$output "p -> p" | ||
19 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
20 | $ if $severity .ne. 1 then exit 3 | ||
21 | $ | ||
22 | $ write sys$output "d -> d" | ||
23 | $ 'cmd' -in f.d -inform d -outform d -out ff.d1 | ||
24 | $ if $severity .ne. 1 then exit 3 | ||
25 | $ write sys$output "p -> d" | ||
26 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
27 | $ if $severity .ne. 1 then exit 3 | ||
28 | $ | ||
29 | $ | ||
30 | $ write sys$output "d -> p" | ||
31 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
32 | $ if $severity .ne. 1 then exit 3 | ||
33 | $ write sys$output "p -> p" | ||
34 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
35 | $ if $severity .ne. 1 then exit 3 | ||
36 | $ | ||
37 | $ difference/output=nl: fff.p f.p | ||
38 | $ if $severity .ne. 1 then exit 3 | ||
39 | $ difference/output=nl: fff.p ff.p1 | ||
40 | $ if $severity .ne. 1 then exit 3 | ||
41 | $ difference/output=nl: fff.p ff.p3 | ||
42 | $ if $severity .ne. 1 then exit 3 | ||
43 | $ | ||
44 | $ difference/output=nl: f.p ff.p1 | ||
45 | $ if $severity .ne. 1 then exit 3 | ||
46 | $ difference/output=nl: f.p ff.p3 | ||
47 | $ if $severity .ne. 1 then exit 3 | ||
48 | $ | ||
49 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/tpkcs7d b/src/lib/libssl/test/tpkcs7d index c8f18fb09c..46e5aa2bd6 100644 --- a/src/lib/libssl/test/tpkcs7d +++ b/src/lib/libssl/test/tpkcs7d | |||
@@ -3,7 +3,7 @@ | |||
3 | PATH=../apps:$PATH | 3 | PATH=../apps:$PATH |
4 | export PATH | 4 | export PATH |
5 | 5 | ||
6 | cmd='../apps/ssleay pkcs7' | 6 | cmd='../apps/openssl pkcs7' |
7 | 7 | ||
8 | if [ "$1"x != "x" ]; then | 8 | if [ "$1"x != "x" ]; then |
9 | t=$1 | 9 | t=$1 |
@@ -11,7 +11,7 @@ else | |||
11 | t=pkcs7-1.pem | 11 | t=pkcs7-1.pem |
12 | fi | 12 | fi |
13 | 13 | ||
14 | echo testing pkcs7 conversions | 14 | echo "testing pkcs7 conversions (2)" |
15 | cp $t fff.p | 15 | cp $t fff.p |
16 | 16 | ||
17 | echo "p -> d" | 17 | echo "p -> d" |
diff --git a/src/lib/libssl/test/tpkcs7d.com b/src/lib/libssl/test/tpkcs7d.com new file mode 100644 index 0000000000..08d33eaa69 --- /dev/null +++ b/src/lib/libssl/test/tpkcs7d.com | |||
@@ -0,0 +1,42 @@ | |||
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 | $ copy 't' fff.p | ||
14 | $ | ||
15 | $ write sys$output "p -> d" | ||
16 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $ write sys$output "p -> p" | ||
19 | $ 'cmd' -in fff.p -inform p -outform p -out f.p | ||
20 | $ if $severity .ne. 1 then exit 3 | ||
21 | $ | ||
22 | $ write sys$output "d -> d" | ||
23 | $ 'cmd' -in f.d -inform d -outform d -out ff.d1 | ||
24 | $ if $severity .ne. 1 then exit 3 | ||
25 | $ write sys$output "p -> d" | ||
26 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
27 | $ if $severity .ne. 1 then exit 3 | ||
28 | $ | ||
29 | $ | ||
30 | $ write sys$output "d -> p" | ||
31 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
32 | $ if $severity .ne. 1 then exit 3 | ||
33 | $ write sys$output "p -> p" | ||
34 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
35 | $ if $severity .ne. 1 then exit 3 | ||
36 | $ | ||
37 | $ difference/output=nl: f.p ff.p1 | ||
38 | $ if $severity .ne. 1 then exit 3 | ||
39 | $ difference/output=nl: f.p ff.p3 | ||
40 | $ if $severity .ne. 1 then exit 3 | ||
41 | $ | ||
42 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/treq b/src/lib/libssl/test/treq index e5f1d8cc41..0464c9d902 100644 --- a/src/lib/libssl/test/treq +++ b/src/lib/libssl/test/treq | |||
@@ -3,7 +3,7 @@ | |||
3 | PATH=../apps:$PATH | 3 | PATH=../apps:$PATH |
4 | export PATH | 4 | export PATH |
5 | 5 | ||
6 | cmd='../apps/ssleay req' | 6 | cmd='../apps/openssl req -config ../apps/openssl.cnf' |
7 | 7 | ||
8 | if [ "$1"x != "x" ]; then | 8 | if [ "$1"x != "x" ]; then |
9 | t=$1 | 9 | t=$1 |
diff --git a/src/lib/libssl/test/treq.com b/src/lib/libssl/test/treq.com new file mode 100644 index 0000000000..9eb1d26f6e --- /dev/null +++ b/src/lib/libssl/test/treq.com | |||
@@ -0,0 +1,78 @@ | |||
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 | $ copy 't' fff.p | ||
14 | $ | ||
15 | $ write sys$output "p -> d" | ||
16 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $! write sys$output "p -> t" | ||
19 | $! 'cmd' -in fff.p -inform p -outform t -out f.t | ||
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' -verify -in f.d -inform d -outform d -out ff.d1 | ||
27 | $ if $severity .ne. 1 then exit 3 | ||
28 | $! write sys$output "t -> d" | ||
29 | $! 'cmd' -verify -in f.t -inform t -outform d -out ff.d2 | ||
30 | $! if $severity .ne. 1 then exit 3 | ||
31 | $ write sys$output "p -> d" | ||
32 | $ 'cmd' -verify -in f.p -inform p -outform d -out ff.d3 | ||
33 | $ if $severity .ne. 1 then exit 3 | ||
34 | $ | ||
35 | $! write sys$output "d -> t" | ||
36 | $! 'cmd' -in f.d -inform d -outform t -out ff.t1 | ||
37 | $! if $severity .ne. 1 then exit 3 | ||
38 | $! write sys$output "t -> t" | ||
39 | $! 'cmd' -in f.t -inform t -outform t -out ff.t2 | ||
40 | $! if $severity .ne. 1 then exit 3 | ||
41 | $! write sys$output "p -> t" | ||
42 | $! 'cmd' -in f.p -inform p -outform t -out ff.t3 | ||
43 | $! if $severity .ne. 1 then exit 3 | ||
44 | $ | ||
45 | $ write sys$output "d -> p" | ||
46 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
47 | $ if $severity .ne. 1 then exit 3 | ||
48 | $! write sys$output "t -> p" | ||
49 | $! 'cmd' -in f.t -inform t -outform p -out ff.p2 | ||
50 | $! if $severity .ne. 1 then exit 3 | ||
51 | $ write sys$output "p -> p" | ||
52 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
53 | $ if $severity .ne. 1 then exit 3 | ||
54 | $ | ||
55 | $ difference/output=nl: fff.p f.p | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ difference/output=nl: fff.p ff.p1 | ||
58 | $ if $severity .ne. 1 then exit 3 | ||
59 | $! difference/output=nl: fff.p ff.p2 | ||
60 | $! if $severity .ne. 1 then exit 3 | ||
61 | $ difference/output=nl: fff.p ff.p3 | ||
62 | $ if $severity .ne. 1 then exit 3 | ||
63 | $ | ||
64 | $! difference/output=nl: f.t ff.t1 | ||
65 | $! if $severity .ne. 1 then exit 3 | ||
66 | $! difference/output=nl: f.t ff.t2 | ||
67 | $! if $severity .ne. 1 then exit 3 | ||
68 | $! difference/output=nl: f.t ff.t3 | ||
69 | $! if $severity .ne. 1 then exit 3 | ||
70 | $ | ||
71 | $ difference/output=nl: f.p ff.p1 | ||
72 | $ if $severity .ne. 1 then exit 3 | ||
73 | $! difference/output=nl: f.p ff.p2 | ||
74 | $! if $severity .ne. 1 then exit 3 | ||
75 | $ difference/output=nl: f.p ff.p3 | ||
76 | $ if $severity .ne. 1 then exit 3 | ||
77 | $ | ||
78 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/trsa b/src/lib/libssl/test/trsa index e5b8fe0448..d6a4dd826d 100644 --- a/src/lib/libssl/test/trsa +++ b/src/lib/libssl/test/trsa | |||
@@ -3,7 +3,7 @@ | |||
3 | PATH=../apps:$PATH | 3 | PATH=../apps:$PATH |
4 | export PATH | 4 | export PATH |
5 | 5 | ||
6 | cmd='../apps/ssleay rsa' | 6 | cmd='../apps/openssl rsa' |
7 | 7 | ||
8 | if [ "$1"x != "x" ]; then | 8 | if [ "$1"x != "x" ]; then |
9 | t=$1 | 9 | t=$1 |
diff --git a/src/lib/libssl/test/trsa.com b/src/lib/libssl/test/trsa.com new file mode 100644 index 0000000000..9c9083d02b --- /dev/null +++ b/src/lib/libssl/test/trsa.com | |||
@@ -0,0 +1,78 @@ | |||
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 | $ cmd := mcr 'exe_dir'openssl rsa | ||
8 | $ | ||
9 | $ t := testrsa.pem | ||
10 | $ if p1 .nes. "" then t = p1 | ||
11 | $ | ||
12 | $ write sys$output "testing RSA conversions" | ||
13 | $ copy 't' fff.p | ||
14 | $ | ||
15 | $ write sys$output "p -> d" | ||
16 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $! write sys$output "p -> t" | ||
19 | $! 'cmd' -in fff.p -inform p -outform t -out f.t | ||
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 "t -> d" | ||
29 | $! 'cmd' -in f.t -inform t -outform d -out ff.d2 | ||
30 | $! if $severity .ne. 1 then exit 3 | ||
31 | $ write sys$output "p -> d" | ||
32 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
33 | $ if $severity .ne. 1 then exit 3 | ||
34 | $ | ||
35 | $! write sys$output "d -> t" | ||
36 | $! 'cmd' -in f.d -inform d -outform t -out ff.t1 | ||
37 | $! if $severity .ne. 1 then exit 3 | ||
38 | $! write sys$output "t -> t" | ||
39 | $! 'cmd' -in f.t -inform t -outform t -out ff.t2 | ||
40 | $! if $severity .ne. 1 then exit 3 | ||
41 | $! write sys$output "p -> t" | ||
42 | $! 'cmd' -in f.p -inform p -outform t -out ff.t3 | ||
43 | $! if $severity .ne. 1 then exit 3 | ||
44 | $ | ||
45 | $ write sys$output "d -> p" | ||
46 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
47 | $ if $severity .ne. 1 then exit 3 | ||
48 | $! write sys$output "t -> p" | ||
49 | $! 'cmd' -in f.t -inform t -outform p -out ff.p2 | ||
50 | $! if $severity .ne. 1 then exit 3 | ||
51 | $ write sys$output "p -> p" | ||
52 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
53 | $ if $severity .ne. 1 then exit 3 | ||
54 | $ | ||
55 | $ difference/output=nl: fff.p f.p | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ difference/output=nl: fff.p ff.p1 | ||
58 | $ if $severity .ne. 1 then exit 3 | ||
59 | $! difference/output=nl: fff.p ff.p2 | ||
60 | $! if $severity .ne. 1 then exit 3 | ||
61 | $ difference/output=nl: fff.p ff.p3 | ||
62 | $ if $severity .ne. 1 then exit 3 | ||
63 | $ | ||
64 | $! difference/output=nl: f.t ff.t1 | ||
65 | $! if $severity .ne. 1 then exit 3 | ||
66 | $! difference/output=nl: f.t ff.t2 | ||
67 | $! if $severity .ne. 1 then exit 3 | ||
68 | $! difference/output=nl: f.t ff.t3 | ||
69 | $! if $severity .ne. 1 then exit 3 | ||
70 | $ | ||
71 | $ difference/output=nl: f.p ff.p1 | ||
72 | $ if $severity .ne. 1 then exit 3 | ||
73 | $! difference/output=nl: f.p ff.p2 | ||
74 | $! if $severity .ne. 1 then exit 3 | ||
75 | $ difference/output=nl: f.p ff.p3 | ||
76 | $ if $severity .ne. 1 then exit 3 | ||
77 | $ | ||
78 | $ delete f.*;*,ff.*;*,fff.*;* | ||
diff --git a/src/lib/libssl/test/tsid b/src/lib/libssl/test/tsid index 8c7e9b1387..9e0854516c 100644 --- a/src/lib/libssl/test/tsid +++ b/src/lib/libssl/test/tsid | |||
@@ -3,7 +3,7 @@ | |||
3 | PATH=../apps:$PATH | 3 | PATH=../apps:$PATH |
4 | export PATH | 4 | export PATH |
5 | 5 | ||
6 | cmd='../apps/ssleay sess_id' | 6 | cmd='../apps/openssl sess_id' |
7 | 7 | ||
8 | if [ "$1"x != "x" ]; then | 8 | if [ "$1"x != "x" ]; then |
9 | t=$1 | 9 | t=$1 |
diff --git a/src/lib/libssl/test/tsid.com b/src/lib/libssl/test/tsid.com new file mode 100644 index 0000000000..28d83e5c4e --- /dev/null +++ b/src/lib/libssl/test/tsid.com | |||
@@ -0,0 +1,78 @@ | |||
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 | $ copy 't' fff.p | ||
14 | $ | ||
15 | $ write sys$output "p -> d" | ||
16 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $! write sys$output "p -> t" | ||
19 | $! 'cmd' -in fff.p -inform p -outform t -out f.t | ||
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 "t -> d" | ||
29 | $! 'cmd' -in f.t -inform t -outform d -out ff.d2 | ||
30 | $! if $severity .ne. 1 then exit 3 | ||
31 | $ write sys$output "p -> d" | ||
32 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
33 | $ if $severity .ne. 1 then exit 3 | ||
34 | $ | ||
35 | $! write sys$output "d -> t" | ||
36 | $! 'cmd' -in f.d -inform d -outform t -out ff.t1 | ||
37 | $! if $severity .ne. 1 then exit 3 | ||
38 | $! write sys$output "t -> t" | ||
39 | $! 'cmd' -in f.t -inform t -outform t -out ff.t2 | ||
40 | $! if $severity .ne. 1 then exit 3 | ||
41 | $! write sys$output "p -> t" | ||
42 | $! 'cmd' -in f.p -inform p -outform t -out ff.t3 | ||
43 | $! if $severity .ne. 1 then exit 3 | ||
44 | $ | ||
45 | $ write sys$output "d -> p" | ||
46 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
47 | $ if $severity .ne. 1 then exit 3 | ||
48 | $! write sys$output "t -> p" | ||
49 | $! 'cmd' -in f.t -inform t -outform p -out ff.p2 | ||
50 | $! if $severity .ne. 1 then exit 3 | ||
51 | $ write sys$output "p -> p" | ||
52 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
53 | $ if $severity .ne. 1 then exit 3 | ||
54 | $ | ||
55 | $ difference/output=nl: fff.p f.p | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ difference/output=nl: fff.p ff.p1 | ||
58 | $ if $severity .ne. 1 then exit 3 | ||
59 | $! difference/output=nl: fff.p ff.p2 | ||
60 | $! if $severity .ne. 1 then exit 3 | ||
61 | $ difference/output=nl: fff.p ff.p3 | ||
62 | $ if $severity .ne. 1 then exit 3 | ||
63 | $ | ||
64 | $! difference/output=nl: f.t ff.t1 | ||
65 | $! if $severity .ne. 1 then exit 3 | ||
66 | $! difference/output=nl: f.t ff.t2 | ||
67 | $! if $severity .ne. 1 then exit 3 | ||
68 | $! difference/output=nl: f.t ff.t3 | ||
69 | $! if $severity .ne. 1 then exit 3 | ||
70 | $ | ||
71 | $ difference/output=nl: f.p ff.p1 | ||
72 | $ if $severity .ne. 1 then exit 3 | ||
73 | $! difference/output=nl: f.p ff.p2 | ||
74 | $! if $severity .ne. 1 then exit 3 | ||
75 | $ difference/output=nl: f.p ff.p3 | ||
76 | $ if $severity .ne. 1 then exit 3 | ||
77 | $ | ||
78 | $ 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 b/src/lib/libssl/test/tx509 index f8d1f82cdd..35169f3a43 100644 --- a/src/lib/libssl/test/tx509 +++ b/src/lib/libssl/test/tx509 | |||
@@ -3,7 +3,7 @@ | |||
3 | PATH=../apps:$PATH | 3 | PATH=../apps:$PATH |
4 | export PATH | 4 | export PATH |
5 | 5 | ||
6 | cmd='../apps/ssleay x509' | 6 | cmd='../apps/openssl x509' |
7 | 7 | ||
8 | if [ "$1"x != "x" ]; then | 8 | if [ "$1"x != "x" ]; then |
9 | t=$1 | 9 | t=$1 |
diff --git a/src/lib/libssl/test/tx509.com b/src/lib/libssl/test/tx509.com new file mode 100644 index 0000000000..bbcf0a384b --- /dev/null +++ b/src/lib/libssl/test/tx509.com | |||
@@ -0,0 +1,78 @@ | |||
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 | $ copy 't' fff.p | ||
14 | $ | ||
15 | $ write sys$output "p -> d" | ||
16 | $ 'cmd' -in fff.p -inform p -outform d -out f.d | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $ write sys$output "p -> n" | ||
19 | $ 'cmd' -in fff.p -inform p -outform n -out f.n | ||
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 "n -> d" | ||
29 | $ 'cmd' -in f.n -inform n -outform d -out ff.d2 | ||
30 | $ if $severity .ne. 1 then exit 3 | ||
31 | $ write sys$output "p -> d" | ||
32 | $ 'cmd' -in f.p -inform p -outform d -out ff.d3 | ||
33 | $ if $severity .ne. 1 then exit 3 | ||
34 | $ | ||
35 | $ write sys$output "d -> n" | ||
36 | $ 'cmd' -in f.d -inform d -outform n -out ff.n1 | ||
37 | $ if $severity .ne. 1 then exit 3 | ||
38 | $ write sys$output "n -> n" | ||
39 | $ 'cmd' -in f.n -inform n -outform n -out ff.n2 | ||
40 | $ if $severity .ne. 1 then exit 3 | ||
41 | $ write sys$output "p -> n" | ||
42 | $ 'cmd' -in f.p -inform p -outform n -out ff.n3 | ||
43 | $ if $severity .ne. 1 then exit 3 | ||
44 | $ | ||
45 | $ write sys$output "d -> p" | ||
46 | $ 'cmd' -in f.d -inform d -outform p -out ff.p1 | ||
47 | $ if $severity .ne. 1 then exit 3 | ||
48 | $ write sys$output "n -> p" | ||
49 | $ 'cmd' -in f.n -inform n -outform p -out ff.p2 | ||
50 | $ if $severity .ne. 1 then exit 3 | ||
51 | $ write sys$output "p -> p" | ||
52 | $ 'cmd' -in f.p -inform p -outform p -out ff.p3 | ||
53 | $ if $severity .ne. 1 then exit 3 | ||
54 | $ | ||
55 | $ difference/output=nl: fff.p f.p | ||
56 | $ if $severity .ne. 1 then exit 3 | ||
57 | $ difference/output=nl: fff.p ff.p1 | ||
58 | $ if $severity .ne. 1 then exit 3 | ||
59 | $ difference/output=nl: fff.p ff.p2 | ||
60 | $ if $severity .ne. 1 then exit 3 | ||
61 | $ difference/output=nl: fff.p ff.p3 | ||
62 | $ if $severity .ne. 1 then exit 3 | ||
63 | $ | ||
64 | $ difference/output=nl: f.n ff.n1 | ||
65 | $ if $severity .ne. 1 then exit 3 | ||
66 | $ difference/output=nl: f.n ff.n2 | ||
67 | $ if $severity .ne. 1 then exit 3 | ||
68 | $ difference/output=nl: f.n ff.n3 | ||
69 | $ if $severity .ne. 1 then exit 3 | ||
70 | $ | ||
71 | $ difference/output=nl: f.p ff.p1 | ||
72 | $ if $severity .ne. 1 then exit 3 | ||
73 | $ difference/output=nl: f.p ff.p2 | ||
74 | $ if $severity .ne. 1 then exit 3 | ||
75 | $ difference/output=nl: f.p ff.p3 | ||
76 | $ if $severity .ne. 1 then exit 3 | ||
77 | $ | ||
78 | $ delete f.*;*,ff.*;*,fff.*;* | ||