summaryrefslogtreecommitdiff
path: root/src/lib/libssl/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/test')
-rw-r--r--src/lib/libssl/test/Makefile2
-rw-r--r--src/lib/libssl/test/bctest.com152
-rw-r--r--src/lib/libssl/test/bntest.com76
-rwxr-xr-xsrc/lib/libssl/test/clean_test.com35
-rw-r--r--src/lib/libssl/test/maketests.com1087
-rw-r--r--src/lib/libssl/test/tcrl.com88
-rw-r--r--src/lib/libssl/test/testca.com52
-rw-r--r--src/lib/libssl/test/testenc.com66
-rw-r--r--src/lib/libssl/test/testgen.com58
-rw-r--r--src/lib/libssl/test/tests.com375
-rw-r--r--src/lib/libssl/test/testss.com123
-rw-r--r--src/lib/libssl/test/testssl17
-rw-r--r--src/lib/libssl/test/testssl.com208
-rw-r--r--src/lib/libssl/test/testtsa.com255
-rw-r--r--src/lib/libssl/test/tpkcs7.com59
-rw-r--r--src/lib/libssl/test/tpkcs7d.com52
-rw-r--r--src/lib/libssl/test/treq.com88
-rw-r--r--src/lib/libssl/test/trsa.com99
-rw-r--r--src/lib/libssl/test/tsid.com88
-rw-r--r--src/lib/libssl/test/tverify.com65
-rw-r--r--src/lib/libssl/test/tx509.com88
21 files changed, 18 insertions, 3115 deletions
diff --git a/src/lib/libssl/test/Makefile b/src/lib/libssl/test/Makefile
index 09e6848764..4c9eabcc21 100644
--- a/src/lib/libssl/test/Makefile
+++ b/src/lib/libssl/test/Makefile
@@ -246,7 +246,7 @@ test_ecdh:
246test_verify: 246test_verify:
247 @echo "The following command should have some OK's and some failures" 247 @echo "The following command should have some OK's and some failures"
248 @echo "There are definitly a few expired certificates" 248 @echo "There are definitly a few expired certificates"
249 ../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs ../certs/*.pem 249 ../util/shlib_wrap.sh ../apps/openssl verify -CApath ../certs/demo ../certs/demo/*.pem
250 250
251test_dh: 251test_dh:
252 @echo "Generate a set of DH parameters" 252 @echo "Generate a set of DH parameters"
diff --git a/src/lib/libssl/test/bctest.com b/src/lib/libssl/test/bctest.com
deleted file mode 100644
index d7e5ec139e..0000000000
--- a/src/lib/libssl/test/bctest.com
+++ /dev/null
@@ -1,152 +0,0 @@
1$!
2$! Check operation of "bc".
3$!
4$! 2010-04-05 SMS. New. Based (loosely) on "bctest".
5$!
6$!
7$ tmp_file_name = "tmp.bctest"
8$ failure = ""
9$!
10$! Basic command test.
11$!
12$ on warning then goto bc_fail
13$ bc
14$ on error then exit
15$!
16$! Test for SunOS 5.[78] bc bug.
17$!
18$ if (failure .eqs. "")
19$ then
20$!
21$ define /user_mode sys$output 'tmp_file_name'
22$ bc
23obase=16
24ibase=16
25a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\
26CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\
2710F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\
28C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\
293BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\
304FC3CADF855448B24A9D7640BCF473E
31b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\
329209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\
338B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\
343ED0E2017D60A68775B75481449
35(a/b)*b + (a%b) - a
36$ status = $status
37$ output_expected = "0"
38$ gosub check_output
39$ if (output .ne. 1)
40$ then
41$ failure = "SunOStest"
42$ else
43$ delete 'f$parse( tmp_file_name)'
44$ endif
45$ endif
46$!
47$! Test for SCO bc bug.
48$!
49$ if (failure .eqs. "")
50$ then
51$!
52$ define /user_mode sys$output 'tmp_file_name'
53$ bc
54obase=16
55ibase=16
56-FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\
579DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\
5811B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\
591239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\
60AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\
61F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\
62B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\
6302EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\
6485EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\
65A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\
66E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\
678C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\
6804E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\
6989C8D71
70AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\
71928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\
728A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\
7337F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\
74E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\
75F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\
769E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\
77D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\
785296964
79$ status = $status
80$ output_expected = "0\0"
81$ gosub check_output
82$ if (output .ne. 1)
83$ then
84$ failure = "SCOtest"
85$ else
86$ delete 'f$parse( tmp_file_name)'
87$ endif
88$ endif
89$!
90$! Test for working 'print' command.
91$!
92$ if (failure .eqs. "")
93$ then
94$!
95$ define /user_mode sys$output 'tmp_file_name'
96$ bc
97print "OK"
98$ status = $status
99$ output_expected = "OK"
100$ gosub check_output
101$ if (output .ne. 1)
102$ then
103$ failure = "printtest"
104$ else
105$ delete 'f$parse( tmp_file_name)'
106$ endif
107$ endif
108$!
109$ if (failure .nes. "")
110$ then
111$ write sys$output -
112 "No working bc found. Consider installing GNU bc."
113$ exit %X00030000 ! %DCL-W-NORMAL
114$ endif
115$!
116$ exit
117$!
118$!
119$! Complete "bc" command failure.
120$!
121$ bc_fail:
122$ write sys$output -
123 "No ""bc"" program/symbol found. Consider installing GNU bc."
124$ exit %X00030000 ! %DCL-W-NORMAL
125$!
126$!
127$! Output check subroutine.
128$!
129$ check_output:
130$ eof = 0
131$ line_nr = 0
132$ open /read tmp_file 'tmp_file_name'
133$ c_o_loop:
134$ read /error = error_read tmp_file line
135$ goto ok_read
136$ error_read:
137$ eof = 1
138$ ok_read:
139$ line_expected = f$element( line_nr, "\", output_expected)
140$ line_nr = line_nr+ 1
141$ if ((line_expected .nes. "\") .and. (.not. eof) .and. -
142 (line_expected .eqs. line)) then goto c_o_loop
143$!
144$ if ((line_expected .eqs. "\") .and. eof)
145$ then
146$ output = 1
147$ else
148$ output = 0
149$ endif
150$ close tmp_file
151$ return
152$!
diff --git a/src/lib/libssl/test/bntest.com b/src/lib/libssl/test/bntest.com
deleted file mode 100644
index 6545d2e5a5..0000000000
--- a/src/lib/libssl/test/bntest.com
+++ /dev/null
@@ -1,76 +0,0 @@
1$!
2$! Analyze bntest output file.
3$!
4$! Exit status = 1 (success) if all tests passed,
5$! 0 (warning) if any test failed.
6$!
7$! 2011-02-20 SMS. Added code to skip "#" comments in the input file.
8$!
9$! 2010-04-05 SMS. New. Based (loosely) on perl code in bntest-vms.sh.
10$!
11$! Expect data like:
12$! test test_name1
13$! 0
14$! [...]
15$! test test_name2
16$! 0
17$! [...]
18$! [...]
19$!
20$! Some tests have no following "0" lines.
21$!
22$ result_file_name = f$edit( p1, "TRIM")
23$ if (result_file_name .eqs. "")
24$ then
25$ result_file_name = "bntest-vms.out"
26$ endif
27$!
28$ fail = 0
29$ passed = 0
30$ tests = 0
31$!
32$ on control_c then goto tidy
33$ on error then goto tidy
34$!
35$ open /read result_file 'result_file_name'
36$!
37$ read_loop:
38$ read /end = read_loop_end /error = tidy result_file line
39$ t1 = f$element( 0, " ", line)
40$!
41$! Skip "#" comment lines.
42$ if (f$extract( 0, 1, f$edit( line, "TRIM")) .eqs. "#") then -
43 goto read_loop
44$!
45$ if (t1 .eqs. "test")
46$ then
47$ passed = passed+ 1
48$ tests = tests+ 1
49$ fail = 1
50$ t2 = f$extract( 5, 1000, line)
51$ write sys$output "verify ''t2'"
52$ else
53$ if (t1 .nes. "0")
54$ then
55$ write sys$output "Failed! bc: ''line'"
56$ passed = passed- fail
57$ fail = 0
58$ endif
59$ endif
60$ goto read_loop
61$ read_loop_end:
62$ write sys$output "''passed'/''tests' tests passed"
63$!
64$ tidy:
65$ if f$trnlnm( "result_file", "LNM$PROCESS_TABLE", , "SUPERVISOR", , "CONFINE")
66$ then
67$ close result_file
68$ endif
69$!
70$ if ((tests .gt. 0) .and. (tests .eq. passed))
71$ then
72$ exit 1
73$ else
74$ exit 0
75$ endif
76$!
diff --git a/src/lib/libssl/test/clean_test.com b/src/lib/libssl/test/clean_test.com
deleted file mode 100755
index 7df633fbef..0000000000
--- a/src/lib/libssl/test/clean_test.com
+++ /dev/null
@@ -1,35 +0,0 @@
1$!
2$! Delete various test results files.
3$!
4$ def_orig = f$environment( "default")
5$ proc = f$environment( "procedure")
6$ proc_dev_dir = f$parse( "A.;", proc) - "A.;"
7$!
8$ on control_c then goto tidy
9$ on error then goto tidy
10$!
11$ set default 'proc_dev_dir'
12$!
13$ files := *.cms;*, *.srl;*, *.ss;*, -
14 cms.err;*, cms.out;*, newreq.pem;*, -
15 p.txt-zlib-cipher;*, -
16 smtst.txt;*, testkey.pem;*, testreq.pem;*, -
17 test_*.err;*, test_*.out;*, -
18 .rnd;*
19$!
20$ delim = ","
21$ i = 0
22$ loop:
23$ file = f$edit( f$element( i, delim, files), "trim")
24$ if (file .eqs. delim) then goto loop_end
25$ if (f$search( file) .nes. "") then -
26 delete 'p1' 'file'
27$ i = i+ 1
28$ goto loop
29$ loop_end:
30$!
31$ tidy:
32$
33$ if (f$type( def_orig) .nes. "") then -
34 set default 'def_orig'
35$!
diff --git a/src/lib/libssl/test/maketests.com b/src/lib/libssl/test/maketests.com
deleted file mode 100644
index 9b64cba234..0000000000
--- a/src/lib/libssl/test/maketests.com
+++ /dev/null
@@ -1,1087 +0,0 @@
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 "executables" will be placed in a directory called
16$! [.xxx.EXE.TEST] where "xxx" denotes ALPHA, IA64, or VAX, depending
17$! on your machine architecture.
18$!
19$! Specify DEBUG or NODEBUG P1 to compile with or without debugger
20$! information.
21$!
22$! Specify which compiler at P2 to try to compile under.
23$!
24$! VAXC For VAX C.
25$! DECC For DEC C.
26$! GNUC For GNU C.
27$!
28$! If you don't specify a compiler, it will try to determine which
29$! "C" compiler to use.
30$!
31$! P3, if defined, sets a TCP/IP library to use, through one of the following
32$! keywords:
33$!
34$! UCX for UCX
35$! SOCKETSHR for SOCKETSHR+NETLIB
36$!
37$! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
38$!
39$!
40$! P5, if defined, specifies the C pointer size. Ignored on VAX.
41$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
42$! Supported values are:
43$!
44$! "" Compile with default (/NOPOINTER_SIZE)
45$! 32 Compile with /POINTER_SIZE=32 (SHORT)
46$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
47$! (Automatically select ARGV if compiler supports it.)
48$! 64= Compile with /POINTER_SIZE=64 (LONG).
49$! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
50$!
51$! P6, if defined, specifies a directory where ZLIB files (zlib.h,
52$! libz.olb) may be found. Optionally, a non-default object library
53$! name may be included ("dev:[dir]libz_64.olb", for example).
54$!
55$!
56$! Announce/identify.
57$!
58$ proc = f$environment( "procedure")
59$ write sys$output "@@@ "+ -
60 f$parse( proc, , , "name")+ f$parse( proc, , , "type")
61$!
62$! Define A TCP/IP Library That We Will Need To Link To.
63$! (That is, If We Need To Link To One.)
64$!
65$ TCPIP_LIB = ""
66$ ZLIB_LIB = ""
67$!
68$! Check Which Architecture We Are Using.
69$!
70$ if (f$getsyi( "cpu") .lt. 128)
71$ then
72$ ARCH = "VAX"
73$ else
74$ ARCH = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
75$ if (ARCH .eqs. "") then ARCH = "UNK"
76$ endif
77$!
78$ ARCHD = ARCH
79$ LIB32 = "32"
80$ OPT_FILE = ""
81$ POINTER_SIZE = ""
82$!
83$! Check To Make Sure We Have Valid Command Line Parameters.
84$!
85$ GOSUB CHECK_OPTIONS
86$!
87$! Define The OBJ and EXE Directories.
88$!
89$ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.TEST]
90$ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.TEST]
91$!
92$! Specify the destination directory in any /MAP option.
93$!
94$ if (LINKMAP .eqs. "MAP")
95$ then
96$ LINKMAP = LINKMAP+ "=''EXE_DIR'"
97$ endif
98$!
99$! Add the location prefix to the linker options file name.
100$!
101$ if (OPT_FILE .nes. "")
102$ then
103$ OPT_FILE = EXE_DIR+ OPT_FILE
104$ endif
105$!
106$! Initialise logical names and such
107$!
108$ GOSUB INITIALISE
109$!
110$! Tell The User What Kind of Machine We Run On.
111$!
112$ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'"
113$!
114$! Define The CRYPTO-LIB We Are To Use.
115$!
116$ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB
117$!
118$! Define The SSL We Are To Use.
119$!
120$ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB
121$!
122$! Create the OBJ and EXE Directories, if needed.
123$!
124$ IF (F$PARSE(OBJ_DIR).EQS."") THEN -
125 CREATE /DIRECTORY 'OBJ_DIR'
126$ IF (F$PARSE(EXE_DIR).EQS."") THEN -
127 CREATE /DIRECTORY 'EXE_DIR'
128$!
129$! Check To See If We Have The Proper Libraries.
130$!
131$ GOSUB LIB_CHECK
132$!
133$! Check To See If We Have A Linker Option File.
134$!
135$ GOSUB CHECK_OPT_FILE
136$!
137$! Define The TEST Files.
138$! NOTE: Some might think this list ugly. However, it's made this way to
139$! reflect the EXE variable in Makefile as closely as possible,
140$! thereby making it fairly easy to verify that the lists are the same.
141$!
142$ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ -
143 "MD2TEST,MD4TEST,MD5TEST,HMACTEST,WP_TEST,"+ -
144 "RC2TEST,RC4TEST,RC5TEST,"+ -
145 "DESTEST,SHATEST,SHA1TEST,SHA256T,SHA512T,"+ -
146 "MDC2TEST,RMDTEST,"+ -
147 "RANDTEST,DHTEST,ENGINETEST,"+ -
148 "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ -
149 "EVP_TEST,IGETEST,JPAKETEST,SRPTEST,"+ -
150 "ASN1TEST"
151$! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well?
152$!
153$! Additional directory information.
154$ T_D_BNTEST := [-.crypto.bn]
155$ T_D_ECTEST := [-.crypto.ec]
156$ T_D_ECDSATEST := [-.crypto.ecdsa]
157$ T_D_ECDHTEST := [-.crypto.ecdh]
158$ T_D_IDEATEST := [-.crypto.idea]
159$ T_D_MD2TEST := [-.crypto.md2]
160$ T_D_MD4TEST := [-.crypto.md4]
161$ T_D_MD5TEST := [-.crypto.md5]
162$ T_D_HMACTEST := [-.crypto.hmac]
163$ T_D_WP_TEST := [-.crypto.whrlpool]
164$ T_D_RC2TEST := [-.crypto.rc2]
165$ T_D_RC4TEST := [-.crypto.rc4]
166$ T_D_RC5TEST := [-.crypto.rc5]
167$ T_D_DESTEST := [-.crypto.des]
168$ T_D_SHATEST := [-.crypto.sha]
169$ T_D_SHA1TEST := [-.crypto.sha]
170$ T_D_SHA256T := [-.crypto.sha]
171$ T_D_SHA512T := [-.crypto.sha]
172$ T_D_MDC2TEST := [-.crypto.mdc2]
173$ T_D_RMDTEST := [-.crypto.ripemd]
174$ T_D_RANDTEST := [-.crypto.rand]
175$ T_D_DHTEST := [-.crypto.dh]
176$ T_D_ENGINETEST := [-.crypto.engine]
177$ T_D_BFTEST := [-.crypto.bf]
178$ T_D_CASTTEST := [-.crypto.cast]
179$ T_D_SSLTEST := [-.ssl]
180$ T_D_EXPTEST := [-.crypto.bn]
181$ T_D_DSATEST := [-.crypto.dsa]
182$ T_D_RSA_TEST := [-.crypto.rsa]
183$ T_D_EVP_TEST := [-.crypto.evp]
184$ T_D_IGETEST := [-.test]
185$ T_D_JPAKETEST := [-.crypto.jpake]
186$ T_D_SRPTEST := [-.crypto.srp]
187$ T_D_ASN1TEST := [-.test]
188$!
189$ TCPIP_PROGRAMS = ",,"
190$ IF COMPILER .EQS. "VAXC" THEN -
191 TCPIP_PROGRAMS = ",SSLTEST,"
192$!
193$! Define A File Counter And Set It To "0".
194$!
195$ FILE_COUNTER = 0
196$!
197$! Top Of The File Loop.
198$!
199$ NEXT_FILE:
200$!
201$! O.K, Extract The File Name From The File List.
202$!
203$ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",TEST_FILES)
204$!
205$! Check To See If We Are At The End Of The File List.
206$!
207$ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE
208$!
209$! Increment The Counter.
210$!
211$ FILE_COUNTER = FILE_COUNTER + 1
212$!
213$! Create The Source File Name.
214$!
215$ SOURCE_FILE = "SYS$DISK:" + T_D_'FILE_NAME' + FILE_NAME + ".C"
216$!
217$! Create The Object File Name.
218$!
219$ OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ"
220$!
221$! Create The Executable File Name.
222$!
223$ EXE_FILE = EXE_DIR + FILE_NAME + ".EXE"
224$ ON WARNING THEN GOTO NEXT_FILE
225$!
226$! Check To See If The File We Want To Compile Actually Exists.
227$!
228$ IF (F$SEARCH(SOURCE_FILE).EQS."")
229$ THEN
230$!
231$! Tell The User That The File Dosen't Exist.
232$!
233$ WRITE SYS$OUTPUT ""
234$ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist."
235$ WRITE SYS$OUTPUT ""
236$!
237$! Exit The Build.
238$!
239$ GOTO EXIT
240$ ENDIF
241$!
242$! Tell The User What We Are Building.
243$!
244$ WRITE SYS$OUTPUT "Building The ",FILE_NAME," Test Program."
245$!
246$! Compile The File.
247$!
248$ ON ERROR THEN GOTO NEXT_FILE
249$ CC /OBJECT='OBJECT_FILE' 'SOURCE_FILE'
250$ ON WARNING THEN GOTO NEXT_FILE
251$!
252$! Check If What We Are About To Compile Works Without A TCP/IP Library.
253$!
254$ IF ((TCPIP_LIB.EQS."").AND.((TCPIP_PROGRAMS-FILE_NAME).NES.TCPIP_PROGRAMS))
255$ THEN
256$!
257$! Inform The User That A TCP/IP Library Is Needed To Compile This Program.
258$!
259$ WRITE SYS$OUTPUT -
260 FILE_NAME," Needs A TCP/IP Library. Can't Link. Skipping..."
261$ GOTO NEXT_FILE
262$!
263$! End The TCP/IP Library Check.
264$!
265$ ENDIF
266$!
267$! Link The Program, Check To See If We Need To Link With RSAREF Or Not.
268$! Check To See If We Are To Link With A Specific TCP/IP Library.
269$!
270$! Don't Link With The RSAREF Routines And TCP/IP Library.
271$!
272$ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' -
273 'OBJECT_FILE', -
274 'SSL_LIB' /LIBRARY, -
275 'CRYPTO_LIB' /LIBRARY -
276 'TCPIP_LIB' -
277 'ZLIB_LIB' -
278 ,'OPT_FILE' /OPTIONS
279$!
280$! Go Back And Do It Again.
281$!
282$ GOTO NEXT_FILE
283$!
284$! All Done With This Library Part.
285$!
286$ FILE_DONE:
287$!
288$! All Done, Time To Exit.
289$!
290$ EXIT:
291$ GOSUB CLEANUP
292$ EXIT
293$!
294$! Check For The Link Option FIle.
295$!
296$ CHECK_OPT_FILE:
297$!
298$! Check To See If We Need To Make A VAX C Option File.
299$!
300$ IF (COMPILER.EQS."VAXC")
301$ THEN
302$!
303$! Check To See If We Already Have A VAX C Linker Option File.
304$!
305$ IF (F$SEARCH(OPT_FILE).EQS."")
306$ THEN
307$!
308$! We Need A VAX C Linker Option File.
309$!
310$ CREATE 'OPT_FILE'
311$DECK
312!
313! Default System Options File To Link Against
314! The Sharable VAX C Runtime Library.
315!
316SYS$SHARE:VAXCRTL.EXE /SHAREABLE
317$EOD
318$!
319$! End The Option File Check.
320$!
321$ ENDIF
322$!
323$! End The VAXC Check.
324$!
325$ ENDIF
326$!
327$! Check To See If We Need A GNU C Option File.
328$!
329$ IF (COMPILER.EQS."GNUC")
330$ THEN
331$!
332$! Check To See If We Already Have A GNU C Linker Option File.
333$!
334$ IF (F$SEARCH(OPT_FILE).EQS."")
335$ THEN
336$!
337$! We Need A GNU C Linker Option File.
338$!
339$ CREATE 'OPT_FILE'
340$DECK
341!
342! Default System Options File To Link Against
343! The Sharable C Runtime Library.
344!
345GNU_CC:[000000]GCCLIB.OLB /LIBRARY
346SYS$SHARE:VAXCRTL.EXE /SHAREABLE
347$EOD
348$!
349$! End The Option File Check.
350$!
351$ ENDIF
352$!
353$! End The GNU C Check.
354$!
355$ ENDIF
356$!
357$! Check To See If We Need A DEC C Option File.
358$!
359$ IF (COMPILER.EQS."DECC")
360$ THEN
361$!
362$! Check To See If We Already Have A DEC C Linker Option File.
363$!
364$ IF (F$SEARCH(OPT_FILE).EQS."")
365$ THEN
366$!
367$! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
368$!
369$ IF (ARCH.EQS."VAX")
370$ THEN
371$!
372$! We Need A DEC C Linker Option File For VAX.
373$!
374$ CREATE 'OPT_FILE'
375$DECK
376!
377! Default System Options File To Link Against
378! The Sharable DEC C Runtime Library.
379!
380SYS$SHARE:DECC$SHR.EXE /SHAREABLE
381$EOD
382$!
383$! Else...
384$!
385$ ELSE
386$!
387$! Create The non-VAX Linker Option File.
388$!
389$ CREATE 'OPT_FILE'
390$DECK
391!
392! Default System Options File For non-VAX To Link Against
393! The Sharable C Runtime Library.
394!
395SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE
396SYS$SHARE:CMA$OPEN_RTL.EXE /SHAREABLE
397$EOD
398$!
399$! End The DEC C Option File Check.
400$!
401$ ENDIF
402$!
403$! End The Option File Search.
404$!
405$ ENDIF
406$!
407$! End The DEC C Check.
408$!
409$ ENDIF
410$!
411$! Tell The User What Linker Option File We Are Using.
412$!
413$ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
414$!
415$! Time To RETURN.
416$!
417$ RETURN
418$!
419$! Check To See If We Have The Appropiate Libraries.
420$!
421$ LIB_CHECK:
422$!
423$! Look For The Library LIBCRYPTO.OLB.
424$!
425$ IF (F$SEARCH(CRYPTO_LIB).EQS."")
426$ THEN
427$!
428$! Tell The User We Can't Find The LIBCRYPTO.OLB Library.
429$!
430$ WRITE SYS$OUTPUT ""
431$ WRITE SYS$OUTPUT "Can't Find The Library ",CRYPTO_LIB,"."
432$ WRITE SYS$OUTPUT "We Can't Link Without It."
433$ WRITE SYS$OUTPUT ""
434$!
435$! Since We Can't Link Without It, Exit.
436$!
437$ EXIT
438$!
439$! End The Crypto Library Check.
440$!
441$ ENDIF
442$!
443$! Look For The Library LIBSSL.OLB.
444$!
445$ IF (F$SEARCH(SSL_LIB).EQS."")
446$ THEN
447$!
448$! Tell The User We Can't Find The LIBSSL.OLB Library.
449$!
450$ WRITE SYS$OUTPUT ""
451$ WRITE SYS$OUTPUT "Can't Find The Library ",SSL_LIB,"."
452$ WRITE SYS$OUTPUT "Some Of The Test Programs Need To Link To It."
453$ WRITE SYS$OUTPUT ""
454$!
455$! Since We Can't Link Without It, Exit.
456$!
457$ EXIT
458$!
459$! End The SSL Library Check.
460$!
461$ ENDIF
462$!
463$! Time To Return.
464$!
465$ RETURN
466$!
467$! Check The User's Options.
468$!
469$ CHECK_OPTIONS:
470$!
471$! Set basic C compiler /INCLUDE directories.
472$!
473$ CC_INCLUDES = "SYS$DISK:[-],SYS$DISK:[-.CRYPTO]"
474$!
475$! Check To See If P1 Is Blank.
476$!
477$ IF (P1.EQS."NODEBUG")
478$ THEN
479$!
480$! P1 Is NODEBUG, So Compile Without Debugger Information.
481$!
482$ DEBUGGER = "NODEBUG"
483$ LINKMAP = "NOMAP"
484$ TRACEBACK = "NOTRACEBACK"
485$ GCC_OPTIMIZE = "OPTIMIZE"
486$ CC_OPTIMIZE = "OPTIMIZE"
487$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
488$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
489$!
490$! Else...
491$!
492$ ELSE
493$!
494$! Check To See If We Are To Compile With Debugger Information.
495$!
496$ IF (P1.EQS."DEBUG")
497$ THEN
498$!
499$! Compile With Debugger Information.
500$!
501$ DEBUGGER = "DEBUG"
502$ LINKMAP = "MAP"
503$ TRACEBACK = "TRACEBACK"
504$ GCC_OPTIMIZE = "NOOPTIMIZE"
505$ CC_OPTIMIZE = "NOOPTIMIZE"
506$ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
507$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
508$!
509$! Else...
510$!
511$ ELSE
512$!
513$! Tell The User Entered An Invalid Option.
514$!
515$ WRITE SYS$OUTPUT ""
516$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
517$ WRITE SYS$OUTPUT ""
518$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
519$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
520$ WRITE SYS$OUTPUT ""
521$!
522$! Time To EXIT.
523$!
524$ EXIT
525$!
526$! End The Valid Argument Check.
527$!
528$ ENDIF
529$!
530$! End The P1 Check.
531$!
532$ ENDIF
533$!
534$! Check P5 (POINTER_SIZE).
535$!
536$ IF (P5 .NES. "") .AND. (ARCH .NES. "VAX")
537$ THEN
538$!
539$ IF (P5 .EQS. "32")
540$ THEN
541$ POINTER_SIZE = " /POINTER_SIZE=32"
542$ ELSE
543$ POINTER_SIZE = F$EDIT( P5, "COLLAPSE, UPCASE")
544$ IF ((POINTER_SIZE .EQS. "64") .OR. -
545 (POINTER_SIZE .EQS. "64=") .OR. -
546 (POINTER_SIZE .EQS. "64=ARGV"))
547$ THEN
548$ ARCHD = ARCH+ "_64"
549$ LIB32 = ""
550$ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=")
551$ THEN
552$! Explicit user choice: "64" or "64=ARGV".
553$ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64"
554$ ELSE
555$ SET NOON
556$ DEFINE /USER_MODE SYS$OUTPUT NL:
557$ DEFINE /USER_MODE SYS$ERROR NL:
558$ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL:
559$ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000
560$ THEN
561$ ! If we got here, it means DCL complained like this:
562$ ! %DCL-W-NOVALU, value not allowed - remove value specification
563$ ! \64=\
564$ !
565$ ! If the compiler was run, logicals defined in /USER would
566$ ! have been deassigned automatically. However, when DCL
567$ ! complains, they aren't, so we do it here (it might be
568$ ! unnecessary, but just in case there will be another error
569$ ! message further on that we don't want to miss)
570$ DEASSIGN /USER_MODE SYS$ERROR
571$ DEASSIGN /USER_MODE SYS$OUTPUT
572$ ELSE
573$ POINTER_SIZE = POINTER_SIZE + "=ARGV"
574$ ENDIF
575$ SET ON
576$ ENDIF
577$ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'"
578$ ELSE
579$!
580$! Tell The User Entered An Invalid Option.
581$!
582$ WRITE SYS$OUTPUT ""
583$ WRITE SYS$OUTPUT "The Option ", P5, -
584 " Is Invalid. The Valid Options Are:"
585$ WRITE SYS$OUTPUT ""
586$ WRITE SYS$OUTPUT -
587 " """" : Compile with default (short) pointers."
588$ WRITE SYS$OUTPUT -
589 " 32 : Compile with 32-bit (short) pointers."
590$ WRITE SYS$OUTPUT -
591 " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
592$ WRITE SYS$OUTPUT -
593 " 64= : Compile with 64-bit (long) pointers (no ARGV)."
594$ WRITE SYS$OUTPUT -
595 " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
596$ WRITE SYS$OUTPUT ""
597$!
598$! Time To EXIT.
599$!
600$ EXIT
601$!
602$ ENDIF
603$!
604$ ENDIF
605$!
606$! End The P5 (POINTER_SIZE) Check.
607$!
608$ ENDIF
609$!
610$! Check To See If P2 Is Blank.
611$!
612$ IF (P2.EQS."")
613$ THEN
614$!
615$! O.K., The User Didn't Specify A Compiler, Let's Try To
616$! Find Out Which One To Use.
617$!
618$! Check To See If We Have GNU C.
619$!
620$ IF (F$TRNLNM("GNU_CC").NES."")
621$ THEN
622$!
623$! Looks Like GNUC, Set To Use GNUC.
624$!
625$ P2 = "GNUC"
626$!
627$! End The GNU C Compiler Check.
628$!
629$ ELSE
630$!
631$! Check To See If We Have VAXC Or DECC.
632$!
633$ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
634$ THEN
635$!
636$! Looks Like DECC, Set To Use DECC.
637$!
638$ P2 = "DECC"
639$!
640$! Else...
641$!
642$ ELSE
643$!
644$! Looks Like VAXC, Set To Use VAXC.
645$!
646$ P2 = "VAXC"
647$!
648$! End The VAXC Compiler Check.
649$!
650$ ENDIF
651$!
652$! End The DECC & VAXC Compiler Check.
653$!
654$ ENDIF
655$!
656$! End The Compiler Check.
657$!
658$ ENDIF
659$!
660$! Check To See If We Have A Option For P3.
661$!
662$ IF (P3.EQS."")
663$ THEN
664$!
665$! Find out what socket library we have available
666$!
667$ IF F$PARSE("SOCKETSHR:") .NES. ""
668$ THEN
669$!
670$! We have SOCKETSHR, and it is my opinion that it's the best to use.
671$!
672$ P3 = "SOCKETSHR"
673$!
674$! Tell the user
675$!
676$ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
677$!
678$! Else, let's look for something else
679$!
680$ ELSE
681$!
682$! Like UCX (the reason to do this before Multinet is that the UCX
683$! emulation is easier to use...)
684$!
685$ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
686 .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
687 .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
688$ THEN
689$!
690$! Last resort: a UCX or UCX-compatible library
691$!
692$ P3 = "UCX"
693$!
694$! Tell the user
695$!
696$ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
697$!
698$! That was all...
699$!
700$ ENDIF
701$ ENDIF
702$ ENDIF
703$!
704$! Set Up Initial CC Definitions, Possibly With User Ones
705$!
706$ CCDEFS = "TCPIP_TYPE_''P3'"
707$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
708$ CCEXTRAFLAGS = ""
709$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
710$ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
711$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
712 CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
713$!
714$! Check To See If We Have A ZLIB Option.
715$!
716$ ZLIB = P6
717$ IF (ZLIB .NES. "")
718$ THEN
719$!
720$! Check for expected ZLIB files.
721$!
722$ err = 0
723$ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
724$ if (f$search( file1) .eqs. "")
725$ then
726$ WRITE SYS$OUTPUT ""
727$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
728$ WRITE SYS$OUTPUT " Can't find header: ''file1'"
729$ err = 1
730$ endif
731$ file1 = f$parse( "A.;", ZLIB)- "A.;"
732$!
733$ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
734$ if (f$search( file2) .eqs. "")
735$ then
736$ if (err .eq. 0)
737$ then
738$ WRITE SYS$OUTPUT ""
739$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
740$ endif
741$ WRITE SYS$OUTPUT " Can't find library: ''file2'"
742$ WRITE SYS$OUTPUT ""
743$ err = err+ 2
744$ endif
745$ if (err .eq. 1)
746$ then
747$ WRITE SYS$OUTPUT ""
748$ endif
749$!
750$ if (err .ne. 0)
751$ then
752$ GOTO EXIT
753$ endif
754$!
755$ CCDEFS = """ZLIB=1"", "+ CCDEFS
756$ CC_INCLUDES = CC_INCLUDES+ ", "+ file1
757$ ZLIB_LIB = ", ''file2' /library"
758$!
759$! Print info
760$!
761$ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
762$!
763$! End The P8 Check.
764$!
765$ ENDIF
766$!
767$! Check To See If The User Entered A Valid Parameter.
768$!
769$ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC")
770$ THEN
771$!
772$! Check To See If The User Wanted DECC.
773$!
774$ IF (P2.EQS."DECC")
775$ THEN
776$!
777$! Looks Like DECC, Set To Use DECC.
778$!
779$ COMPILER = "DECC"
780$!
781$! Tell The User We Are Using DECC.
782$!
783$ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
784$!
785$! Use DECC...
786$!
787$ CC = "CC"
788$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
789 THEN CC = "CC /DECC"
790$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
791 "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
792 " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS
793$!
794$! Define The Linker Options File Name.
795$!
796$ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
797$!
798$! End DECC Check.
799$!
800$ ENDIF
801$!
802$! Check To See If We Are To Use VAXC.
803$!
804$ IF (P2.EQS."VAXC")
805$ THEN
806$!
807$! Looks Like VAXC, Set To Use VAXC.
808$!
809$ COMPILER = "VAXC"
810$!
811$! Tell The User We Are Using VAX C.
812$!
813$ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
814$!
815$! Compile Using VAXC.
816$!
817$ CC = "CC"
818$ IF ARCH.NES."VAX"
819$ THEN
820$ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
821$ EXIT
822$ ENDIF
823$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC"
824$ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + -
825 "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
826$ CCDEFS = CCDEFS + ",""VAXC"""
827$!
828$! Define <sys> As SYS$COMMON:[SYSLIB]
829$!
830$ DEFINE /NOLOG SYS SYS$COMMON:[SYSLIB]
831$!
832$! Define The Linker Options File Name.
833$!
834$ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
835$!
836$! End VAXC Check
837$!
838$ ENDIF
839$!
840$! Check To See If We Are To Use GNU C.
841$!
842$ IF (P2.EQS."GNUC")
843$ THEN
844$!
845$! Looks Like GNUC, Set To Use GNUC.
846$!
847$ COMPILER = "GNUC"
848$!
849$! Tell The User We Are Using GNUC.
850$!
851$ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
852$!
853$! Use GNU C...
854$!
855$ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + -
856 "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
857$!
858$! Define The Linker Options File Name.
859$!
860$ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
861$!
862$! End The GNU C Check.
863$!
864$ ENDIF
865$!
866$! Set up default defines
867$!
868$ CCDEFS = """FLAT_INC=1""," + CCDEFS
869$!
870$! Finish up the definition of CC.
871$!
872$ IF COMPILER .EQS. "DECC"
873$ THEN
874$ IF CCDISABLEWARNINGS .EQS. ""
875$ THEN
876$ CC4DISABLEWARNINGS = "DOLLARID"
877$ ELSE
878$ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
879$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
880$ ENDIF
881$ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
882$ ELSE
883$ CCDISABLEWARNINGS = ""
884$ CC4DISABLEWARNINGS = ""
885$ ENDIF
886$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
887$!
888$! Show user the result
889$!
890$ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC
891$!
892$! Else The User Entered An Invalid Argument.
893$!
894$ ELSE
895$!
896$! Tell The User We Don't Know What They Want.
897$!
898$ WRITE SYS$OUTPUT ""
899$ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
900$ WRITE SYS$OUTPUT ""
901$ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
902$ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
903$ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
904$ WRITE SYS$OUTPUT ""
905$!
906$! Time To EXIT.
907$!
908$ EXIT
909$ ENDIF
910$!
911$! Time to check the contents, and to make sure we get the correct library.
912$!
913$ IF P3.EQS."SOCKETSHR" .OR. P3.EQS."MULTINET" .OR. P3.EQS."UCX" -
914 .OR. P3.EQS."TCPIP" .OR. P3.EQS."NONE"
915$ THEN
916$!
917$! Check to see if SOCKETSHR was chosen
918$!
919$ IF P3.EQS."SOCKETSHR"
920$ THEN
921$!
922$! Set the library to use SOCKETSHR
923$!
924$ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
925$!
926$! Done with SOCKETSHR
927$!
928$ ENDIF
929$!
930$! Check to see if MULTINET was chosen
931$!
932$ IF P3.EQS."MULTINET"
933$ THEN
934$!
935$! Set the library to use UCX emulation.
936$!
937$ P3 = "UCX"
938$!
939$! Done with MULTINET
940$!
941$ ENDIF
942$!
943$! Check to see if UCX was chosen
944$!
945$ IF P3.EQS."UCX"
946$ THEN
947$!
948$! Set the library to use UCX.
949$!
950$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
951$ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
952$ THEN
953$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
954$ ELSE
955$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
956 TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
957$ ENDIF
958$!
959$! Done with UCX
960$!
961$ ENDIF
962$!
963$! Check to see if TCPIP was chosen
964$!
965$ IF P3.EQS."TCPIP"
966$ THEN
967$!
968$! Set the library to use TCPIP (post UCX).
969$!
970$ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
971$!
972$! Done with TCPIP
973$!
974$ ENDIF
975$!
976$! Check to see if NONE was chosen
977$!
978$ IF P3.EQS."NONE"
979$ THEN
980$!
981$! Do not use a TCPIP library.
982$!
983$ TCPIP_LIB = ""
984$!
985$! Done with NONE
986$!
987$ ENDIF
988$!
989$! Print info
990$!
991$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
992$!
993$! Else The User Entered An Invalid Argument.
994$!
995$ ELSE
996$!
997$! Tell The User We Don't Know What They Want.
998$!
999$ WRITE SYS$OUTPUT ""
1000$ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
1001$ WRITE SYS$OUTPUT ""
1002$ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1003$ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
1004$ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP (post UCX) TCP/IP library."
1005$ WRITE SYS$OUTPUT ""
1006$!
1007$! Time To EXIT.
1008$!
1009$ EXIT
1010$!
1011$! Done with TCP/IP libraries
1012$!
1013$ ENDIF
1014$!
1015$! Special Threads For OpenVMS v7.1 Or Later
1016$!
1017$! Written By: Richard Levitte
1018$! richard@levitte.org
1019$!
1020$!
1021$! Check To See If We Have A Option For P4.
1022$!
1023$ IF (P4.EQS."")
1024$ THEN
1025$!
1026$! Get The Version Of VMS We Are Using.
1027$!
1028$ ISSEVEN :=
1029$ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
1030$ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1031$!
1032$! Check To See If The VMS Version Is v7.1 Or Later.
1033$!
1034$ IF (TMP.GE.71)
1035$ THEN
1036$!
1037$! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1038$!
1039$ ISSEVEN := ,PTHREAD_USE_D4
1040$!
1041$! End The VMS Version Check.
1042$!
1043$ ENDIF
1044$!
1045$! End The P4 Check.
1046$!
1047$ ENDIF
1048$!
1049$! Time To RETURN...
1050$!
1051$ RETURN
1052$!
1053$ INITIALISE:
1054$!
1055$! Save old value of the logical name OPENSSL
1056$!
1057$ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
1058$!
1059$! Save directory information
1060$!
1061$ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
1062$ __HERE = F$EDIT(__HERE,"UPCASE")
1063$ __TOP = __HERE - "TEST]"
1064$ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
1065$!
1066$! Set up the logical name OPENSSL to point at the include directory
1067$!
1068$ DEFINE OPENSSL /NOLOG '__INCLUDE'
1069$!
1070$! Done
1071$!
1072$ RETURN
1073$!
1074$ CLEANUP:
1075$!
1076$! Restore the logical name OPENSSL if it had a value
1077$!
1078$ IF __SAVE_OPENSSL .EQS. ""
1079$ THEN
1080$ DEASSIGN OPENSSL
1081$ ELSE
1082$ DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL'
1083$ ENDIF
1084$!
1085$! Done
1086$!
1087$ RETURN
diff --git a/src/lib/libssl/test/tcrl.com b/src/lib/libssl/test/tcrl.com
deleted file mode 100644
index dd96a2b6dd..0000000000
--- a/src/lib/libssl/test/tcrl.com
+++ /dev/null
@@ -1,88 +0,0 @@
1$! TCRL.COM -- Tests crl keys
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p2 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$
12$ cmd = "mcr ''exe_dir'openssl crl"
13$
14$ t = "testcrl.pem"
15$ if p1 .nes. "" then t = p1
16$
17$ write sys$output "testing CRL conversions"
18$ if f$search("fff.*") .nes "" then delete fff.*;*
19$ if f$search("ff.*") .nes "" then delete ff.*;*
20$ if f$search("f.*") .nes "" then delete f.*;*
21$ convert/fdl=sys$input: 't' fff.p
22RECORD
23 FORMAT STREAM_LF
24$
25$ write sys$output "p -> d"
26$ 'cmd' -in fff.p -inform p -outform d -out f.d
27$ if $severity .ne. 1 then exit 3
28$! write sys$output "p -> t"
29$! 'cmd' -in fff.p -inform p -outform t -out f.t
30$! if $severity .ne. 1 then exit 3
31$ write sys$output "p -> p"
32$ 'cmd' -in fff.p -inform p -outform p -out f.p
33$ if $severity .ne. 1 then exit 3
34$
35$ write sys$output "d -> d"
36$ 'cmd' -in f.d -inform d -outform d -out ff.d1
37$ if $severity .ne. 1 then exit 3
38$! write sys$output "t -> d"
39$! 'cmd' -in f.t -inform t -outform d -out ff.d2
40$! if $severity .ne. 1 then exit 3
41$ write sys$output "p -> d"
42$ 'cmd' -in f.p -inform p -outform d -out ff.d3
43$ if $severity .ne. 1 then exit 3
44$
45$! write sys$output "d -> t"
46$! 'cmd' -in f.d -inform d -outform t -out ff.t1
47$! if $severity .ne. 1 then exit 3
48$! write sys$output "t -> t"
49$! 'cmd' -in f.t -inform t -outform t -out ff.t2
50$! if $severity .ne. 1 then exit 3
51$! write sys$output "p -> t"
52$! 'cmd' -in f.p -inform p -outform t -out ff.t3
53$! if $severity .ne. 1 then exit 3
54$
55$ write sys$output "d -> p"
56$ 'cmd' -in f.d -inform d -outform p -out ff.p1
57$ if $severity .ne. 1 then exit 3
58$! write sys$output "t -> p"
59$! 'cmd' -in f.t -inform t -outform p -out ff.p2
60$! if $severity .ne. 1 then exit 3
61$ write sys$output "p -> p"
62$ 'cmd' -in f.p -inform p -outform p -out ff.p3
63$ if $severity .ne. 1 then exit 3
64$
65$ backup/compare fff.p f.p
66$ if $severity .ne. 1 then exit 3
67$ backup/compare fff.p ff.p1
68$ if $severity .ne. 1 then exit 3
69$! backup/compare fff.p ff.p2
70$! if $severity .ne. 1 then exit 3
71$ backup/compare fff.p ff.p3
72$ if $severity .ne. 1 then exit 3
73$
74$! backup/compare f.t ff.t1
75$! if $severity .ne. 1 then exit 3
76$! backup/compare f.t ff.t2
77$! if $severity .ne. 1 then exit 3
78$! backup/compare f.t ff.t3
79$! if $severity .ne. 1 then exit 3
80$
81$ backup/compare f.p ff.p1
82$ if $severity .ne. 1 then exit 3
83$! backup/compare f.p ff.p2
84$! if $severity .ne. 1 then exit 3
85$ backup/compare f.p ff.p3
86$ if $severity .ne. 1 then exit 3
87$
88$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/src/lib/libssl/test/testca.com b/src/lib/libssl/test/testca.com
deleted file mode 100644
index 78cda9ec5a..0000000000
--- a/src/lib/libssl/test/testca.com
+++ /dev/null
@@ -1,52 +0,0 @@
1$! TESTCA.COM
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p1 .eqs. "64") then __arch = __arch+ "_64"
9$
10$ openssl = "mcr ''exe_dir'openssl"
11$
12$ SSLEAY_CONFIG="-config ""CAss.cnf"""
13$
14$ set noon
15$ if f$search("demoCA.dir") .nes. ""
16$ then
17$ @[-.util]deltree [.demoCA]*.*
18$ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) demoCA.dir;*
19$ delete demoCA.dir;*
20$ endif
21$ set on
22$ open/read sys$ca_input VMSca-response.1
23$ @[-.apps]CA.com -input sys$ca_input -newca
24$ close sys$ca_input
25$ if $severity .ne. 1 then exit 3
26$
27$
28$ SSLEAY_CONFIG="-config ""Uss.cnf"""
29$ @[-.apps]CA.com -newreq
30$ if $severity .ne. 1 then exit 3
31$
32$
33$ SSLEAY_CONFIG="-config [-.apps]openssl-vms.cnf"
34$ open/read sys$ca_input VMSca-response.2
35$ @[-.apps]CA.com -input sys$ca_input -sign
36$ close sys$ca_input
37$ if $severity .ne. 1 then exit 3
38$
39$
40$ @[-.apps]CA.com -verify newcert.pem
41$ if $severity .ne. 1 then exit 3
42$
43$ set noon
44$ @[-.util]deltree [.demoCA]*.*
45$ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) demoCA.dir;*
46$ delete demoCA.dir;*
47$ if f$search("newcert.pem") .nes. "" then delete newcert.pem;*
48$ if f$search("newcert.pem") .nes. "" then delete newreq.pem;*
49$ set on
50$! #usage: CA -newcert|-newreq|-newca|-sign|-verify
51$
52$ exit
diff --git a/src/lib/libssl/test/testenc.com b/src/lib/libssl/test/testenc.com
deleted file mode 100644
index 75acd6f07f..0000000000
--- a/src/lib/libssl/test/testenc.com
+++ /dev/null
@@ -1,66 +0,0 @@
1$! TESTENC.COM -- Test encoding and decoding
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p1 .eqs. 64) then __arch = __arch+ "_64"
9$
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$ testsrc = "makefile."
12$ test = "p.txt"
13$ cmd = "mcr ''exe_dir'openssl"
14$
15$ if f$search(test) .nes. "" then delete 'test';*
16$ convert/fdl=sys$input: 'testsrc' 'test'
17RECORD
18 FORMAT STREAM_LF
19$
20$ if f$search(test+"-cipher") .nes. "" then delete 'test'-cipher;*
21$ if f$search(test+"-clear") .nes. "" then delete 'test'-clear;*
22$
23$ write sys$output "cat"
24$ 'cmd' enc -in 'test' -out 'test'-cipher
25$ 'cmd' enc -in 'test'-cipher -out 'test'-clear
26$ backup/compare 'test' 'test'-clear
27$ if $severity .ne. 1 then exit 3
28$ delete 'test'-cipher;*,'test'-clear;*
29$
30$ write sys$output "base64"
31$ 'cmd' enc -a -e -in 'test' -out 'test'-cipher
32$ 'cmd' enc -a -d -in 'test'-cipher -out 'test'-clear
33$ backup/compare 'test' 'test'-clear
34$ if $severity .ne. 1 then exit 3
35$ delete 'test'-cipher;*,'test'-clear;*
36$
37$ define/user sys$output 'test'-cipher-commands
38$ 'cmd' list-cipher-commands
39$ open/read f 'test'-cipher-commands
40$ loop_cipher_commands:
41$ read/end=loop_cipher_commands_end f i
42$ write sys$output i
43$
44$ if f$search(test+"-"+i+"-cipher") .nes. "" then -
45 delete 'test'-'i'-cipher;*
46$ if f$search(test+"-"+i+"-clear") .nes. "" then -
47 delete 'test'-'i'-clear;*
48$
49$ 'cmd' 'i' -bufsize 113 -e -k test -in 'test' -out 'test'-'i'-cipher
50$ 'cmd' 'i' -bufsize 157 -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear
51$ backup/compare 'test' 'test'-'i'-clear
52$ if $severity .ne. 1 then exit 3
53$ delete 'test'-'i'-cipher;*,'test'-'i'-clear;*
54$
55$ write sys$output i," base64"
56$ 'cmd' 'i' -bufsize 113 -a -e -k test -in 'test' -out 'test'-'i'-cipher
57$ 'cmd' 'i' -bufsize 157 -a -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear
58$ backup/compare 'test' 'test'-'i'-clear
59$ if $severity .ne. 1 then exit 3
60$ delete 'test'-'i'-cipher;*,'test'-'i'-clear;*
61$
62$ goto loop_cipher_commands
63$ loop_cipher_commands_end:
64$ close f
65$ delete 'test'-cipher-commands;*
66$ delete 'test';*
diff --git a/src/lib/libssl/test/testgen.com b/src/lib/libssl/test/testgen.com
deleted file mode 100644
index e076da2f30..0000000000
--- a/src/lib/libssl/test/testgen.com
+++ /dev/null
@@ -1,58 +0,0 @@
1$! TESTGEN.COM
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$ if (p1 .eqs. 64) then __arch = __arch+ "_64"
8$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
9$
10$ T = "testcert"
11$ KEY = 512
12$ CA = "[-.certs]testca.pem"
13$
14$ set noon
15$ if f$search(T+".1;*") .nes. "" then delete 'T'.1;*
16$ if f$search(T+".2;*") .nes. "" then delete 'T'.2;*
17$ if f$search(T+".key;*") .nes. "" then delete 'T'.key;*
18$ set on
19$
20$ write sys$output "generating certificate request"
21$
22$ append/new nl: .rnd
23$ open/append random_file .rnd
24$ write random_file -
25 "string to make the random number generator think it has entropy"
26$ close random_file
27$
28$ set noon
29$ define/user sys$output nla0:
30$ mcr 'exe_dir'openssl no-rsa
31$ save_severity=$SEVERITY
32$ set on
33$ if save_severity
34$ then
35$ req_new="-newkey dsa:[-.apps]dsa512.pem"
36$ else
37$ req_new="-new"
38$ write sys$output -
39 "There should be a 2 sequences of .'s and some +'s."
40$ write sys$output -
41 "There should not be more that at most 80 per line"
42$ endif
43$
44$ write sys$output "This could take some time."
45$
46$ mcr 'exe_dir'openssl req -config test.cnf 'req_new' -out testreq.pem
47$ if $severity .ne. 1
48$ then
49$ write sys$output "problems creating request"
50$ exit 3
51$ endif
52$
53$ mcr 'exe_dir'openssl req -config test.cnf -verify -in testreq.pem -noout
54$ if $severity .ne. 1
55$ then
56$ write sys$output "signature on req is wrong"
57$ exit 3
58$ endif
diff --git a/src/lib/libssl/test/tests.com b/src/lib/libssl/test/tests.com
deleted file mode 100644
index a840d5078f..0000000000
--- a/src/lib/libssl/test/tests.com
+++ /dev/null
@@ -1,375 +0,0 @@
1$! TESTS.COM -- Performs the necessary tests
2$!
3$! P1 tests to be performed. Empty means all.
4$! P2 Pointer size: "", "32", or "64".
5$!
6$! Announce/identify.
7$!
8$ proc = f$environment( "procedure")
9$ write sys$output "@@@ "+ -
10 f$parse( proc, , , "name")+ f$parse( proc, , , "type")
11$!
12$ __proc = f$element(0,";",f$environment("procedure"))
13$ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;"
14$ __save_default = f$environment("default")
15$ __arch = "VAX"
16$ if f$getsyi("cpu") .ge. 128 then -
17 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
18$ if __arch .eqs. "" then __arch = "UNK"
19$!
20$ __archd = __arch
21$ pointer_size = ""
22$ if (p2 .eq. "64")
23$ then
24$ pointer_size = "64"
25$ __archd = __arch+ "_64"
26$ endif
27$!
28$ texe_dir := sys$disk:[-.'__archd'.exe.test]
29$ exe_dir := sys$disk:[-.'__archd'.exe.apps]
30$
31$ set default '__here'
32$
33$ ROOT = F$PARSE("sys$disk:[-]A.;0",,,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
34$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
35$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
36 - ".][000000" - "[000000." - "][" - "[" - "]"
37$ ROOT = ROOT_DEV + "[" + ROOT_DIR
38$ DEFINE/NOLOG SSLROOT 'ROOT'.APPS.] /TRANS=CONC
39$ openssl_conf := sslroot:[000000]openssl-vms.cnf
40$
41$ on control_y then goto exit
42$ on error then goto exit
43$
44$ if p1 .nes. ""
45$ then
46$ tests = p1
47$ else
48$! NOTE: This list reflects the list of dependencies following the
49$! "alltests" target in Makefile. This should make it easy to see
50$! if there's a difference that needs to be taken care of.
51$ tests := -
52 test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,-
53 test_md2,test_mdc2,test_wp,-
54 test_rmd,test_rc2,test_rc4,test_rc5,test_bf,test_cast,test_aes,-
55 test_rand,test_bn,test_ec,test_ecdsa,test_ecdh,-
56 test_enc,test_x509,test_rsa,test_crl,test_sid,-
57 test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
58 test_ss,test_ca,test_engine,test_evp,test_ssl,test_tsa,test_ige,-
59 test_jpake,test_srp,test_cms
60$ endif
61$ tests = f$edit(tests,"COLLAPSE")
62$
63$ BNTEST := bntest
64$ ECTEST := ectest
65$ ECDSATEST := ecdsatest
66$ ECDHTEST := ecdhtest
67$ EXPTEST := exptest
68$ IDEATEST := ideatest
69$ SHATEST := shatest
70$ SHA1TEST := sha1test
71$ SHA256TEST := sha256t
72$ SHA512TEST := sha512t
73$ MDC2TEST := mdc2test
74$ RMDTEST := rmdtest
75$ MD2TEST := md2test
76$ MD4TEST := md4test
77$ MD5TEST := md5test
78$ HMACTEST := hmactest
79$ WPTEST := wp_test
80$ RC2TEST := rc2test
81$ RC4TEST := rc4test
82$ RC5TEST := rc5test
83$ BFTEST := bftest
84$ CASTTEST := casttest
85$ DESTEST := destest
86$ RANDTEST := randtest
87$ DHTEST := dhtest
88$ DSATEST := dsatest
89$ METHTEST := methtest
90$ SSLTEST := ssltest
91$ RSATEST := rsa_test
92$ ENGINETEST := enginetest
93$ EVPTEST := evp_test
94$ IGETEST := igetest
95$ JPAKETEST := jpaketest
96$ SRPTEST := srptest
97$ ASN1TEST := asn1test
98$!
99$ tests_i = 0
100$ loop_tests:
101$ tests_e = f$element(tests_i,",",tests)
102$ tests_i = tests_i + 1
103$ if tests_e .eqs. "," then goto exit
104$ write sys$output "---> ''tests_e'"
105$ gosub 'tests_e'
106$ goto loop_tests
107$
108$ test_evp:
109$ mcr 'texe_dir''evptest' 'ROOT'.CRYPTO.EVP]evptests.txt
110$ return
111$ test_des:
112$ mcr 'texe_dir''destest'
113$ return
114$ test_idea:
115$ mcr 'texe_dir''ideatest'
116$ return
117$ test_sha:
118$ mcr 'texe_dir''shatest'
119$ mcr 'texe_dir''sha1test'
120$ mcr 'texe_dir''sha256test'
121$ mcr 'texe_dir''sha512test'
122$ return
123$ test_mdc2:
124$ mcr 'texe_dir''mdc2test'
125$ return
126$ test_md5:
127$ mcr 'texe_dir''md5test'
128$ return
129$ test_md4:
130$ mcr 'texe_dir''md4test'
131$ return
132$ test_hmac:
133$ mcr 'texe_dir''hmactest'
134$ return
135$ test_wp:
136$ mcr 'texe_dir''wptest'
137$ return
138$ test_md2:
139$ mcr 'texe_dir''md2test'
140$ return
141$ test_rmd:
142$ mcr 'texe_dir''rmdtest'
143$ return
144$ test_bf:
145$ mcr 'texe_dir''bftest'
146$ return
147$ test_cast:
148$ mcr 'texe_dir''casttest'
149$ return
150$ test_rc2:
151$ mcr 'texe_dir''rc2test'
152$ return
153$ test_rc4:
154$ mcr 'texe_dir''rc4test'
155$ return
156$ test_rc5:
157$ mcr 'texe_dir''rc5test'
158$ return
159$ test_rand:
160$ mcr 'texe_dir''randtest'
161$ return
162$ test_enc:
163$ @testenc.com 'pointer_size'
164$ return
165$ test_x509:
166$ set noon
167$ define sys$error test_x509.err
168$ write sys$output "test normal x509v1 certificate"
169$ @tx509.com "" 'pointer_size'
170$ write sys$output "test first x509v3 certificate"
171$ @tx509.com v3-cert1.pem 'pointer_size'
172$ write sys$output "test second x509v3 certificate"
173$ @tx509.com v3-cert2.pem 'pointer_size'
174$ deassign sys$error
175$ set on
176$ return
177$ test_rsa:
178$ set noon
179$ define sys$error test_rsa.err
180$ @trsa.com "" 'pointer_size'
181$ deassign sys$error
182$ mcr 'texe_dir''rsatest'
183$ set on
184$ return
185$ test_crl:
186$ set noon
187$ define sys$error test_crl.err
188$ @tcrl.com "" 'pointer_size'
189$ deassign sys$error
190$ set on
191$ return
192$ test_sid:
193$ set noon
194$ define sys$error test_sid.err
195$ @tsid.com "" 'pointer_size'
196$ deassign sys$error
197$ set on
198$ return
199$ test_req:
200$ set noon
201$ define sys$error test_req.err
202$ @treq.com "" 'pointer_size'
203$ @treq.com testreq2.pem 'pointer_size'
204$ deassign sys$error
205$ set on
206$ return
207$ test_pkcs7:
208$ set noon
209$ define sys$error test_pkcs7.err
210$ @tpkcs7.com "" 'pointer_size'
211$ @tpkcs7d.com "" 'pointer_size'
212$ deassign sys$error
213$ set on
214$ return
215$ test_bn:
216$ write sys$output -
217 "starting big number library test, could take a while..."
218$ set noon
219$ define sys$error test_bn.err
220$ define sys$output test_bn.out
221$ @ bctest.com
222$ status = $status
223$ deassign sys$error
224$ deassign sys$output
225$ set on
226$ if (status)
227$ then
228$ create /fdl = sys$input bntest-vms.tmp
229FILE
230 ORGANIZATION sequential
231RECORD
232 FORMAT stream_lf
233$ define /user_mode sys$output bntest-vms.tmp
234$ mcr 'texe_dir''bntest'
235$ define /user_mode sys$input bntest-vms.tmp
236$ define /user_mode sys$output bntest-vms.out
237$ bc
238$ @ bntest.com bntest-vms.out
239$ status = $status
240$ if (status)
241$ then
242$ delete bntest-vms.out;*
243$ delete bntest-vms.tmp;*
244$ endif
245$ else
246$ create /fdl = sys$input bntest-vms.sh
247FILE
248 ORGANIZATION sequential
249RECORD
250 FORMAT stream_lf
251$ open /append bntest_file bntest-vms.sh
252$ type /output = bntest_file sys$input:
253<< __FOO__ sh -c "`sh ./bctest`" | perl -e '$i=0; while (<STDIN>) {if (/^test (.*)/) {print STDERR "\nverify $1";} elsif (!/^0$/) {die "\nFailed! bc: $_";} else {print STDERR "."; $i++;}} print STDERR "\n$i tests passed\n"'
254$ define /user_mode sys$output bntest-vms.tmp
255$ mcr 'texe_dir''bntest'
256$ copy bntest-vms.tmp bntest_file
257$ delete bntest-vms.tmp;*
258$ type /output = bntest_file sys$input:
259__FOO__
260$ close bntest_file
261$ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and"
262$ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations"
263$ write sys$output "-- went well."
264$ write sys$output ""
265$ endif
266$ write sys$output "test a^b%c implementations"
267$ mcr 'texe_dir''exptest'
268$ return
269$ test_ec:
270$ write sys$output "test elliptic curves"
271$ mcr 'texe_dir''ectest'
272$ return
273$ test_ecdsa:
274$ write sys$output "test ecdsa"
275$ mcr 'texe_dir''ecdsatest'
276$ return
277$ test_ecdh:
278$ write sys$output "test ecdh"
279$ mcr 'texe_dir''ecdhtest'
280$ return
281$ test_verify:
282$ write sys$output "The following command should have some OK's and some failures"
283$ write sys$output "There are definitly a few expired certificates"
284$ @tverify.com 'pointer_size'
285$ return
286$ test_dh:
287$ write sys$output "Generate a set of DH parameters"
288$ mcr 'texe_dir''dhtest'
289$ return
290$ test_dsa:
291$ write sys$output "Generate a set of DSA parameters"
292$ mcr 'texe_dir''dsatest'
293$ return
294$ test_gen:
295$ write sys$output "Generate and verify a certificate request"
296$ @testgen.com 'pointer_size'
297$ return
298$ maybe_test_ss:
299$ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT"))
300$ if f$cvtime(f$file_attributes("keyU.ss","RDT")) .les. testss_RDT then -
301 goto test_ss
302$ if f$cvtime(f$file_attributes("certU.ss","RDT")) .les. testss_RDT then -
303 goto test_ss
304$ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then -
305 goto test_ss
306$ return
307$ test_ss:
308$ write sys$output "Generate and certify a test certificate"
309$ @testss.com 'pointer_size'
310$ return
311$ test_engine:
312$ write sys$output "Manipulate the ENGINE structures"
313$ mcr 'texe_dir''enginetest'
314$ return
315$ test_ssl:
316$ write sys$output "test SSL protocol"
317$ gosub maybe_test_ss
318$ @testssl.com keyU.ss certU.ss certCA.ss 'pointer_size'
319$ return
320$ test_ca:
321$ set noon
322$ define /user_mode sys$output test_ca.out
323$ mcr 'exe_dir'openssl no-rsa
324$ save_severity=$SEVERITY
325$ set on
326$ if save_severity
327$ then
328$ write sys$output "skipping CA.com test -- requires RSA"
329$ else
330$ write sys$output "Generate and certify a test certificate via the 'ca' program"
331$ @testca.com 'pointer_size'
332$ endif
333$ return
334$ test_aes:
335$! write sys$output "test AES"
336$! !mcr 'texe_dir''aestest'
337$ return
338$ test_tsa:
339$ set noon
340$ define /user_mode sys$output nla0:
341$ mcr 'exe_dir'openssl no-rsa
342$ save_severity=$SEVERITY
343$ set on
344$ if save_severity
345$ then
346$ write sys$output "skipping testtsa.com test -- requires RSA"
347$ else
348$ @testtsa.com "" "" "" 'pointer_size'
349$ endif
350$ return
351$ test_ige:
352$ write sys$output "Test IGE mode"
353$ mcr 'texe_dir''igetest'
354$ return
355$ test_jpake:
356$ write sys$output "Test JPAKE"
357$ mcr 'texe_dir''jpaketest'
358$ return
359$ test_cms:
360$ write sys$output "CMS consistency test"
361$ ! Define the logical name used to find openssl.exe in the perl script.
362$ define /user_mode osslx 'exe_dir'
363$ perl CMS-TEST.PL
364$ return
365$ test_srp:
366$ write sys$output "Test SRP"
367$ mcr 'texe_dir''srptest'
368$ return
369$
370$
371$ exit:
372$ mcr 'exe_dir'openssl version -a
373$ set default '__save_default'
374$ deassign sslroot
375$ exit
diff --git a/src/lib/libssl/test/testss.com b/src/lib/libssl/test/testss.com
deleted file mode 100644
index 32a74d0fc2..0000000000
--- a/src/lib/libssl/test/testss.com
+++ /dev/null
@@ -1,123 +0,0 @@
1$! TESTSS.COM
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p1 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$
12$ digest="-md5"
13$ reqcmd = "mcr ''exe_dir'openssl req"
14$ x509cmd = "mcr ''exe_dir'openssl x509 ''digest'"
15$ verifycmd = "mcr ''exe_dir'openssl verify"
16$ dummycnf = "sys$disk:[-.apps]openssl-vms.cnf"
17$
18$ CAkey="""keyCA.ss"""
19$ CAcert="""certCA.ss"""
20$ CAreq="""reqCA.ss"""
21$ CAconf="""CAss.cnf"""
22$ CAreq2="""req2CA.ss""" ! temp
23$
24$ Uconf="""Uss.cnf"""
25$ Ukey="""keyU.ss"""
26$ Ureq="""reqU.ss"""
27$ Ucert="""certU.ss"""
28$
29$ write sys$output ""
30$ write sys$output "make a certificate request using 'req'"
31$
32$ set noon
33$ define/user sys$output nla0:
34$ mcr 'exe_dir'openssl no-rsa
35$ save_severity=$SEVERITY
36$ set on
37$ if save_severity
38$ then
39$ req_new="-newkey dsa:[-.apps]dsa512.pem"
40$ else
41$ req_new="-new"
42$ endif
43$
44$ 'reqcmd' -config 'CAconf' -out 'CAreq' -keyout 'CAkey' 'req_new' ! -out err.ss
45$ if $severity .ne. 1
46$ then
47$ write sys$output "error using 'req' to generate a certificate request"
48$ exit 3
49$ endif
50$ write sys$output ""
51$ write sys$output "convert the certificate request into a self signed certificate using 'x509'"
52$ define /user sys$output err.ss
53$ 'x509cmd' "-CAcreateserial" -in 'CAreq' -days 30 -req -out 'CAcert' -signkey 'CAkey'
54$ if $severity .ne. 1
55$ then
56$ write sys$output "error using 'x509' to self sign a certificate request"
57$ exit 3
58$ endif
59$
60$ write sys$output ""
61$ write sys$output "convert a certificate into a certificate request using 'x509'"
62$ define /user sys$output err.ss
63$ 'x509cmd' -in 'CAcert' -x509toreq -signkey 'CAkey' -out 'CAreq2'
64$ if $severity .ne. 1
65$ then
66$ write sys$output "error using 'x509' convert a certificate to a certificate request"
67$ exit 3
68$ endif
69$
70$ 'reqcmd' -config 'dummycnf' -verify -in 'CAreq' -noout
71$ if $severity .ne. 1
72$ then
73$ write sys$output "first generated request is invalid"
74$ exit 3
75$ endif
76$
77$ 'reqcmd' -config 'dummycnf' -verify -in 'CAreq2' -noout
78$ if $severity .ne. 1
79$ then
80$ write sys$output "second generated request is invalid"
81$ exit 3
82$ endif
83$
84$ 'verifycmd' "-CAfile" 'CAcert' 'CAcert'
85$ if $severity .ne. 1
86$ then
87$ write sys$output "first generated cert is invalid"
88$ exit 3
89$ endif
90$
91$ write sys$output ""
92$ write sys$output "make another certificate request using 'req'"
93$ define /user sys$output err.ss
94$ 'reqcmd' -config 'Uconf' -out 'Ureq' -keyout 'Ukey' 'req_new'
95$ if $severity .ne. 1
96$ then
97$ write sys$output "error using 'req' to generate a certificate request"
98$ exit 3
99$ endif
100$
101$ write sys$output ""
102$ write sys$output "sign certificate request with the just created CA via 'x509'"
103$ define /user sys$output err.ss
104$ 'x509cmd' "-CAcreateserial" -in 'Ureq' -days 30 -req -out 'Ucert' "-CA" 'CAcert' "-CAkey" 'CAkey'
105$ if $severity .ne. 1
106$ then
107$ write sys$output "error using 'x509' to sign a certificate request"
108$ exit 3
109$ endif
110$
111$ 'verifycmd' "-CAfile" 'CAcert' 'Ucert'
112$ write sys$output ""
113$ write sys$output "Certificate details"
114$ 'x509cmd' -subject -issuer -startdate -enddate -noout -in 'Ucert'
115$
116$ write sys$output ""
117$ write sys$output "The generated CA certificate is ",CAcert
118$ write sys$output "The generated CA private key is ",CAkey
119$
120$ write sys$output "The generated user certificate is ",Ucert
121$ write sys$output "The generated user private key is ",Ukey
122$
123$ 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 5ae4dc8720..4e8542b556 100644
--- a/src/lib/libssl/test/testssl
+++ b/src/lib/libssl/test/testssl
@@ -119,6 +119,23 @@ $ssltest -bio_pair -server_auth -client_auth $CA $extra || exit 1
119echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify 119echo test sslv2/sslv3 with both client and server authentication via BIO pair and app verify
120$ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1 120$ssltest -bio_pair -server_auth -client_auth -app_verify $CA $extra || exit 1
121 121
122echo "Testing ciphersuites"
123for protocol in TLSv1.2 SSLv3; do
124 echo "Testing ciphersuites for $protocol"
125 for cipher in `../util/shlib_wrap.sh ../apps/openssl ciphers "RSA+$protocol" | tr ':' ' '`; do
126 echo "Testing $cipher"
127 prot=""
128 if [ $protocol = "SSLv3" ] ; then
129 prot="-ssl3"
130 fi
131 $ssltest -cipher $cipher $prot
132 if [ $? -ne 0 ] ; then
133 echo "Failed $cipher"
134 exit 1
135 fi
136 done
137done
138
122############################################################################# 139#############################################################################
123 140
124if ../util/shlib_wrap.sh ../apps/openssl no-dh; then 141if ../util/shlib_wrap.sh ../apps/openssl no-dh; then
diff --git a/src/lib/libssl/test/testssl.com b/src/lib/libssl/test/testssl.com
deleted file mode 100644
index f19edc4719..0000000000
--- a/src/lib/libssl/test/testssl.com
+++ /dev/null
@@ -1,208 +0,0 @@
1$! TESTSSL.COM
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p4 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ texe_dir = "sys$disk:[-.''__arch'.exe.test]"
11$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
12$
13$ if p1 .eqs. ""
14$ then
15$ key="[-.apps]server.pem"
16$ else
17$ key=p1
18$ endif
19$ if p2 .eqs. ""
20$ then
21$ cert="[-.apps]server.pem"
22$ else
23$ cert=p2
24$ endif
25$ ssltest = "mcr ''texe_dir'ssltest -key ''key'"+ -
26 " -cert ''cert' -c_key ''key' -c_cert ''cert'"
27$!
28$ set noon
29$ define/user sys$output testssl-x509-output.
30$ define/user sys$error nla0:
31$ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout
32$ define/user sys$error nla0:
33$ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact
34$ if $severity .eq. 1
35$ then
36$ dsa_cert = "YES"
37$ else
38$ dsa_cert = "NO"
39$ endif
40$ delete testssl-x509-output.;*
41$
42$ if p3 .eqs. ""
43$ then
44$ copy/concatenate [-.certs]*.pem certs.tmp
45$ CA = """-CAfile"" certs.tmp"
46$ else
47$ CA = """-CAfile"" "+p3
48$ endif
49$
50$!###########################################################################
51$
52$ write sys$output "test sslv2"
53$ 'ssltest' -ssl2
54$ if $severity .ne. 1 then goto exit3
55$
56$ write sys$output "test sslv2 with server authentication"
57$ 'ssltest' -ssl2 -server_auth 'CA'
58$ if $severity .ne. 1 then goto exit3
59$
60$ if .not. dsa_cert
61$ then
62$ write sys$output "test sslv2 with client authentication"
63$ 'ssltest' -ssl2 -client_auth 'CA'
64$ if $severity .ne. 1 then goto exit3
65$
66$ write sys$output "test sslv2 with both client and server authentication"
67$ 'ssltest' -ssl2 -server_auth -client_auth 'CA'
68$ if $severity .ne. 1 then goto exit3
69$ endif
70$
71$ write sys$output "test sslv3"
72$ 'ssltest' -ssl3
73$ if $severity .ne. 1 then goto exit3
74$
75$ write sys$output "test sslv3 with server authentication"
76$ 'ssltest' -ssl3 -server_auth 'CA'
77$ if $severity .ne. 1 then goto exit3
78$
79$ write sys$output "test sslv3 with client authentication"
80$ 'ssltest' -ssl3 -client_auth 'CA'
81$ if $severity .ne. 1 then goto exit3
82$
83$ write sys$output "test sslv3 with both client and server authentication"
84$ 'ssltest' -ssl3 -server_auth -client_auth 'CA'
85$ if $severity .ne. 1 then goto exit3
86$
87$ write sys$output "test sslv2/sslv3"
88$ 'ssltest'
89$ if $severity .ne. 1 then goto exit3
90$
91$ write sys$output "test sslv2/sslv3 with server authentication"
92$ 'ssltest' -server_auth 'CA'
93$ if $severity .ne. 1 then goto exit3
94$
95$ write sys$output "test sslv2/sslv3 with client authentication"
96$ 'ssltest' -client_auth 'CA'
97$ if $severity .ne. 1 then goto exit3
98$
99$ write sys$output "test sslv2/sslv3 with both client and server authentication"
100$ 'ssltest' -server_auth -client_auth 'CA'
101$ if $severity .ne. 1 then goto exit3
102$
103$ write sys$output "test sslv2 via BIO pair"
104$ 'ssltest' -bio_pair -ssl2
105$ if $severity .ne. 1 then goto exit3
106$
107$ write sys$output "test sslv2 with server authentication via BIO pair"
108$ 'ssltest' -bio_pair -ssl2 -server_auth 'CA'
109$ if $severity .ne. 1 then goto exit3
110$
111$ if .not. dsa_cert
112$ then
113$ write sys$output "test sslv2 with client authentication via BIO pair"
114$ 'ssltest' -bio_pair -ssl2 -client_auth 'CA'
115$ if $severity .ne. 1 then goto exit3
116$
117$ write sys$output "test sslv2 with both client and server authentication via BIO pair"
118$ 'ssltest' -bio_pair -ssl2 -server_auth -client_auth 'CA'
119$ if $severity .ne. 1 then goto exit3
120$ endif
121$
122$ write sys$output "test sslv3 via BIO pair"
123$ 'ssltest' -bio_pair -ssl3
124$ if $severity .ne. 1 then goto exit3
125$
126$ write sys$output "test sslv3 with server authentication via BIO pair"
127$ 'ssltest' -bio_pair -ssl3 -server_auth 'CA'
128$ if $severity .ne. 1 then goto exit3
129$
130$ write sys$output "test sslv3 with client authentication via BIO pair"
131$ 'ssltest' -bio_pair -ssl3 -client_auth 'CA'
132$ if $severity .ne. 1 then goto exit3
133
134$ write sys$output "test sslv3 with both client and server authentication via BIO pair"
135$ 'ssltest' -bio_pair -ssl3 -server_auth -client_auth 'CA'
136$ if $severity .ne. 1 then goto exit3
137$
138$ write sys$output "test sslv2/sslv3 via BIO pair"
139$ 'ssltest'
140$ if $severity .ne. 1 then goto exit3
141$
142$ if .not. dsa_cert
143$ then
144$ write sys$output "test sslv2/sslv3 w/o DHE via BIO pair"
145$ 'ssltest' -bio_pair -no_dhe
146$ if $severity .ne. 1 then goto exit3
147$ endif
148$
149$ write sys$output "test sslv2/sslv3 with 1024 bit DHE via BIO pair"
150$ 'ssltest' -bio_pair -dhe1024dsa -v
151$ if $severity .ne. 1 then goto exit3
152$
153$ write sys$output "test sslv2/sslv3 with server authentication"
154$ 'ssltest' -bio_pair -server_auth 'CA'
155$ if $severity .ne. 1 then goto exit3
156$
157$ write sys$output "test sslv2/sslv3 with client authentication via BIO pair"
158$ 'ssltest' -bio_pair -client_auth 'CA'
159$ if $severity .ne. 1 then goto exit3
160$
161$ write sys$output "test sslv2/sslv3 with both client and server authentication via BIO pair"
162$ 'ssltest' -bio_pair -server_auth -client_auth 'CA'
163$ if $severity .ne. 1 then goto exit3
164$
165$!###########################################################################
166$
167$ define/user sys$output nla0:
168$ mcr 'exe_dir'openssl no-rsa
169$ no_rsa=$SEVERITY
170$ define/user sys$output nla0:
171$ mcr 'exe_dir'openssl no-dh
172$ no_dh=$SEVERITY
173$
174$ if no_dh
175$ then
176$ write sys$output "skipping anonymous DH tests"
177$ else
178$ write sys$output "test tls1 with 1024bit anonymous DH, multiple handshakes"
179$ 'ssltest' -v -bio_pair -tls1 -cipher "ADH" -dhe1024dsa -num 10 -f -time
180$ if $severity .ne. 1 then goto exit3
181$ endif
182$
183$ if no_rsa
184$ then
185$ write sys$output "skipping RSA tests"
186$ else
187$ write sys$output "test tls1 with 1024bit RSA, no DHE, multiple handshakes"
188$ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -no_dhe -num 10 -f -time
189$ if $severity .ne. 1 then goto exit3
190$
191$ if no_dh
192$ then
193$ write sys$output "skipping RSA+DHE tests"
194$ else
195$ write sys$output "test tls1 with 1024bit RSA, 1024bit DHE, multiple handshakes"
196$ mcr 'texe_dir'ssltest -v -bio_pair -tls1 -cert [-.apps]server2.pem -dhe1024dsa -num 10 -f -time
197$ if $severity .ne. 1 then goto exit3
198$ endif
199$ endif
200$
201$ RET = 1
202$ goto exit
203$ exit3:
204$ RET = 3
205$ exit:
206$ if p3 .eqs. "" then delete certs.tmp;*
207$ set on
208$ exit 'RET'
diff --git a/src/lib/libssl/test/testtsa.com b/src/lib/libssl/test/testtsa.com
deleted file mode 100644
index 29fb1d0e63..0000000000
--- a/src/lib/libssl/test/testtsa.com
+++ /dev/null
@@ -1,255 +0,0 @@
1$!
2$! A few very basic tests for the 'ts' time stamping authority command.
3$!
4$
5$ __arch = "VAX"
6$ if f$getsyi("cpu") .ge. 128 then -
7 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
8$ if __arch .eqs. "" then __arch = "UNK"
9$!
10$ if (p4 .eqs. "64") then __arch = __arch+ "_64"
11$!
12$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
13$
14$ openssl = "mcr ''f$parse(exe_dir+"openssl.exe")'"
15$ OPENSSL_CONF = "[-]CAtsa.cnf"
16$ ! Because that's what ../apps/CA.sh really looks at
17$ SSLEAY_CONFIG = "-config " + OPENSSL_CONF
18$
19$ error:
20$ subroutine
21$ write sys$error "TSA test failed!"
22$ exit 3
23$ endsubroutine
24$
25$ setup_dir:
26$ subroutine
27$
28$ if f$search("tsa.dir") .nes ""
29$ then
30$ @[-.util]deltree [.tsa]*.*
31$ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) tsa.dir;*
32$ delete tsa.dir;*
33$ endif
34$
35$ create/dir [.tsa]
36$ set default [.tsa]
37$ endsubroutine
38$
39$ clean_up_dir:
40$ subroutine
41$
42$ set default [-]
43$ @[-.util]deltree [.tsa]*.*
44$ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) tsa.dir;*
45$ delete tsa.dir;*
46$ endsubroutine
47$
48$ create_ca:
49$ subroutine
50$
51$ write sys$output "Creating a new CA for the TSA tests..."
52$ TSDNSECT = "ts_ca_dn"
53$ openssl req -new -x509 -nodes -
54 -out tsaca.pem -keyout tsacakey.pem
55$ if $severity .ne. 1 then call error
56$ endsubroutine
57$
58$ create_tsa_cert:
59$ subroutine
60$
61$ INDEX=p1
62$ EXT=p2
63$ TSDNSECT = "ts_cert_dn"
64$
65$ openssl req -new -
66 -out tsa_req'INDEX'.pem -keyout tsa_key'INDEX'.pem
67$ if $severity .ne. 1 then call error
68$
69$ write sys$output "Using extension ''EXT'"
70$ openssl x509 -req -
71 -in tsa_req'INDEX'.pem -out tsa_cert'INDEX'.pem -
72 "-CA" tsaca.pem "-CAkey" tsacakey.pem "-CAcreateserial" -
73 -extfile 'OPENSSL_CONF' -extensions "''EXT'"
74$ if $severity .ne. 1 then call error
75$ endsubroutine
76$
77$ print_request:
78$ subroutine
79$
80$ openssl ts -query -in 'p1' -text
81$ endsubroutine
82$
83$ create_time_stamp_request1: subroutine
84$
85$ openssl ts -query -data [-]testtsa.com -policy tsa_policy1 -
86 -cert -out req1.tsq
87$ if $severity .ne. 1 then call error
88$ endsubroutine
89$
90$ create_time_stamp_request2: subroutine
91$
92$ openssl ts -query -data [-]testtsa.com -policy tsa_policy2 -
93 -no_nonce -out req2.tsq
94$ if $severity .ne. 1 then call error
95$ endsubroutine
96$
97$ create_time_stamp_request3: subroutine
98$
99$ openssl ts -query -data [-]CAtsa.cnf -no_nonce -out req3.tsq
100$ if $severity .ne. 1 then call error
101$ endsubroutine
102$
103$ print_response:
104$ subroutine
105$
106$ openssl ts -reply -in 'p1' -text
107$ if $severity .ne. 1 then call error
108$ endsubroutine
109$
110$ create_time_stamp_response:
111$ subroutine
112$
113$ openssl ts -reply -section 'p3' -queryfile 'p1' -out 'p2'
114$ if $severity .ne. 1 then call error
115$ endsubroutine
116$
117$ time_stamp_response_token_test:
118$ subroutine
119$
120$ RESPONSE2 = p2+ "-copy_tsr"
121$ TOKEN_DER = p2+ "-token_der"
122$ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out
123$ if $severity .ne. 1 then call error
124$ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2'
125$ if $severity .ne. 1 then call error
126$ backup/compare 'RESPONSE2' 'p2'
127$ if $severity .ne. 1 then call error
128$ openssl ts -reply -in 'p2' -text -token_out
129$ if $severity .ne. 1 then call error
130$ openssl ts -reply -in 'TOKEN_DER' -token_in -text -token_out
131$ if $severity .ne. 1 then call error
132$ openssl ts -reply -queryfile 'p1' -text -token_out
133$ if $severity .ne. 1 then call error
134$ endsubroutine
135$
136$ verify_time_stamp_response:
137$ subroutine
138$
139$ openssl ts -verify -queryfile 'p1' -in 'p2' -
140 "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
141$ if $severity .ne. 1 then call error
142$ openssl ts -verify -data 'p3' -in 'p2' -
143 "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
144$ if $severity .ne. 1 then call error
145$ endsubroutine
146$
147$ verify_time_stamp_token:
148$ subroutine
149$
150$ ! create the token from the response first
151$ openssl ts -reply -in "''p2'" -out "''p2'-token" -token_out
152$ if $severity .ne. 1 then call error
153$ openssl ts -verify -queryfile "''p1'" -in "''p2'-token" -
154 -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
155$ if $severity .ne. 1 then call error
156$ openssl ts -verify -data "''p3'" -in "''p2'-token" -
157 -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
158$ if $severity .ne. 1 then call error
159$ endsubroutine
160$
161$ verify_time_stamp_response_fail:
162$ subroutine
163$
164$ openssl ts -verify -queryfile 'p1' -in 'p2' -
165 "-CAfile" tsaca.pem -untrusted tsa_cert1.pem
166$ ! Checks if the verification failed, as it should have.
167$ if $severity .eq. 1 then call error
168$ write sys$output "Ok"
169$ endsubroutine
170$
171$ ! Main body ----------------------------------------------------------
172$
173$ set noon
174$
175$ write sys$output "Setting up TSA test directory..."
176$ call setup_dir
177$
178$ write sys$output "Creating CA for TSA tests..."
179$ call create_ca
180$
181$ write sys$output "Creating tsa_cert1.pem TSA server cert..."
182$ call create_tsa_cert 1 "tsa_cert"
183$
184$ write sys$output "Creating tsa_cert2.pem non-TSA server cert..."
185$ call create_tsa_cert 2 "non_tsa_cert"
186$
187$ write sys$output "Creating req1.req time stamp request for file testtsa..."
188$ call create_time_stamp_request1
189$
190$ write sys$output "Printing req1.req..."
191$ call print_request "req1.tsq"
192$
193$ write sys$output "Generating valid response for req1.req..."
194$ call create_time_stamp_response "req1.tsq" "resp1.tsr" "tsa_config1"
195$
196$ write sys$output "Printing response..."
197$ call print_response "resp1.tsr"
198$
199$ write sys$output "Verifying valid response..."
200$ call verify_time_stamp_response "req1.tsq" "resp1.tsr" "[-]testtsa.com"
201$
202$ write sys$output "Verifying valid token..."
203$ call verify_time_stamp_token "req1.tsq" "resp1.tsr" "[-]testtsa.com"
204$
205$ ! The tests below are commented out, because invalid signer certificates
206$ ! can no longer be specified in the config file.
207$
208$ ! write sys$output "Generating _invalid_ response for req1.req..."
209$ ! call create_time_stamp_response "req1.tsq" "resp1_bad.tsr" "tsa_config2"
210$
211$ ! write sys$output "Printing response..."
212$ ! call print_response "resp1_bad.tsr"
213$
214$ ! write sys$output "Verifying invalid response, it should fail..."
215$ ! call verify_time_stamp_response_fail "req1.tsq" "resp1_bad.tsr"
216$
217$ write sys$output "Creating req2.req time stamp request for file testtsa..."
218$ call create_time_stamp_request2
219$
220$ write sys$output "Printing req2.req..."
221$ call print_request "req2.tsq"
222$
223$ write sys$output "Generating valid response for req2.req..."
224$ call create_time_stamp_response "req2.tsq" "resp2.tsr" "tsa_config1"
225$
226$ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..."
227$ call time_stamp_response_token_test "req2.tsq" "resp2.tsr"
228$
229$ write sys$output "Printing response..."
230$ call print_response "resp2.tsr"
231$
232$ write sys$output "Verifying valid response..."
233$ call verify_time_stamp_response "req2.tsq" "resp2.tsr" "[-]testtsa.com"
234$
235$ write sys$output "Verifying response against wrong request, it should fail..."
236$ call verify_time_stamp_response_fail "req1.tsq" "resp2.tsr"
237$
238$ write sys$output "Verifying response against wrong request, it should fail..."
239$ call verify_time_stamp_response_fail "req2.tsq" "resp1.tsr"
240$
241$ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..."
242$ call create_time_stamp_request3
243$
244$ write sys$output "Printing req3.req..."
245$ call print_request "req3.tsq"
246$
247$ write sys$output "Verifying response against wrong request, it should fail..."
248$ call verify_time_stamp_response_fail "req3.tsq" "resp1.tsr"
249$
250$ write sys$output "Cleaning up..."
251$ call clean_up_dir
252$
253$ set on
254$
255$ exit
diff --git a/src/lib/libssl/test/tpkcs7.com b/src/lib/libssl/test/tpkcs7.com
deleted file mode 100644
index 3fc4982bb0..0000000000
--- a/src/lib/libssl/test/tpkcs7.com
+++ /dev/null
@@ -1,59 +0,0 @@
1$! TPKCS7.COM -- Tests pkcs7 keys
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p2 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$
12$ cmd = "mcr ''exe_dir'openssl pkcs7"
13$
14$ t = "testp7.pem"
15$ if p1 .nes. "" then t = p1
16$
17$ write sys$output "testing PKCS7 conversions"
18$ if f$search("fff.*") .nes "" then delete fff.*;*
19$ if f$search("ff.*") .nes "" then delete ff.*;*
20$ if f$search("f.*") .nes "" then delete f.*;*
21$ convert/fdl=sys$input: 't' fff.p
22RECORD
23 FORMAT STREAM_LF
24$
25$ write sys$output "p -> d"
26$ 'cmd' -in fff.p -inform p -outform d -out f.d
27$ if $severity .ne. 1 then exit 3
28$ write sys$output "p -> p"
29$ 'cmd' -in fff.p -inform p -outform p -out f.p
30$ if $severity .ne. 1 then exit 3
31$
32$ write sys$output "d -> d"
33$ 'cmd' -in f.d -inform d -outform d -out ff.d1
34$ if $severity .ne. 1 then exit 3
35$ write sys$output "p -> d"
36$ 'cmd' -in f.p -inform p -outform d -out ff.d3
37$ if $severity .ne. 1 then exit 3
38$
39$
40$ write sys$output "d -> p"
41$ 'cmd' -in f.d -inform d -outform p -out ff.p1
42$ if $severity .ne. 1 then exit 3
43$ write sys$output "p -> p"
44$ 'cmd' -in f.p -inform p -outform p -out ff.p3
45$ if $severity .ne. 1 then exit 3
46$
47$ backup/compare fff.p f.p
48$ if $severity .ne. 1 then exit 3
49$ backup/compare fff.p ff.p1
50$ if $severity .ne. 1 then exit 3
51$ backup/compare fff.p ff.p3
52$ if $severity .ne. 1 then exit 3
53$
54$ backup/compare f.p ff.p1
55$ if $severity .ne. 1 then exit 3
56$ backup/compare f.p ff.p3
57$ if $severity .ne. 1 then exit 3
58$
59$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/src/lib/libssl/test/tpkcs7d.com b/src/lib/libssl/test/tpkcs7d.com
deleted file mode 100644
index eea8c888ee..0000000000
--- a/src/lib/libssl/test/tpkcs7d.com
+++ /dev/null
@@ -1,52 +0,0 @@
1$! TPKCS7.COM -- Tests pkcs7 keys
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p2 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$
12$ cmd = "mcr ''exe_dir'openssl pkcs7"
13$
14$ t = "pkcs7-1.pem"
15$ if p1 .nes. "" then t = p1
16$
17$ write sys$output "testing PKCS7 conversions (2)"
18$ if f$search("fff.*") .nes "" then delete fff.*;*
19$ if f$search("ff.*") .nes "" then delete ff.*;*
20$ if f$search("f.*") .nes "" then delete f.*;*
21$ convert/fdl=sys$input: 't' fff.p
22RECORD
23 FORMAT STREAM_LF
24$
25$ write sys$output "p -> d"
26$ 'cmd' -in fff.p -inform p -outform d -out f.d
27$ if $severity .ne. 1 then exit 3
28$ write sys$output "p -> p"
29$ 'cmd' -in fff.p -inform p -outform p -out f.p
30$ if $severity .ne. 1 then exit 3
31$
32$ write sys$output "d -> d"
33$ 'cmd' -in f.d -inform d -outform d -out ff.d1
34$ if $severity .ne. 1 then exit 3
35$ write sys$output "p -> d"
36$ 'cmd' -in f.p -inform p -outform d -out ff.d3
37$ if $severity .ne. 1 then exit 3
38$
39$
40$ write sys$output "d -> p"
41$ 'cmd' -in f.d -inform d -outform p -out ff.p1
42$ if $severity .ne. 1 then exit 3
43$ write sys$output "p -> p"
44$ 'cmd' -in f.p -inform p -outform p -out ff.p3
45$ if $severity .ne. 1 then exit 3
46$
47$ backup/compare f.p ff.p1
48$ if $severity .ne. 1 then exit 3
49$ backup/compare f.p ff.p3
50$ if $severity .ne. 1 then exit 3
51$
52$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/src/lib/libssl/test/treq.com b/src/lib/libssl/test/treq.com
deleted file mode 100644
index acf08b79ef..0000000000
--- a/src/lib/libssl/test/treq.com
+++ /dev/null
@@ -1,88 +0,0 @@
1$! TREQ.COM -- Tests req keys
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p2 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$
12$ cmd = "mcr ''exe_dir'openssl req -config [-.apps]openssl-vms.cnf"
13$
14$ t = "testreq.pem"
15$ if p1 .nes. "" then t = p1
16$
17$ write sys$output "testing req conversions"
18$ if f$search("fff.*") .nes "" then delete fff.*;*
19$ if f$search("ff.*") .nes "" then delete ff.*;*
20$ if f$search("f.*") .nes "" then delete f.*;*
21$ convert/fdl=sys$input: 't' fff.p
22RECORD
23 FORMAT STREAM_LF
24$
25$ write sys$output "p -> d"
26$ 'cmd' -in fff.p -inform p -outform d -out f.d
27$ if $severity .ne. 1 then exit 3
28$! write sys$output "p -> t"
29$! 'cmd' -in fff.p -inform p -outform t -out f.t
30$! if $severity .ne. 1 then exit 3
31$ write sys$output "p -> p"
32$ 'cmd' -in fff.p -inform p -outform p -out f.p
33$ if $severity .ne. 1 then exit 3
34$
35$ write sys$output "d -> d"
36$ 'cmd' -verify -in f.d -inform d -outform d -out ff.d1
37$ if $severity .ne. 1 then exit 3
38$! write sys$output "t -> d"
39$! 'cmd' -verify -in f.t -inform t -outform d -out ff.d2
40$! if $severity .ne. 1 then exit 3
41$ write sys$output "p -> d"
42$ 'cmd' -verify -in f.p -inform p -outform d -out ff.d3
43$ if $severity .ne. 1 then exit 3
44$
45$! write sys$output "d -> t"
46$! 'cmd' -in f.d -inform d -outform t -out ff.t1
47$! if $severity .ne. 1 then exit 3
48$! write sys$output "t -> t"
49$! 'cmd' -in f.t -inform t -outform t -out ff.t2
50$! if $severity .ne. 1 then exit 3
51$! write sys$output "p -> t"
52$! 'cmd' -in f.p -inform p -outform t -out ff.t3
53$! if $severity .ne. 1 then exit 3
54$
55$ write sys$output "d -> p"
56$ 'cmd' -in f.d -inform d -outform p -out ff.p1
57$ if $severity .ne. 1 then exit 3
58$! write sys$output "t -> p"
59$! 'cmd' -in f.t -inform t -outform p -out ff.p2
60$! if $severity .ne. 1 then exit 3
61$ write sys$output "p -> p"
62$ 'cmd' -in f.p -inform p -outform p -out ff.p3
63$ if $severity .ne. 1 then exit 3
64$
65$ backup/compare fff.p f.p
66$ if $severity .ne. 1 then exit 3
67$ backup/compare fff.p ff.p1
68$ if $severity .ne. 1 then exit 3
69$! backup/compare fff.p ff.p2
70$! if $severity .ne. 1 then exit 3
71$ backup/compare fff.p ff.p3
72$ if $severity .ne. 1 then exit 3
73$
74$! backup/compare f.t ff.t1
75$! if $severity .ne. 1 then exit 3
76$! backup/compare f.t ff.t2
77$! if $severity .ne. 1 then exit 3
78$! backup/compare f.t ff.t3
79$! if $severity .ne. 1 then exit 3
80$
81$ backup/compare f.p ff.p1
82$ if $severity .ne. 1 then exit 3
83$! backup/compare f.p ff.p2
84$! if $severity .ne. 1 then exit 3
85$ backup/compare f.p ff.p3
86$ if $severity .ne. 1 then exit 3
87$
88$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/src/lib/libssl/test/trsa.com b/src/lib/libssl/test/trsa.com
deleted file mode 100644
index 54180843ee..0000000000
--- a/src/lib/libssl/test/trsa.com
+++ /dev/null
@@ -1,99 +0,0 @@
1$! TRSA.COM -- Tests rsa keys
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p2 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$
12$ set noon
13$ define/user sys$output nla0:
14$ mcr 'exe_dir'openssl no-rsa
15$ save_severity=$SEVERITY
16$ set on
17$ if save_severity
18$ then
19$ write sys$output "skipping RSA conversion test"
20$ exit
21$ endif
22$
23$ cmd = "mcr ''exe_dir'openssl rsa"
24$
25$ t = "testrsa.pem"
26$ if p1 .nes. "" then t = p1
27$
28$ write sys$output "testing RSA conversions"
29$ if f$search("fff.*") .nes "" then delete fff.*;*
30$ if f$search("ff.*") .nes "" then delete ff.*;*
31$ if f$search("f.*") .nes "" then delete f.*;*
32$ convert/fdl=sys$input: 't' fff.p
33RECORD
34 FORMAT STREAM_LF
35$
36$ write sys$output "p -> d"
37$ 'cmd' -in fff.p -inform p -outform d -out f.d
38$ if $severity .ne. 1 then exit 3
39$! write sys$output "p -> t"
40$! 'cmd' -in fff.p -inform p -outform t -out f.t
41$! if $severity .ne. 1 then exit 3
42$ write sys$output "p -> p"
43$ 'cmd' -in fff.p -inform p -outform p -out f.p
44$ if $severity .ne. 1 then exit 3
45$
46$ write sys$output "d -> d"
47$ 'cmd' -in f.d -inform d -outform d -out ff.d1
48$ if $severity .ne. 1 then exit 3
49$! write sys$output "t -> d"
50$! 'cmd' -in f.t -inform t -outform d -out ff.d2
51$! if $severity .ne. 1 then exit 3
52$ write sys$output "p -> d"
53$ 'cmd' -in f.p -inform p -outform d -out ff.d3
54$ if $severity .ne. 1 then exit 3
55$
56$! write sys$output "d -> t"
57$! 'cmd' -in f.d -inform d -outform t -out ff.t1
58$! if $severity .ne. 1 then exit 3
59$! write sys$output "t -> t"
60$! 'cmd' -in f.t -inform t -outform t -out ff.t2
61$! if $severity .ne. 1 then exit 3
62$! write sys$output "p -> t"
63$! 'cmd' -in f.p -inform p -outform t -out ff.t3
64$! if $severity .ne. 1 then exit 3
65$
66$ write sys$output "d -> p"
67$ 'cmd' -in f.d -inform d -outform p -out ff.p1
68$ if $severity .ne. 1 then exit 3
69$! write sys$output "t -> p"
70$! 'cmd' -in f.t -inform t -outform p -out ff.p2
71$! if $severity .ne. 1 then exit 3
72$ write sys$output "p -> p"
73$ 'cmd' -in f.p -inform p -outform p -out ff.p3
74$ if $severity .ne. 1 then exit 3
75$
76$ backup/compare fff.p f.p
77$ if $severity .ne. 1 then exit 3
78$ backup/compare fff.p ff.p1
79$ if $severity .ne. 1 then exit 3
80$! backup/compare fff.p ff.p2
81$! if $severity .ne. 1 then exit 3
82$ backup/compare fff.p ff.p3
83$ if $severity .ne. 1 then exit 3
84$
85$! backup/compare f.t ff.t1
86$! if $severity .ne. 1 then exit 3
87$! backup/compare f.t ff.t2
88$! if $severity .ne. 1 then exit 3
89$! backup/compare f.t ff.t3
90$! if $severity .ne. 1 then exit 3
91$
92$ backup/compare f.p ff.p1
93$ if $severity .ne. 1 then exit 3
94$! backup/compare f.p ff.p2
95$! if $severity .ne. 1 then exit 3
96$ backup/compare f.p ff.p3
97$ if $severity .ne. 1 then exit 3
98$
99$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/src/lib/libssl/test/tsid.com b/src/lib/libssl/test/tsid.com
deleted file mode 100644
index b6c4e49473..0000000000
--- a/src/lib/libssl/test/tsid.com
+++ /dev/null
@@ -1,88 +0,0 @@
1$! TSID.COM -- Tests sid keys
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p2 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$
12$ cmd = "mcr ''exe_dir'openssl sess_id"
13$
14$ t = "testsid.pem"
15$ if p1 .nes. "" then t = p1
16$
17$ write sys$output "testing session-id conversions"
18$ if f$search("fff.*") .nes "" then delete fff.*;*
19$ if f$search("ff.*") .nes "" then delete ff.*;*
20$ if f$search("f.*") .nes "" then delete f.*;*
21$ convert/fdl=sys$input: 't' fff.p
22RECORD
23 FORMAT STREAM_LF
24$
25$ write sys$output "p -> d"
26$ 'cmd' -in fff.p -inform p -outform d -out f.d
27$ if $severity .ne. 1 then exit 3
28$! write sys$output "p -> t"
29$! 'cmd' -in fff.p -inform p -outform t -out f.t
30$! if $severity .ne. 1 then exit 3
31$ write sys$output "p -> p"
32$ 'cmd' -in fff.p -inform p -outform p -out f.p
33$ if $severity .ne. 1 then exit 3
34$
35$ write sys$output "d -> d"
36$ 'cmd' -in f.d -inform d -outform d -out ff.d1
37$ if $severity .ne. 1 then exit 3
38$! write sys$output "t -> d"
39$! 'cmd' -in f.t -inform t -outform d -out ff.d2
40$! if $severity .ne. 1 then exit 3
41$ write sys$output "p -> d"
42$ 'cmd' -in f.p -inform p -outform d -out ff.d3
43$ if $severity .ne. 1 then exit 3
44$
45$! write sys$output "d -> t"
46$! 'cmd' -in f.d -inform d -outform t -out ff.t1
47$! if $severity .ne. 1 then exit 3
48$! write sys$output "t -> t"
49$! 'cmd' -in f.t -inform t -outform t -out ff.t2
50$! if $severity .ne. 1 then exit 3
51$! write sys$output "p -> t"
52$! 'cmd' -in f.p -inform p -outform t -out ff.t3
53$! if $severity .ne. 1 then exit 3
54$
55$ write sys$output "d -> p"
56$ 'cmd' -in f.d -inform d -outform p -out ff.p1
57$ if $severity .ne. 1 then exit 3
58$! write sys$output "t -> p"
59$! 'cmd' -in f.t -inform t -outform p -out ff.p2
60$! if $severity .ne. 1 then exit 3
61$ write sys$output "p -> p"
62$ 'cmd' -in f.p -inform p -outform p -out ff.p3
63$ if $severity .ne. 1 then exit 3
64$
65$ backup/compare fff.p f.p
66$ if $severity .ne. 1 then exit 3
67$ backup/compare fff.p ff.p1
68$ if $severity .ne. 1 then exit 3
69$! backup/compare fff.p ff.p2
70$! if $severity .ne. 1 then exit 3
71$ backup/compare fff.p ff.p3
72$ if $severity .ne. 1 then exit 3
73$
74$! backup/compare f.t ff.t1
75$! if $severity .ne. 1 then exit 3
76$! backup/compare f.t ff.t2
77$! if $severity .ne. 1 then exit 3
78$! backup/compare f.t ff.t3
79$! if $severity .ne. 1 then exit 3
80$
81$ backup/compare f.p ff.p1
82$ if $severity .ne. 1 then exit 3
83$! backup/compare f.p ff.p2
84$! if $severity .ne. 1 then exit 3
85$ backup/compare f.p ff.p3
86$ if $severity .ne. 1 then exit 3
87$
88$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/src/lib/libssl/test/tverify.com b/src/lib/libssl/test/tverify.com
deleted file mode 100644
index d888344637..0000000000
--- a/src/lib/libssl/test/tverify.com
+++ /dev/null
@@ -1,65 +0,0 @@
1$! TVERIFY.COM
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p1 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ line_max = 255 ! Could be longer on modern non-VAX.
11$ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp"
12$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
13$ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'"
14$ cmd_len = f$length( cmd)
15$ pems = "[-.certs...]*.pem"
16$!
17$! Concatenate all the certificate files.
18$!
19$ copy /concatenate 'pems' 'temp_file_name'
20$!
21$! Loop through all the certificate files.
22$!
23$ args = ""
24$ old_f = ""
25$ loop_file:
26$ f = f$search( pems)
27$ if ((f .nes. "") .and. (f .nes. old_f))
28$ then
29$ old_f = f
30$!
31$! If this file name would over-extend the command line, then
32$! run the command now.
33$!
34$ if (cmd_len+ f$length( args)+ 1+ f$length( f) .gt. line_max)
35$ then
36$ if (args .eqs. "") then goto disaster
37$ 'cmd''args'
38$ args = ""
39$ endif
40$! Add the next file to the argument list.
41$ args = args+ " "+ f
42$ else
43$! No more files in the list
44$ goto loop_file_end
45$ endif
46$ goto loop_file
47$ loop_file_end:
48$!
49$! Run the command for any left-over arguments.
50$!
51$ if (args .nes. "")
52$ then
53$ 'cmd''args'
54$ endif
55$!
56$! Delete the temporary file.
57$!
58$ if (f$search( "''temp_file_name';*") .nes. "") then -
59 delete 'temp_file_name';*
60$!
61$ exit
62$!
63$ disaster:
64$ write sys$output " Command line too long. Doomed."
65$!
diff --git a/src/lib/libssl/test/tx509.com b/src/lib/libssl/test/tx509.com
deleted file mode 100644
index 93ce988b41..0000000000
--- a/src/lib/libssl/test/tx509.com
+++ /dev/null
@@ -1,88 +0,0 @@
1$! TX509.COM -- Tests x509 certificates
2$
3$ __arch = "VAX"
4$ if f$getsyi("cpu") .ge. 128 then -
5 __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
6$ if __arch .eqs. "" then __arch = "UNK"
7$!
8$ if (p2 .eqs. "64") then __arch = __arch+ "_64"
9$!
10$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
11$
12$ cmd = "mcr ''exe_dir'openssl x509"
13$
14$ t = "testx509.pem"
15$ if p1 .nes. "" then t = p1
16$
17$ write sys$output "testing X509 conversions"
18$ if f$search("fff.*") .nes "" then delete fff.*;*
19$ if f$search("ff.*") .nes "" then delete ff.*;*
20$ if f$search("f.*") .nes "" then delete f.*;*
21$ convert/fdl=sys$input: 't' fff.p
22RECORD
23 FORMAT STREAM_LF
24$
25$ write sys$output "p -> d"
26$ 'cmd' -in fff.p -inform p -outform d -out f.d
27$ if $severity .ne. 1 then exit 3
28$ write sys$output "p -> n"
29$ 'cmd' -in fff.p -inform p -outform n -out f.n
30$ if $severity .ne. 1 then exit 3
31$ write sys$output "p -> p"
32$ 'cmd' -in fff.p -inform p -outform p -out f.p
33$ if $severity .ne. 1 then exit 3
34$
35$ write sys$output "d -> d"
36$ 'cmd' -in f.d -inform d -outform d -out ff.d1
37$ if $severity .ne. 1 then exit 3
38$ write sys$output "n -> d"
39$ 'cmd' -in f.n -inform n -outform d -out ff.d2
40$ if $severity .ne. 1 then exit 3
41$ write sys$output "p -> d"
42$ 'cmd' -in f.p -inform p -outform d -out ff.d3
43$ if $severity .ne. 1 then exit 3
44$
45$ write sys$output "d -> n"
46$ 'cmd' -in f.d -inform d -outform n -out ff.n1
47$ if $severity .ne. 1 then exit 3
48$ write sys$output "n -> n"
49$ 'cmd' -in f.n -inform n -outform n -out ff.n2
50$ if $severity .ne. 1 then exit 3
51$ write sys$output "p -> n"
52$ 'cmd' -in f.p -inform p -outform n -out ff.n3
53$ if $severity .ne. 1 then exit 3
54$
55$ write sys$output "d -> p"
56$ 'cmd' -in f.d -inform d -outform p -out ff.p1
57$ if $severity .ne. 1 then exit 3
58$ write sys$output "n -> p"
59$ 'cmd' -in f.n -inform n -outform p -out ff.p2
60$ if $severity .ne. 1 then exit 3
61$ write sys$output "p -> p"
62$ 'cmd' -in f.p -inform p -outform p -out ff.p3
63$ if $severity .ne. 1 then exit 3
64$
65$ backup/compare fff.p f.p
66$ if $severity .ne. 1 then exit 3
67$ backup/compare fff.p ff.p1
68$ if $severity .ne. 1 then exit 3
69$ backup/compare fff.p ff.p2
70$ if $severity .ne. 1 then exit 3
71$ backup/compare fff.p ff.p3
72$ if $severity .ne. 1 then exit 3
73$
74$ backup/compare f.n ff.n1
75$ if $severity .ne. 1 then exit 3
76$ backup/compare f.n ff.n2
77$ if $severity .ne. 1 then exit 3
78$ backup/compare f.n ff.n3
79$ if $severity .ne. 1 then exit 3
80$
81$ backup/compare f.p ff.p1
82$ if $severity .ne. 1 then exit 3
83$ backup/compare f.p ff.p2
84$ if $severity .ne. 1 then exit 3
85$ backup/compare f.p ff.p3
86$ if $severity .ne. 1 then exit 3
87$
88$ delete f.*;*,ff.*;*,fff.*;*