diff options
Diffstat (limited to 'src/lib/libssl/test')
| -rw-r--r-- | src/lib/libssl/test/bctest.com | 152 | ||||
| -rw-r--r-- | src/lib/libssl/test/bntest.com | 76 | ||||
| -rwxr-xr-x | src/lib/libssl/test/clean_test.com | 35 | ||||
| -rw-r--r-- | src/lib/libssl/test/maketests.com | 309 | ||||
| -rw-r--r-- | src/lib/libssl/test/tcrl.com | 13 | ||||
| -rw-r--r-- | src/lib/libssl/test/testca.com | 8 | ||||
| -rw-r--r-- | src/lib/libssl/test/testenc.com | 13 | ||||
| -rw-r--r-- | src/lib/libssl/test/testgen.com | 22 | ||||
| -rw-r--r-- | src/lib/libssl/test/tests.com | 167 | ||||
| -rw-r--r-- | src/lib/libssl/test/testss.com | 17 | ||||
| -rw-r--r-- | src/lib/libssl/test/testssl.com | 26 | ||||
| -rw-r--r-- | src/lib/libssl/test/testtsa.com | 65 | ||||
| -rw-r--r-- | src/lib/libssl/test/tpkcs7.com | 13 | ||||
| -rw-r--r-- | src/lib/libssl/test/tpkcs7d.com | 13 | ||||
| -rw-r--r-- | src/lib/libssl/test/treq.com | 13 | ||||
| -rw-r--r-- | src/lib/libssl/test/trsa.com | 13 | ||||
| -rw-r--r-- | src/lib/libssl/test/tsid.com | 13 | ||||
| -rw-r--r-- | src/lib/libssl/test/tverify.com | 10 | ||||
| -rw-r--r-- | src/lib/libssl/test/tx509.com | 13 |
19 files changed, 762 insertions, 229 deletions
diff --git a/src/lib/libssl/test/bctest.com b/src/lib/libssl/test/bctest.com new file mode 100644 index 0000000000..d7e5ec139e --- /dev/null +++ b/src/lib/libssl/test/bctest.com | |||
| @@ -0,0 +1,152 @@ | |||
| 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 | ||
| 23 | obase=16 | ||
| 24 | ibase=16 | ||
| 25 | a=AD88C418F31B3FC712D0425001D522B3AE9134FF3A98C13C1FCC1682211195406C1A6C66C6A\ | ||
| 26 | CEEC1A0EC16950233F77F1C2F2363D56DD71A36C57E0B2511FC4BA8F22D261FE2E9356D99AF57\ | ||
| 27 | 10F3817C0E05BF79C423C3F66FDF321BE8D3F18F625D91B670931C1EF25F28E489BDA1C5422D1\ | ||
| 28 | C3F6F7A1AD21585746ECC4F10A14A778AF56F08898E965E9909E965E0CB6F85B514150C644759\ | ||
| 29 | 3BE731877B16EA07B552088FF2EA728AC5E0FF3A23EB939304519AB8B60F2C33D6BA0945B66F0\ | ||
| 30 | 4FC3CADF855448B24A9D7640BCF473E | ||
| 31 | b=DCE91E7D120B983EA9A104B5A96D634DD644C37657B1C7860B45E6838999B3DCE5A555583C6\ | ||
| 32 | 9209E41F413422954175A06E67FFEF6746DD652F0F48AEFECC3D8CAC13523BDAAD3F5AF4212BD\ | ||
| 33 | 8B3CD64126E1A82E190228020C05B91C8B141F1110086FC2A4C6ED631EBA129D04BB9A19FC53D\ | ||
| 34 | 3ED0E2017D60A68775B75481449 | ||
| 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 | ||
| 54 | obase=16 | ||
| 55 | ibase=16 | ||
| 56 | -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4AEC6F15AC177F176F2274D2\ | ||
| 57 | 9DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7F5ADFACEE54573F5D256A06\ | ||
| 58 | 11B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99FB9812A0E4A5773D8B254117\ | ||
| 59 | 1239157EC6E3D8D50199 * -FFDD63BA1A4648F0D804F8A1C66C53F0D2110590E8A3907EC73B4\ | ||
| 60 | AEC6F15AC177F176F2274D29DC8022EA0D7DD3ABE9746D2D46DD3EA5B5F6F69DF12877E0AC5E7\ | ||
| 61 | F5ADFACEE54573F5D256A0611B5D2BC24947724E22AE4EC3FB0C39D9B4694A01AFE5E43B4D99F\ | ||
| 62 | B9812A0E4A5773D8B2541171239157EC6E3D8D50199 - FFBACC221682DA464B6D7F123482522\ | ||
| 63 | 02EDAEDCA38C3B69E9B7BBCD6165A9CD8716C4903417F23C09A85B851961F92C217258CEEB866\ | ||
| 64 | 85EFCC5DD131853A02C07A873B8E2AF2E40C6D5ED598CD0E8F35AD49F3C3A17FDB7653E4E2DC4\ | ||
| 65 | A8D23CC34686EE4AD01F7407A7CD74429AC6D36DBF0CB6A3E302D0E5BDFCD048A3B90C1BE5AA8\ | ||
| 66 | E16C3D5884F9136B43FF7BB443764153D4AEC176C681B078F4CC53D6EB6AB76285537DDEE7C18\ | ||
| 67 | 8C72441B52EDBDDBC77E02D34E513F2AABF92F44109CAFE8242BD0ECBAC5604A94B02EA44D43C\ | ||
| 68 | 04E9476E6FBC48043916BFA1485C6093603600273C9C33F13114D78064AE42F3DC466C7DA543D\ | ||
| 69 | 89C8D71 | ||
| 70 | AD534AFBED2FA39EE9F40E20FCF9E2C861024DB98DDCBA1CD118C49CA55EEBC20D6BA51B2271C\ | ||
| 71 | 928B693D6A73F67FEB1B4571448588B46194617D25D910C6A9A130CC963155CF34079CB218A44\ | ||
| 72 | 8A1F57E276D92A33386DDCA3D241DB78C8974ABD71DD05B0FA555709C9910D745185E6FE108E3\ | ||
| 73 | 37F1907D0C56F8BFBF52B9704 % -E557905B56B13441574CAFCE2BD257A750B1A8B2C88D0E36\ | ||
| 74 | E18EF7C38DAC80D3948E17ED63AFF3B3467866E3B89D09A81B3D16B52F6A3C7134D3C6F5123E9\ | ||
| 75 | F617E3145BBFBE9AFD0D6E437EA4FF6F04BC67C4F1458B4F0F47B64 - 1C2BBBB19B74E86FD32\ | ||
| 76 | 9E8DB6A8C3B1B9986D57ED5419C2E855F7D5469E35E76334BB42F4C43E3F3A31B9697C171DAC4\ | ||
| 77 | D97935A7E1A14AD209D6CF811F55C6DB83AA9E6DFECFCD6669DED7171EE22A40C6181615CAF3F\ | ||
| 78 | 5296964 | ||
| 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 | ||
| 97 | print "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 new file mode 100644 index 0000000000..6545d2e5a5 --- /dev/null +++ b/src/lib/libssl/test/bntest.com | |||
| @@ -0,0 +1,76 @@ | |||
| 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 new file mode 100755 index 0000000000..7df633fbef --- /dev/null +++ b/src/lib/libssl/test/clean_test.com | |||
| @@ -0,0 +1,35 @@ | |||
| 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 index ca072f1d11..386e5cf3c1 100644 --- a/src/lib/libssl/test/maketests.com +++ b/src/lib/libssl/test/maketests.com | |||
| @@ -25,7 +25,7 @@ $! VAXC For VAX C. | |||
| 25 | $! DECC For DEC C. | 25 | $! DECC For DEC C. |
| 26 | $! GNUC For GNU C. | 26 | $! GNUC For GNU C. |
| 27 | $! | 27 | $! |
| 28 | $! If you don't speficy a compiler, it will try to determine which | 28 | $! If you don't specify a compiler, it will try to determine which |
| 29 | $! "C" compiler to use. | 29 | $! "C" compiler to use. |
| 30 | $! | 30 | $! |
| 31 | $! P3, if defined, sets a TCP/IP library to use, through one of the following | 31 | $! P3, if defined, sets a TCP/IP library to use, through one of the following |
| @@ -37,46 +37,87 @@ $! | |||
| 37 | $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) | 37 | $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) |
| 38 | $! | 38 | $! |
| 39 | $! | 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 | $! | ||
| 40 | $! Define A TCP/IP Library That We Will Need To Link To. | 62 | $! Define A TCP/IP Library That We Will Need To Link To. |
| 41 | $! (That is, If Wee Need To Link To One.) | 63 | $! (That is, If We Need To Link To One.) |
| 42 | $! | 64 | $! |
| 43 | $ TCPIP_LIB = "" | 65 | $ TCPIP_LIB = "" |
| 66 | $ ZLIB_LIB = "" | ||
| 44 | $! | 67 | $! |
| 45 | $! Check Which Architecture We Are Using. | 68 | $! Check Which Architecture We Are Using. |
| 46 | $! | 69 | $! |
| 47 | $ if (f$getsyi( "HW_MODEL") .lt. 1024) | 70 | $ if (f$getsyi( "cpu") .lt. 128) |
| 48 | $ then | 71 | $ then |
| 49 | $ arch = "VAX" | 72 | $ ARCH = "VAX" |
| 50 | $ else | 73 | $ else |
| 51 | $ arch = "" | 74 | $ ARCH = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 52 | $ arch = arch+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 75 | $ if (ARCH .eqs. "") then ARCH = "UNK" |
| 53 | $ if (arch .eqs. "") then arch = "UNK" | ||
| 54 | $ endif | 76 | $ endif |
| 55 | $! | 77 | $! |
| 56 | $! Define The OBJ and EXE Directories (EXE before CHECK_OPTIONS). | 78 | $ ARCHD = ARCH |
| 57 | $! | 79 | $ LIB32 = "32" |
| 58 | $ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.TEST] | 80 | $ OPT_FILE = "" |
| 59 | $ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.TEST] | 81 | $ POINTER_SIZE = "" |
| 60 | $! | 82 | $! |
| 61 | $! Check To Make Sure We Have Valid Command Line Parameters. | 83 | $! Check To Make Sure We Have Valid Command Line Parameters. |
| 62 | $! | 84 | $! |
| 63 | $ GOSUB CHECK_OPTIONS | 85 | $ GOSUB CHECK_OPTIONS |
| 64 | $! | 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 | $! | ||
| 65 | $! Initialise logical names and such | 106 | $! Initialise logical names and such |
| 66 | $! | 107 | $! |
| 67 | $ GOSUB INITIALISE | 108 | $ GOSUB INITIALISE |
| 68 | $! | 109 | $! |
| 69 | $! Tell The User What Kind of Machine We Run On. | 110 | $! Tell The User What Kind of Machine We Run On. |
| 70 | $! | 111 | $! |
| 71 | $ WRITE SYS$OUTPUT "Compiling On ''ARCH'." | 112 | $ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" |
| 72 | $! | 113 | $! |
| 73 | $! Define The CRYPTO-LIB We Are To Use. | 114 | $! Define The CRYPTO-LIB We Are To Use. |
| 74 | $! | 115 | $! |
| 75 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB | 116 | $ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB |
| 76 | $! | 117 | $! |
| 77 | $! Define The SSL We Are To Use. | 118 | $! Define The SSL We Are To Use. |
| 78 | $! | 119 | $! |
| 79 | $ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB | 120 | $ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB |
| 80 | $! | 121 | $! |
| 81 | $! Create the OBJ and EXE Directories, if needed. | 122 | $! Create the OBJ and EXE Directories, if needed. |
| 82 | $! | 123 | $! |
| @@ -105,7 +146,7 @@ $ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ - | |||
| 105 | "MDC2TEST,RMDTEST,"+ - | 146 | "MDC2TEST,RMDTEST,"+ - |
| 106 | "RANDTEST,DHTEST,ENGINETEST,"+ - | 147 | "RANDTEST,DHTEST,ENGINETEST,"+ - |
| 107 | "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ - | 148 | "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ - |
| 108 | "EVP_TEST,JPAKETEST" | 149 | "EVP_TEST,IGETEST,JPAKETEST,ASN1TEST" |
| 109 | $! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well? | 150 | $! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well? |
| 110 | $! | 151 | $! |
| 111 | $! Additional directory information. | 152 | $! Additional directory information. |
| @@ -139,8 +180,9 @@ $ T_D_EXPTEST := [-.crypto.bn] | |||
| 139 | $ T_D_DSATEST := [-.crypto.dsa] | 180 | $ T_D_DSATEST := [-.crypto.dsa] |
| 140 | $ T_D_RSA_TEST := [-.crypto.rsa] | 181 | $ T_D_RSA_TEST := [-.crypto.rsa] |
| 141 | $ T_D_EVP_TEST := [-.crypto.evp] | 182 | $ T_D_EVP_TEST := [-.crypto.evp] |
| 142 | $ T_D_JPAKETEST := [-.crypto.jpake] | ||
| 143 | $ T_D_IGETEST := [-.test] | 183 | $ T_D_IGETEST := [-.test] |
| 184 | $ T_D_JPAKETEST := [-.crypto.jpake] | ||
| 185 | $ T_D_ASN1TEST := [-.test] | ||
| 144 | $! | 186 | $! |
| 145 | $ TCPIP_PROGRAMS = ",," | 187 | $ TCPIP_PROGRAMS = ",," |
| 146 | $ IF COMPILER .EQS. "VAXC" THEN - | 188 | $ IF COMPILER .EQS. "VAXC" THEN - |
| @@ -223,33 +265,15 @@ $! | |||
| 223 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. | 265 | $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. |
| 224 | $! Check To See If We Are To Link With A Specific TCP/IP Library. | 266 | $! Check To See If We Are To Link With A Specific TCP/IP Library. |
| 225 | $! | 267 | $! |
| 226 | $ IF (TCPIP_LIB.NES."") | ||
| 227 | $ THEN | ||
| 228 | $! | ||
| 229 | $! Don't Link With The RSAREF Routines And TCP/IP Library. | 268 | $! Don't Link With The RSAREF Routines And TCP/IP Library. |
| 230 | $! | 269 | $! |
| 231 | $ LINK /'DEBUGGER' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' - | 270 | $ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' - |
| 232 | 'OBJECT_FILE', - | 271 | 'OBJECT_FILE', - |
| 233 | 'SSL_LIB' /LIBRARY, - | 272 | 'SSL_LIB' /LIBRARY, - |
| 234 | 'CRYPTO_LIB' /LIBRARY, - | 273 | 'CRYPTO_LIB' /LIBRARY - |
| 235 | 'TCPIP_LIB', - | 274 | 'TCPIP_LIB' - |
| 236 | 'OPT_FILE' /OPTIONS | 275 | 'ZLIB_LIB' - |
| 237 | $! | 276 | ,'OPT_FILE' /OPTIONS |
| 238 | $! Else... | ||
| 239 | $! | ||
| 240 | $ ELSE | ||
| 241 | $! | ||
| 242 | $! Don't Link With The RSAREF Routines And Link With A TCP/IP Library. | ||
| 243 | $! | ||
| 244 | $ LINK /'DEBUGGER' /'TRACEBACK' /EXECUTABLE = 'EXE_FILE' - | ||
| 245 | 'OBJECT_FILE', - | ||
| 246 | 'SSL_LIB' /LIBRARY, - | ||
| 247 | 'CRYPTO_LIB' /LIBRARY, - | ||
| 248 | 'OPT_FILE' /OPTIONS | ||
| 249 | $! | ||
| 250 | $! End The TCP/IP Library Check. | ||
| 251 | $! | ||
| 252 | $ ENDIF | ||
| 253 | $! | 277 | $! |
| 254 | $! Go Back And Do It Again. | 278 | $! Go Back And Do It Again. |
| 255 | $! | 279 | $! |
| @@ -313,7 +337,7 @@ $! | |||
| 313 | $ CREATE 'OPT_FILE' | 337 | $ CREATE 'OPT_FILE' |
| 314 | $DECK | 338 | $DECK |
| 315 | ! | 339 | ! |
| 316 | ! Default System Options File To Link Agianst | 340 | ! Default System Options File To Link Against |
| 317 | ! The Sharable C Runtime Library. | 341 | ! The Sharable C Runtime Library. |
| 318 | ! | 342 | ! |
| 319 | GNU_CC:[000000]GCCLIB.OLB /LIBRARY | 343 | GNU_CC:[000000]GCCLIB.OLB /LIBRARY |
| @@ -348,7 +372,7 @@ $! | |||
| 348 | $ CREATE 'OPT_FILE' | 372 | $ CREATE 'OPT_FILE' |
| 349 | $DECK | 373 | $DECK |
| 350 | ! | 374 | ! |
| 351 | ! Default System Options File To Link Agianst | 375 | ! Default System Options File To Link Against |
| 352 | ! The Sharable DEC C Runtime Library. | 376 | ! The Sharable DEC C Runtime Library. |
| 353 | ! | 377 | ! |
| 354 | SYS$SHARE:DECC$SHR.EXE /SHAREABLE | 378 | SYS$SHARE:DECC$SHR.EXE /SHAREABLE |
| @@ -363,7 +387,7 @@ $! | |||
| 363 | $ CREATE 'OPT_FILE' | 387 | $ CREATE 'OPT_FILE' |
| 364 | $DECK | 388 | $DECK |
| 365 | ! | 389 | ! |
| 366 | ! Default System Options File For non-VAX To Link Agianst | 390 | ! Default System Options File For non-VAX To Link Against |
| 367 | ! The Sharable C Runtime Library. | 391 | ! The Sharable C Runtime Library. |
| 368 | ! | 392 | ! |
| 369 | SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE | 393 | SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE |
| @@ -442,19 +466,24 @@ $! Check The User's Options. | |||
| 442 | $! | 466 | $! |
| 443 | $ CHECK_OPTIONS: | 467 | $ CHECK_OPTIONS: |
| 444 | $! | 468 | $! |
| 469 | $! Set basic C compiler /INCLUDE directories. | ||
| 470 | $! | ||
| 471 | $ CC_INCLUDES = "SYS$DISK:[-],SYS$DISK:[-.CRYPTO]" | ||
| 472 | $! | ||
| 445 | $! Check To See If P1 Is Blank. | 473 | $! Check To See If P1 Is Blank. |
| 446 | $! | 474 | $! |
| 447 | $ IF (P1.EQS."NODEBUG") | 475 | $ IF (P1.EQS."NODEBUG") |
| 448 | $ THEN | 476 | $ THEN |
| 449 | $! | 477 | $! |
| 450 | $! P1 Is NODEBUG, So Compile Without Debugger Information. | 478 | $! P1 Is NODEBUG, So Compile Without Debugger Information. |
| 451 | $! | 479 | $! |
| 452 | $ DEBUGGER = "NODEBUG" | 480 | $ DEBUGGER = "NODEBUG" |
| 453 | $ TRACEBACK = "NOTRACEBACK" | 481 | $ LINKMAP = "NOMAP" |
| 454 | $ GCC_OPTIMIZE = "OPTIMIZE" | 482 | $ TRACEBACK = "NOTRACEBACK" |
| 455 | $ CC_OPTIMIZE = "OPTIMIZE" | 483 | $ GCC_OPTIMIZE = "OPTIMIZE" |
| 456 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." | 484 | $ CC_OPTIMIZE = "OPTIMIZE" |
| 457 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | 485 | $ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." |
| 486 | $ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." | ||
| 458 | $! | 487 | $! |
| 459 | $! Else... | 488 | $! Else... |
| 460 | $! | 489 | $! |
| @@ -468,6 +497,7 @@ $! | |||
| 468 | $! Compile With Debugger Information. | 497 | $! Compile With Debugger Information. |
| 469 | $! | 498 | $! |
| 470 | $ DEBUGGER = "DEBUG" | 499 | $ DEBUGGER = "DEBUG" |
| 500 | $ LINKMAP = "MAP" | ||
| 471 | $ TRACEBACK = "TRACEBACK" | 501 | $ TRACEBACK = "TRACEBACK" |
| 472 | $ GCC_OPTIMIZE = "NOOPTIMIZE" | 502 | $ GCC_OPTIMIZE = "NOOPTIMIZE" |
| 473 | $ CC_OPTIMIZE = "NOOPTIMIZE" | 503 | $ CC_OPTIMIZE = "NOOPTIMIZE" |
| @@ -478,7 +508,7 @@ $! Else... | |||
| 478 | $! | 508 | $! |
| 479 | $ ELSE | 509 | $ ELSE |
| 480 | $! | 510 | $! |
| 481 | $! Tell The User Entered An Invalid Option.. | 511 | $! Tell The User Entered An Invalid Option. |
| 482 | $! | 512 | $! |
| 483 | $ WRITE SYS$OUTPUT "" | 513 | $ WRITE SYS$OUTPUT "" |
| 484 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" | 514 | $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" |
| @@ -491,11 +521,87 @@ $! Time To EXIT. | |||
| 491 | $! | 521 | $! |
| 492 | $ EXIT | 522 | $ EXIT |
| 493 | $! | 523 | $! |
| 494 | $! End The Valid Arguement Check. | 524 | $! End The Valid Argument Check. |
| 525 | $! | ||
| 526 | $ ENDIF | ||
| 527 | $! | ||
| 528 | $! End The P1 Check. | ||
| 529 | $! | ||
| 530 | $ ENDIF | ||
| 531 | $! | ||
| 532 | $! Check P5 (POINTER_SIZE). | ||
| 533 | $! | ||
| 534 | $ IF (P5 .NES. "") .AND. (ARCH .NES. "VAX") | ||
| 535 | $ THEN | ||
| 536 | $! | ||
| 537 | $ IF (P5 .EQS. "32") | ||
| 538 | $ THEN | ||
| 539 | $ POINTER_SIZE = " /POINTER_SIZE=32" | ||
| 540 | $ ELSE | ||
| 541 | $ POINTER_SIZE = F$EDIT( P5, "COLLAPSE, UPCASE") | ||
| 542 | $ IF ((POINTER_SIZE .EQS. "64") .OR. - | ||
| 543 | (POINTER_SIZE .EQS. "64=") .OR. - | ||
| 544 | (POINTER_SIZE .EQS. "64=ARGV")) | ||
| 545 | $ THEN | ||
| 546 | $ ARCHD = ARCH+ "_64" | ||
| 547 | $ LIB32 = "" | ||
| 548 | $ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=") | ||
| 549 | $ THEN | ||
| 550 | $! Explicit user choice: "64" or "64=ARGV". | ||
| 551 | $ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64" | ||
| 552 | $ ELSE | ||
| 553 | $ SET NOON | ||
| 554 | $ DEFINE /USER_MODE SYS$OUTPUT NL: | ||
| 555 | $ DEFINE /USER_MODE SYS$ERROR NL: | ||
| 556 | $ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL: | ||
| 557 | $ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000 | ||
| 558 | $ THEN | ||
| 559 | $ ! If we got here, it means DCL complained like this: | ||
| 560 | $ ! %DCL-W-NOVALU, value not allowed - remove value specification | ||
| 561 | $ ! \64=\ | ||
| 562 | $ ! | ||
| 563 | $ ! If the compiler was run, logicals defined in /USER would | ||
| 564 | $ ! have been deassigned automatically. However, when DCL | ||
| 565 | $ ! complains, they aren't, so we do it here (it might be | ||
| 566 | $ ! unnecessary, but just in case there will be another error | ||
| 567 | $ ! message further on that we don't want to miss) | ||
| 568 | $ DEASSIGN /USER_MODE SYS$ERROR | ||
| 569 | $ DEASSIGN /USER_MODE SYS$OUTPUT | ||
| 570 | $ ELSE | ||
| 571 | $ POINTER_SIZE = POINTER_SIZE + "=ARGV" | ||
| 572 | $ ENDIF | ||
| 573 | $ SET ON | ||
| 574 | $ ENDIF | ||
| 575 | $ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'" | ||
| 576 | $ ELSE | ||
| 577 | $! | ||
| 578 | $! Tell The User Entered An Invalid Option. | ||
| 579 | $! | ||
| 580 | $ WRITE SYS$OUTPUT "" | ||
| 581 | $ WRITE SYS$OUTPUT "The Option ", P5, - | ||
| 582 | " Is Invalid. The Valid Options Are:" | ||
| 583 | $ WRITE SYS$OUTPUT "" | ||
| 584 | $ WRITE SYS$OUTPUT - | ||
| 585 | " """" : Compile with default (short) pointers." | ||
| 586 | $ WRITE SYS$OUTPUT - | ||
| 587 | " 32 : Compile with 32-bit (short) pointers." | ||
| 588 | $ WRITE SYS$OUTPUT - | ||
| 589 | " 64 : Compile with 64-bit (long) pointers (auto ARGV)." | ||
| 590 | $ WRITE SYS$OUTPUT - | ||
| 591 | " 64= : Compile with 64-bit (long) pointers (no ARGV)." | ||
| 592 | $ WRITE SYS$OUTPUT - | ||
| 593 | " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)." | ||
| 594 | $ WRITE SYS$OUTPUT "" | ||
| 595 | $! | ||
| 596 | $! Time To EXIT. | ||
| 597 | $! | ||
| 598 | $ EXIT | ||
| 599 | $! | ||
| 600 | $ ENDIF | ||
| 495 | $! | 601 | $! |
| 496 | $ ENDIF | 602 | $ ENDIF |
| 497 | $! | 603 | $! |
| 498 | $! End The P2 Check. | 604 | $! End The P5 (POINTER_SIZE) Check. |
| 499 | $! | 605 | $! |
| 500 | $ ENDIF | 606 | $ ENDIF |
| 501 | $! | 607 | $! |
| @@ -599,11 +705,64 @@ $ CCDEFS = "TCPIP_TYPE_''P3'" | |||
| 599 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS | 705 | $ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS |
| 600 | $ CCEXTRAFLAGS = "" | 706 | $ CCEXTRAFLAGS = "" |
| 601 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS | 707 | $ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS |
| 602 | $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" | 708 | $ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" |
| 603 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - | 709 | $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - |
| 604 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS | 710 | CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS |
| 605 | $! | 711 | $! |
| 606 | $! Check To See If The User Entered A Valid Paramter. | 712 | $! Check To See If We Have A ZLIB Option. |
| 713 | $! | ||
| 714 | $ ZLIB = P6 | ||
| 715 | $ IF (ZLIB .NES. "") | ||
| 716 | $ THEN | ||
| 717 | $! | ||
| 718 | $! Check for expected ZLIB files. | ||
| 719 | $! | ||
| 720 | $ err = 0 | ||
| 721 | $ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") | ||
| 722 | $ if (f$search( file1) .eqs. "") | ||
| 723 | $ then | ||
| 724 | $ WRITE SYS$OUTPUT "" | ||
| 725 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 726 | $ WRITE SYS$OUTPUT " Can't find header: ''file1'" | ||
| 727 | $ err = 1 | ||
| 728 | $ endif | ||
| 729 | $ file1 = f$parse( "A.;", ZLIB)- "A.;" | ||
| 730 | $! | ||
| 731 | $ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") | ||
| 732 | $ if (f$search( file2) .eqs. "") | ||
| 733 | $ then | ||
| 734 | $ if (err .eq. 0) | ||
| 735 | $ then | ||
| 736 | $ WRITE SYS$OUTPUT "" | ||
| 737 | $ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." | ||
| 738 | $ endif | ||
| 739 | $ WRITE SYS$OUTPUT " Can't find library: ''file2'" | ||
| 740 | $ WRITE SYS$OUTPUT "" | ||
| 741 | $ err = err+ 2 | ||
| 742 | $ endif | ||
| 743 | $ if (err .eq. 1) | ||
| 744 | $ then | ||
| 745 | $ WRITE SYS$OUTPUT "" | ||
| 746 | $ endif | ||
| 747 | $! | ||
| 748 | $ if (err .ne. 0) | ||
| 749 | $ then | ||
| 750 | $ GOTO EXIT | ||
| 751 | $ endif | ||
| 752 | $! | ||
| 753 | $ CCDEFS = """ZLIB=1"", "+ CCDEFS | ||
| 754 | $ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 | ||
| 755 | $ ZLIB_LIB = ", ''file2' /library" | ||
| 756 | $! | ||
| 757 | $! Print info | ||
| 758 | $! | ||
| 759 | $ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 | ||
| 760 | $! | ||
| 761 | $! End The P8 Check. | ||
| 762 | $! | ||
| 763 | $ ENDIF | ||
| 764 | $! | ||
| 765 | $! Check To See If The User Entered A Valid Parameter. | ||
| 607 | $! | 766 | $! |
| 608 | $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") | 767 | $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") |
| 609 | $ THEN | 768 | $ THEN |
| @@ -626,13 +785,13 @@ $! | |||
| 626 | $ CC = "CC" | 785 | $ CC = "CC" |
| 627 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - | 786 | $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - |
| 628 | THEN CC = "CC /DECC" | 787 | THEN CC = "CC /DECC" |
| 629 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=ANSI89" + - | 788 | $ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - |
| 630 | "/NOLIST /PREFIX=ALL" + - | 789 | "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - |
| 631 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 790 | " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS |
| 632 | $! | 791 | $! |
| 633 | $! Define The Linker Options File Name. | 792 | $! Define The Linker Options File Name. |
| 634 | $! | 793 | $! |
| 635 | $ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" | 794 | $ OPT_FILE = "VAX_DECC_OPTIONS.OPT" |
| 636 | $! | 795 | $! |
| 637 | $! End DECC Check. | 796 | $! End DECC Check. |
| 638 | $! | 797 | $! |
| @@ -661,7 +820,7 @@ $ EXIT | |||
| 661 | $ ENDIF | 820 | $ ENDIF |
| 662 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC" | 821 | $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC" |
| 663 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - | 822 | $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - |
| 664 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 823 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 665 | $ CCDEFS = CCDEFS + ",""VAXC""" | 824 | $ CCDEFS = CCDEFS + ",""VAXC""" |
| 666 | $! | 825 | $! |
| 667 | $! Define <sys> As SYS$COMMON:[SYSLIB] | 826 | $! Define <sys> As SYS$COMMON:[SYSLIB] |
| @@ -670,7 +829,7 @@ $ DEFINE /NOLOG SYS SYS$COMMON:[SYSLIB] | |||
| 670 | $! | 829 | $! |
| 671 | $! Define The Linker Options File Name. | 830 | $! Define The Linker Options File Name. |
| 672 | $! | 831 | $! |
| 673 | $ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" | 832 | $ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" |
| 674 | $! | 833 | $! |
| 675 | $! End VAXC Check | 834 | $! End VAXC Check |
| 676 | $! | 835 | $! |
| @@ -692,11 +851,11 @@ $! | |||
| 692 | $! Use GNU C... | 851 | $! Use GNU C... |
| 693 | $! | 852 | $! |
| 694 | $ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - | 853 | $ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - |
| 695 | "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS | 854 | "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS |
| 696 | $! | 855 | $! |
| 697 | $! Define The Linker Options File Name. | 856 | $! Define The Linker Options File Name. |
| 698 | $! | 857 | $! |
| 699 | $ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" | 858 | $ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" |
| 700 | $! | 859 | $! |
| 701 | $! End The GNU C Check. | 860 | $! End The GNU C Check. |
| 702 | $! | 861 | $! |
| @@ -715,20 +874,20 @@ $ THEN | |||
| 715 | $ CC4DISABLEWARNINGS = "DOLLARID" | 874 | $ CC4DISABLEWARNINGS = "DOLLARID" |
| 716 | $ ELSE | 875 | $ ELSE |
| 717 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" | 876 | $ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID" |
| 718 | $ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" | 877 | $ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))" |
| 719 | $ ENDIF | 878 | $ ENDIF |
| 720 | $ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" | 879 | $ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))" |
| 721 | $ ELSE | 880 | $ ELSE |
| 722 | $ CCDISABLEWARNINGS = "" | 881 | $ CCDISABLEWARNINGS = "" |
| 723 | $ CC4DISABLEWARNINGS = "" | 882 | $ CC4DISABLEWARNINGS = "" |
| 724 | $ ENDIF | 883 | $ ENDIF |
| 725 | $ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS | 884 | $ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS |
| 726 | $! | 885 | $! |
| 727 | $! Show user the result | 886 | $! Show user the result |
| 728 | $! | 887 | $! |
| 729 | $ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC | 888 | $ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC |
| 730 | $! | 889 | $! |
| 731 | $! Else The User Entered An Invalid Arguement. | 890 | $! Else The User Entered An Invalid Argument. |
| 732 | $! | 891 | $! |
| 733 | $ ELSE | 892 | $ ELSE |
| 734 | $! | 893 | $! |
| @@ -760,7 +919,7 @@ $ THEN | |||
| 760 | $! | 919 | $! |
| 761 | $! Set the library to use SOCKETSHR | 920 | $! Set the library to use SOCKETSHR |
| 762 | $! | 921 | $! |
| 763 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" | 922 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" |
| 764 | $! | 923 | $! |
| 765 | $! Done with SOCKETSHR | 924 | $! Done with SOCKETSHR |
| 766 | $! | 925 | $! |
| @@ -786,13 +945,13 @@ $ THEN | |||
| 786 | $! | 945 | $! |
| 787 | $! Set the library to use UCX. | 946 | $! Set the library to use UCX. |
| 788 | $! | 947 | $! |
| 789 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" | 948 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" |
| 790 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" | 949 | $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" |
| 791 | $ THEN | 950 | $ THEN |
| 792 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" | 951 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" |
| 793 | $ ELSE | 952 | $ ELSE |
| 794 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - | 953 | $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - |
| 795 | TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" | 954 | TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" |
| 796 | $ ENDIF | 955 | $ ENDIF |
| 797 | $! | 956 | $! |
| 798 | $! Done with UCX | 957 | $! Done with UCX |
| @@ -806,7 +965,7 @@ $ THEN | |||
| 806 | $! | 965 | $! |
| 807 | $! Set the library to use TCPIP (post UCX). | 966 | $! Set the library to use TCPIP (post UCX). |
| 808 | $! | 967 | $! |
| 809 | $ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" | 968 | $ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" |
| 810 | $! | 969 | $! |
| 811 | $! Done with TCPIP | 970 | $! Done with TCPIP |
| 812 | $! | 971 | $! |
| @@ -827,9 +986,9 @@ $ ENDIF | |||
| 827 | $! | 986 | $! |
| 828 | $! Print info | 987 | $! Print info |
| 829 | $! | 988 | $! |
| 830 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB | 989 | $ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," |
| 831 | $! | 990 | $! |
| 832 | $! Else The User Entered An Invalid Arguement. | 991 | $! Else The User Entered An Invalid Argument. |
| 833 | $! | 992 | $! |
| 834 | $ ELSE | 993 | $ ELSE |
| 835 | $! | 994 | $! |
diff --git a/src/lib/libssl/test/tcrl.com b/src/lib/libssl/test/tcrl.com index 1f606eb850..dd96a2b6dd 100644 --- a/src/lib/libssl/test/tcrl.com +++ b/src/lib/libssl/test/tcrl.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TCRL.COM -- Tests crl keys | 1 | $! TCRL.COM -- Tests crl keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl crl | 12 | $ cmd = "mcr ''exe_dir'openssl crl" |
| 10 | $ | 13 | $ |
| 11 | $ t := testcrl.pem | 14 | $ t = "testcrl.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing CRL conversions" | 17 | $ write sys$output "testing CRL conversions" |
diff --git a/src/lib/libssl/test/testca.com b/src/lib/libssl/test/testca.com index ec7e56dad6..78cda9ec5a 100644 --- a/src/lib/libssl/test/testca.com +++ b/src/lib/libssl/test/testca.com | |||
| @@ -1,11 +1,13 @@ | |||
| 1 | $! TESTCA.COM | 1 | $! TESTCA.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 7 | $ | 9 | $ |
| 8 | $ openssl := mcr 'exe_dir'openssl | 10 | $ openssl = "mcr ''exe_dir'openssl" |
| 9 | $ | 11 | $ |
| 10 | $ SSLEAY_CONFIG="-config ""CAss.cnf""" | 12 | $ SSLEAY_CONFIG="-config ""CAss.cnf""" |
| 11 | $ | 13 | $ |
diff --git a/src/lib/libssl/test/testenc.com b/src/lib/libssl/test/testenc.com index 621d9a2126..75acd6f07f 100644 --- a/src/lib/libssl/test/testenc.com +++ b/src/lib/libssl/test/testenc.com | |||
| @@ -1,13 +1,16 @@ | |||
| 1 | $! TESTENC.COM -- Test encoding and decoding | 1 | $! TESTENC.COM -- Test encoding and decoding |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. 64) then __arch = __arch+ "_64" | ||
| 7 | $ | 9 | $ |
| 8 | $ testsrc := makefile. | 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" |
| 9 | $ test := p.txt | 11 | $ testsrc = "makefile." |
| 10 | $ cmd := mcr 'exe_dir'openssl | 12 | $ test = "p.txt" |
| 13 | $ cmd = "mcr ''exe_dir'openssl" | ||
| 11 | $ | 14 | $ |
| 12 | $ if f$search(test) .nes. "" then delete 'test';* | 15 | $ if f$search(test) .nes. "" then delete 'test';* |
| 13 | $ convert/fdl=sys$input: 'testsrc' 'test' | 16 | $ convert/fdl=sys$input: 'testsrc' 'test' |
diff --git a/src/lib/libssl/test/testgen.com b/src/lib/libssl/test/testgen.com index a4bc574bec..e076da2f30 100644 --- a/src/lib/libssl/test/testgen.com +++ b/src/lib/libssl/test/testgen.com | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | $! TETSGEN.COM | 1 | $! TESTGEN.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $ if (p1 .eqs. 64) then __arch = __arch+ "_64" |
| 8 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 9 | $ |
| 9 | $ T := testcert | 10 | $ T = "testcert" |
| 10 | $ KEY = 512 | 11 | $ KEY = 512 |
| 11 | $ CA := [-.certs]testca.pem | 12 | $ CA = "[-.certs]testca.pem" |
| 12 | $ | 13 | $ |
| 13 | $ set noon | 14 | $ set noon |
| 14 | $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* | 15 | $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* |
| @@ -20,7 +21,8 @@ $ write sys$output "generating certificate request" | |||
| 20 | $ | 21 | $ |
| 21 | $ append/new nl: .rnd | 22 | $ append/new nl: .rnd |
| 22 | $ open/append random_file .rnd | 23 | $ open/append random_file .rnd |
| 23 | $ write random_file "string to make the random number generator think it has entropy" | 24 | $ write random_file - |
| 25 | "string to make the random number generator think it has entropy" | ||
| 24 | $ close random_file | 26 | $ close random_file |
| 25 | $ | 27 | $ |
| 26 | $ set noon | 28 | $ set noon |
| @@ -33,8 +35,10 @@ $ then | |||
| 33 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" | 35 | $ req_new="-newkey dsa:[-.apps]dsa512.pem" |
| 34 | $ else | 36 | $ else |
| 35 | $ req_new="-new" | 37 | $ req_new="-new" |
| 36 | $ write sys$output "There should be a 2 sequences of .'s and some +'s." | 38 | $ write sys$output - |
| 37 | $ write sys$output "There should not be more that at most 80 per line" | 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" | ||
| 38 | $ endif | 42 | $ endif |
| 39 | $ | 43 | $ |
| 40 | $ write sys$output "This could take some time." | 44 | $ write sys$output "This could take some time." |
diff --git a/src/lib/libssl/test/tests.com b/src/lib/libssl/test/tests.com index d151cd3955..373dd16eac 100644 --- a/src/lib/libssl/test/tests.com +++ b/src/lib/libssl/test/tests.com | |||
| @@ -1,22 +1,43 @@ | |||
| 1 | $! TESTS.COM -- Performs the necessary tests | 1 | $! TESTS.COM -- Performs the necessary tests |
| 2 | $! | 2 | $! |
| 3 | $! P1 tests to be performed. Empty means all. | 3 | $! P1 tests to be performed. Empty means all. |
| 4 | $ | 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 | $! | ||
| 5 | $ __proc = f$element(0,";",f$environment("procedure")) | 12 | $ __proc = f$element(0,";",f$environment("procedure")) |
| 6 | $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;" | 13 | $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;" |
| 7 | $ __save_default = f$environment("default") | 14 | $ __save_default = f$environment("default") |
| 8 | $ __arch := VAX | 15 | $ __arch = "VAX" |
| 9 | $ if f$getsyi("cpu") .ge. 128 then - | 16 | $ if f$getsyi("cpu") .ge. 128 then - |
| 10 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 17 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 11 | $ if __arch .eqs. "" then __arch := UNK | 18 | $ if __arch .eqs. "" then __arch = "UNK" |
| 12 | $ texe_dir := sys$disk:[-.'__arch'.exe.test] | 19 | $! |
| 13 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 20 | $ __archd = __arch |
| 14 | $ | 21 | $ pointer_size = "" |
| 15 | $ sslroot = f$parse("sys$disk:[-.apps];",,,,"syntax_only") - "].;"+ ".]" | 22 | $ if (p2 .eq. "64") |
| 16 | $ define /translation_attributes = concealed sslroot 'sslroot' | 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] | ||
| 17 | $ | 30 | $ |
| 18 | $ set default '__here' | 31 | $ set default '__here' |
| 19 | $ | 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 | $ | ||
| 20 | $ on control_y then goto exit | 41 | $ on control_y then goto exit |
| 21 | $ on error then goto exit | 42 | $ on error then goto exit |
| 22 | $ | 43 | $ |
| @@ -70,17 +91,19 @@ $ ENGINETEST := enginetest | |||
| 70 | $ EVPTEST := evp_test | 91 | $ EVPTEST := evp_test |
| 71 | $ IGETEST := igetest | 92 | $ IGETEST := igetest |
| 72 | $ JPAKETEST := jpaketest | 93 | $ JPAKETEST := jpaketest |
| 73 | $ | 94 | $ ASN1TEST := asn1test |
| 95 | $! | ||
| 74 | $ tests_i = 0 | 96 | $ tests_i = 0 |
| 75 | $ loop_tests: | 97 | $ loop_tests: |
| 76 | $ tests_e = f$element(tests_i,",",tests) | 98 | $ tests_e = f$element(tests_i,",",tests) |
| 77 | $ tests_i = tests_i + 1 | 99 | $ tests_i = tests_i + 1 |
| 78 | $ if tests_e .eqs. "," then goto exit | 100 | $ if tests_e .eqs. "," then goto exit |
| 101 | $ write sys$output "---> ''tests_e'" | ||
| 79 | $ gosub 'tests_e' | 102 | $ gosub 'tests_e' |
| 80 | $ goto loop_tests | 103 | $ goto loop_tests |
| 81 | $ | 104 | $ |
| 82 | $ test_evp: | 105 | $ test_evp: |
| 83 | $ mcr 'texe_dir''evptest' evptests.txt | 106 | $ mcr 'texe_dir''evptest' 'ROOT'.CRYPTO.EVP]evptests.txt |
| 84 | $ return | 107 | $ return |
| 85 | $ test_des: | 108 | $ test_des: |
| 86 | $ mcr 'texe_dir''destest' | 109 | $ mcr 'texe_dir''destest' |
| @@ -132,68 +155,109 @@ $ test_rand: | |||
| 132 | $ mcr 'texe_dir''randtest' | 155 | $ mcr 'texe_dir''randtest' |
| 133 | $ return | 156 | $ return |
| 134 | $ test_enc: | 157 | $ test_enc: |
| 135 | $ @testenc.com | 158 | $ @testenc.com 'pointer_size' |
| 136 | $ return | 159 | $ return |
| 137 | $ test_x509: | 160 | $ test_x509: |
| 138 | $ define sys$error nla0: | 161 | $ set noon |
| 162 | $ define sys$error test_x509.err | ||
| 139 | $ write sys$output "test normal x509v1 certificate" | 163 | $ write sys$output "test normal x509v1 certificate" |
| 140 | $ @tx509.com | 164 | $ @tx509.com "" 'pointer_size' |
| 141 | $ write sys$output "test first x509v3 certificate" | 165 | $ write sys$output "test first x509v3 certificate" |
| 142 | $ @tx509.com v3-cert1.pem | 166 | $ @tx509.com v3-cert1.pem 'pointer_size' |
| 143 | $ write sys$output "test second x509v3 certificate" | 167 | $ write sys$output "test second x509v3 certificate" |
| 144 | $ @tx509.com v3-cert2.pem | 168 | $ @tx509.com v3-cert2.pem 'pointer_size' |
| 145 | $ deassign sys$error | 169 | $ deassign sys$error |
| 170 | $ set on | ||
| 146 | $ return | 171 | $ return |
| 147 | $ test_rsa: | 172 | $ test_rsa: |
| 148 | $ define sys$error nla0: | 173 | $ set noon |
| 149 | $ @trsa.com | 174 | $ define sys$error test_rsa.err |
| 175 | $ @trsa.com "" 'pointer_size' | ||
| 150 | $ deassign sys$error | 176 | $ deassign sys$error |
| 151 | $ mcr 'texe_dir''rsatest' | 177 | $ mcr 'texe_dir''rsatest' |
| 178 | $ set on | ||
| 152 | $ return | 179 | $ return |
| 153 | $ test_crl: | 180 | $ test_crl: |
| 154 | $ define sys$error nla0: | 181 | $ set noon |
| 155 | $ @tcrl.com | 182 | $ define sys$error test_crl.err |
| 183 | $ @tcrl.com "" 'pointer_size' | ||
| 156 | $ deassign sys$error | 184 | $ deassign sys$error |
| 185 | $ set on | ||
| 157 | $ return | 186 | $ return |
| 158 | $ test_sid: | 187 | $ test_sid: |
| 159 | $ define sys$error nla0: | 188 | $ set noon |
| 160 | $ @tsid.com | 189 | $ define sys$error test_sid.err |
| 190 | $ @tsid.com "" 'pointer_size' | ||
| 161 | $ deassign sys$error | 191 | $ deassign sys$error |
| 192 | $ set on | ||
| 162 | $ return | 193 | $ return |
| 163 | $ test_req: | 194 | $ test_req: |
| 164 | $ define sys$error nla0: | 195 | $ set noon |
| 165 | $ @treq.com | 196 | $ define sys$error test_req.err |
| 166 | $ @treq.com testreq2.pem | 197 | $ @treq.com "" 'pointer_size' |
| 198 | $ @treq.com testreq2.pem 'pointer_size' | ||
| 167 | $ deassign sys$error | 199 | $ deassign sys$error |
| 200 | $ set on | ||
| 168 | $ return | 201 | $ return |
| 169 | $ test_pkcs7: | 202 | $ test_pkcs7: |
| 170 | $ define sys$error nla0: | 203 | $ set noon |
| 171 | $ @tpkcs7.com | 204 | $ define sys$error test_pkcs7.err |
| 172 | $ @tpkcs7d.com | 205 | $ @tpkcs7.com "" 'pointer_size' |
| 206 | $ @tpkcs7d.com "" 'pointer_size' | ||
| 173 | $ deassign sys$error | 207 | $ deassign sys$error |
| 208 | $ set on | ||
| 174 | $ return | 209 | $ return |
| 175 | $ test_bn: | 210 | $ test_bn: |
| 176 | $ write sys$output "starting big number library test, could take a while..." | 211 | $ write sys$output - |
| 177 | $ create bntest-vms.fdl | 212 | "starting big number library test, could take a while..." |
| 213 | $ set noon | ||
| 214 | $ define sys$error test_bn.err | ||
| 215 | $ define sys$output test_bn.out | ||
| 216 | $ @ bctest.com | ||
| 217 | $ status = $status | ||
| 218 | $ deassign sys$error | ||
| 219 | $ deassign sys$output | ||
| 220 | $ set on | ||
| 221 | $ if (status) | ||
| 222 | $ then | ||
| 223 | $ create /fdl = sys$input bntest-vms.tmp | ||
| 224 | FILE | ||
| 225 | ORGANIZATION sequential | ||
| 226 | RECORD | ||
| 227 | FORMAT stream_lf | ||
| 228 | $ define /user_mode sys$output bntest-vms.tmp | ||
| 229 | $ mcr 'texe_dir''bntest' | ||
| 230 | $ define /user_mode sys$input bntest-vms.tmp | ||
| 231 | $ define /user_mode sys$output bntest-vms.out | ||
| 232 | $ bc | ||
| 233 | $ @ bntest.com bntest-vms.out | ||
| 234 | $ status = $status | ||
| 235 | $ if (status) | ||
| 236 | $ then | ||
| 237 | $ delete bntest-vms.out;* | ||
| 238 | $ delete bntest-vms.tmp;* | ||
| 239 | $ endif | ||
| 240 | $ else | ||
| 241 | $ create /fdl = sys$input bntest-vms.sh | ||
| 178 | FILE | 242 | FILE |
| 179 | ORGANIZATION sequential | 243 | ORGANIZATION sequential |
| 180 | RECORD | 244 | RECORD |
| 181 | FORMAT stream_lf | 245 | FORMAT stream_lf |
| 182 | $ create/fdl=bntest-vms.fdl bntest-vms.sh | 246 | $ open /append bntest_file bntest-vms.sh |
| 183 | $ open/append foo bntest-vms.sh | 247 | $ type /output = bntest_file sys$input: |
| 184 | $ type/output=foo: sys$input: | ||
| 185 | << __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"' | 248 | << __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"' |
| 186 | $ define/user sys$output bntest-vms.tmp | 249 | $ define /user_mode sys$output bntest-vms.tmp |
| 187 | $ mcr 'texe_dir''bntest' | 250 | $ mcr 'texe_dir''bntest' |
| 188 | $ copy bntest-vms.tmp foo: | 251 | $ copy bntest-vms.tmp bntest_file |
| 189 | $ delete bntest-vms.tmp;* | 252 | $ delete bntest-vms.tmp;* |
| 190 | $ type/output=foo: sys$input: | 253 | $ type /output = bntest_file sys$input: |
| 191 | __FOO__ | 254 | __FOO__ |
| 192 | $ close foo | 255 | $ close bntest_file |
| 193 | $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and" | 256 | $ write sys$output "-- copy the [.test]bntest-vms.sh and [.test]bctest files to a Unix system and" |
| 194 | $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations" | 257 | $ write sys$output "-- run bntest-vms.sh through sh or bash to verify that the bignum operations" |
| 195 | $ write sys$output "-- went well." | 258 | $ write sys$output "-- went well." |
| 196 | $ write sys$output "" | 259 | $ write sys$output "" |
| 260 | $ endif | ||
| 197 | $ write sys$output "test a^b%c implementations" | 261 | $ write sys$output "test a^b%c implementations" |
| 198 | $ mcr 'texe_dir''exptest' | 262 | $ mcr 'texe_dir''exptest' |
| 199 | $ return | 263 | $ return |
| @@ -212,7 +276,7 @@ $ return | |||
| 212 | $ test_verify: | 276 | $ test_verify: |
| 213 | $ write sys$output "The following command should have some OK's and some failures" | 277 | $ write sys$output "The following command should have some OK's and some failures" |
| 214 | $ write sys$output "There are definitly a few expired certificates" | 278 | $ write sys$output "There are definitly a few expired certificates" |
| 215 | $ @tverify.com | 279 | $ @tverify.com 'pointer_size' |
| 216 | $ return | 280 | $ return |
| 217 | $ test_dh: | 281 | $ test_dh: |
| 218 | $ write sys$output "Generate a set of DH parameters" | 282 | $ write sys$output "Generate a set of DH parameters" |
| @@ -224,7 +288,7 @@ $ mcr 'texe_dir''dsatest' | |||
| 224 | $ return | 288 | $ return |
| 225 | $ test_gen: | 289 | $ test_gen: |
| 226 | $ write sys$output "Generate and verify a certificate request" | 290 | $ write sys$output "Generate and verify a certificate request" |
| 227 | $ @testgen.com | 291 | $ @testgen.com 'pointer_size' |
| 228 | $ return | 292 | $ return |
| 229 | $ maybe_test_ss: | 293 | $ maybe_test_ss: |
| 230 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) | 294 | $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) |
| @@ -237,7 +301,7 @@ $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then - | |||
| 237 | $ return | 301 | $ return |
| 238 | $ test_ss: | 302 | $ test_ss: |
| 239 | $ write sys$output "Generate and certify a test certificate" | 303 | $ write sys$output "Generate and certify a test certificate" |
| 240 | $ @testss.com | 304 | $ @testss.com 'pointer_size' |
| 241 | $ return | 305 | $ return |
| 242 | $ test_engine: | 306 | $ test_engine: |
| 243 | $ write sys$output "Manipulate the ENGINE structures" | 307 | $ write sys$output "Manipulate the ENGINE structures" |
| @@ -246,11 +310,11 @@ $ return | |||
| 246 | $ test_ssl: | 310 | $ test_ssl: |
| 247 | $ write sys$output "test SSL protocol" | 311 | $ write sys$output "test SSL protocol" |
| 248 | $ gosub maybe_test_ss | 312 | $ gosub maybe_test_ss |
| 249 | $ @testssl.com keyU.ss certU.ss certCA.ss | 313 | $ @testssl.com keyU.ss certU.ss certCA.ss 'pointer_size' |
| 250 | $ return | 314 | $ return |
| 251 | $ test_ca: | 315 | $ test_ca: |
| 252 | $ set noon | 316 | $ set noon |
| 253 | $ define/user sys$output nla0: | 317 | $ define /user_mode sys$output test_ca.out |
| 254 | $ mcr 'exe_dir'openssl no-rsa | 318 | $ mcr 'exe_dir'openssl no-rsa |
| 255 | $ save_severity=$SEVERITY | 319 | $ save_severity=$SEVERITY |
| 256 | $ set on | 320 | $ set on |
| @@ -259,7 +323,7 @@ $ then | |||
| 259 | $ write sys$output "skipping CA.com test -- requires RSA" | 323 | $ write sys$output "skipping CA.com test -- requires RSA" |
| 260 | $ else | 324 | $ else |
| 261 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" | 325 | $ write sys$output "Generate and certify a test certificate via the 'ca' program" |
| 262 | $ @testca.com | 326 | $ @testca.com 'pointer_size' |
| 263 | $ endif | 327 | $ endif |
| 264 | $ return | 328 | $ return |
| 265 | $ test_aes: | 329 | $ test_aes: |
| @@ -268,7 +332,7 @@ $! !mcr 'texe_dir''aestest' | |||
| 268 | $ return | 332 | $ return |
| 269 | $ test_tsa: | 333 | $ test_tsa: |
| 270 | $ set noon | 334 | $ set noon |
| 271 | $ define/user sys$output nla0: | 335 | $ define /user_mode sys$output nla0: |
| 272 | $ mcr 'exe_dir'openssl no-rsa | 336 | $ mcr 'exe_dir'openssl no-rsa |
| 273 | $ save_severity=$SEVERITY | 337 | $ save_severity=$SEVERITY |
| 274 | $ set on | 338 | $ set on |
| @@ -276,7 +340,7 @@ $ if save_severity | |||
| 276 | $ then | 340 | $ then |
| 277 | $ write sys$output "skipping testtsa.com test -- requires RSA" | 341 | $ write sys$output "skipping testtsa.com test -- requires RSA" |
| 278 | $ else | 342 | $ else |
| 279 | $ @testtsa.com | 343 | $ @testtsa.com "" "" "" 'pointer_size' |
| 280 | $ endif | 344 | $ endif |
| 281 | $ return | 345 | $ return |
| 282 | $ test_ige: | 346 | $ test_ige: |
| @@ -289,11 +353,14 @@ $ mcr 'texe_dir''jpaketest' | |||
| 289 | $ return | 353 | $ return |
| 290 | $ test_cms: | 354 | $ test_cms: |
| 291 | $ write sys$output "CMS consistency test" | 355 | $ write sys$output "CMS consistency test" |
| 356 | $ ! Define the logical name used to find openssl.exe in the perl script. | ||
| 357 | $ define /user_mode osslx 'exe_dir' | ||
| 292 | $ perl CMS-TEST.PL | 358 | $ perl CMS-TEST.PL |
| 293 | $ return | 359 | $ return |
| 294 | $ | 360 | $ |
| 295 | $ | 361 | $ |
| 296 | $ exit: | 362 | $ exit: |
| 363 | $ mcr 'exe_dir'openssl version -a | ||
| 297 | $ set default '__save_default' | 364 | $ set default '__save_default' |
| 298 | $ deassign sslroot | 365 | $ deassign sslroot |
| 299 | $ exit | 366 | $ exit |
diff --git a/src/lib/libssl/test/testss.com b/src/lib/libssl/test/testss.com index 6598106b09..32a74d0fc2 100644 --- a/src/lib/libssl/test/testss.com +++ b/src/lib/libssl/test/testss.com | |||
| @@ -1,16 +1,19 @@ | |||
| 1 | $! TESTSS.COM | 1 | $! TESTSS.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ digest="-md5" | 12 | $ digest="-md5" |
| 10 | $ reqcmd := mcr 'exe_dir'openssl req | 13 | $ reqcmd = "mcr ''exe_dir'openssl req" |
| 11 | $ x509cmd := mcr 'exe_dir'openssl x509 'digest' | 14 | $ x509cmd = "mcr ''exe_dir'openssl x509 ''digest'" |
| 12 | $ verifycmd := mcr 'exe_dir'openssl verify | 15 | $ verifycmd = "mcr ''exe_dir'openssl verify" |
| 13 | $ dummycnf := sys$disk:[-.apps]openssl-vms.cnf | 16 | $ dummycnf = "sys$disk:[-.apps]openssl-vms.cnf" |
| 14 | $ | 17 | $ |
| 15 | $ CAkey="""keyCA.ss""" | 18 | $ CAkey="""keyCA.ss""" |
| 16 | $ CAcert="""certCA.ss""" | 19 | $ CAcert="""certCA.ss""" |
diff --git a/src/lib/libssl/test/testssl.com b/src/lib/libssl/test/testssl.com index 9c83afba04..f19edc4719 100644 --- a/src/lib/libssl/test/testssl.com +++ b/src/lib/libssl/test/testssl.com | |||
| @@ -1,11 +1,14 @@ | |||
| 1 | $! TESTSSL.COM | 1 | $! TESTSSL.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ texe_dir := sys$disk:[-.'__arch'.exe.test] | 7 | $! |
| 8 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 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]" | ||
| 9 | $ | 12 | $ |
| 10 | $ if p1 .eqs. "" | 13 | $ if p1 .eqs. "" |
| 11 | $ then | 14 | $ then |
| @@ -19,21 +22,21 @@ $ cert="[-.apps]server.pem" | |||
| 19 | $ else | 22 | $ else |
| 20 | $ cert=p2 | 23 | $ cert=p2 |
| 21 | $ endif | 24 | $ endif |
| 22 | $ ssltest := mcr 'texe_dir'ssltest -key 'key' -cert 'cert' -c_key 'key' -c_cert 'cert' | 25 | $ ssltest = "mcr ''texe_dir'ssltest -key ''key'"+ - |
| 23 | $ | 26 | " -cert ''cert' -c_key ''key' -c_cert ''cert'" |
| 27 | $! | ||
| 28 | $ set noon | ||
| 24 | $ define/user sys$output testssl-x509-output. | 29 | $ define/user sys$output testssl-x509-output. |
| 25 | $ define/user sys$error nla0: | 30 | $ define/user sys$error nla0: |
| 26 | $ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout | 31 | $ mcr 'exe_dir'openssl x509 -in 'cert' -text -noout |
| 27 | $ set noon | ||
| 28 | $ define/user sys$error nla0: | 32 | $ define/user sys$error nla0: |
| 29 | $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact | 33 | $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact |
| 30 | $ if $severity .eq. 1 | 34 | $ if $severity .eq. 1 |
| 31 | $ then | 35 | $ then |
| 32 | $ dsa_cert := YES | 36 | $ dsa_cert = "YES" |
| 33 | $ else | 37 | $ else |
| 34 | $ dsa_cert := NO | 38 | $ dsa_cert = "NO" |
| 35 | $ endif | 39 | $ endif |
| 36 | $ set on | ||
| 37 | $ delete testssl-x509-output.;* | 40 | $ delete testssl-x509-output.;* |
| 38 | $ | 41 | $ |
| 39 | $ if p3 .eqs. "" | 42 | $ if p3 .eqs. "" |
| @@ -161,14 +164,12 @@ $ if $severity .ne. 1 then goto exit3 | |||
| 161 | $ | 164 | $ |
| 162 | $!########################################################################### | 165 | $!########################################################################### |
| 163 | $ | 166 | $ |
| 164 | $ set noon | ||
| 165 | $ define/user sys$output nla0: | 167 | $ define/user sys$output nla0: |
| 166 | $ mcr 'exe_dir'openssl no-rsa | 168 | $ mcr 'exe_dir'openssl no-rsa |
| 167 | $ no_rsa=$SEVERITY | 169 | $ no_rsa=$SEVERITY |
| 168 | $ define/user sys$output nla0: | 170 | $ define/user sys$output nla0: |
| 169 | $ mcr 'exe_dir'openssl no-dh | 171 | $ mcr 'exe_dir'openssl no-dh |
| 170 | $ no_dh=$SEVERITY | 172 | $ no_dh=$SEVERITY |
| 171 | $ set on | ||
| 172 | $ | 173 | $ |
| 173 | $ if no_dh | 174 | $ if no_dh |
| 174 | $ then | 175 | $ then |
| @@ -203,4 +204,5 @@ $ exit3: | |||
| 203 | $ RET = 3 | 204 | $ RET = 3 |
| 204 | $ exit: | 205 | $ exit: |
| 205 | $ if p3 .eqs. "" then delete certs.tmp;* | 206 | $ if p3 .eqs. "" then delete certs.tmp;* |
| 207 | $ set on | ||
| 206 | $ exit 'RET' | 208 | $ exit 'RET' |
diff --git a/src/lib/libssl/test/testtsa.com b/src/lib/libssl/test/testtsa.com index e3c586f14a..29fb1d0e63 100644 --- a/src/lib/libssl/test/testtsa.com +++ b/src/lib/libssl/test/testtsa.com | |||
| @@ -2,14 +2,17 @@ $! | |||
| 2 | $! A few very basic tests for the 'ts' time stamping authority command. | 2 | $! A few very basic tests for the 'ts' time stamping authority command. |
| 3 | $! | 3 | $! |
| 4 | $ | 4 | $ |
| 5 | $ __arch := VAX | 5 | $ __arch = "VAX" |
| 6 | $ if f$getsyi("cpu") .ge. 128 then - | 6 | $ if f$getsyi("cpu") .ge. 128 then - |
| 7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 7 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 8 | $ if __arch .eqs. "" then __arch := UNK | 8 | $ if __arch .eqs. "" then __arch = "UNK" |
| 9 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 9 | $! |
| 10 | $ if (p4 .eqs. "64") then __arch = __arch+ "_64" | ||
| 11 | $! | ||
| 12 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 10 | $ | 13 | $ |
| 11 | $ openssl := mcr 'f$parse(exe_dir+"openssl.exe")' | 14 | $ openssl = "mcr ''f$parse(exe_dir+"openssl.exe")'" |
| 12 | $ OPENSSL_CONF := [-]CAtsa.cnf | 15 | $ OPENSSL_CONF = "[-]CAtsa.cnf" |
| 13 | $ ! Because that's what ../apps/CA.sh really looks at | 16 | $ ! Because that's what ../apps/CA.sh really looks at |
| 14 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF | 17 | $ SSLEAY_CONFIG = "-config " + OPENSSL_CONF |
| 15 | $ | 18 | $ |
| @@ -114,8 +117,8 @@ $ | |||
| 114 | $ time_stamp_response_token_test: | 117 | $ time_stamp_response_token_test: |
| 115 | $ subroutine | 118 | $ subroutine |
| 116 | $ | 119 | $ |
| 117 | $ RESPONSE2:='p2'.copy_tsr | 120 | $ RESPONSE2 = p2+ "-copy_tsr" |
| 118 | $ TOKEN_DER:='p2'.token_der | 121 | $ TOKEN_DER = p2+ "-token_der" |
| 119 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out | 122 | $ openssl ts -reply -in 'p2' -out 'TOKEN_DER' -token_out |
| 120 | $ if $severity .ne. 1 then call error | 123 | $ if $severity .ne. 1 then call error |
| 121 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' | 124 | $ openssl ts -reply -in 'TOKEN_DER' -token_in -out 'RESPONSE2' |
| @@ -145,13 +148,13 @@ $ verify_time_stamp_token: | |||
| 145 | $ subroutine | 148 | $ subroutine |
| 146 | $ | 149 | $ |
| 147 | $ ! create the token from the response first | 150 | $ ! create the token from the response first |
| 148 | $ openssl ts -reply -in 'p2' -out 'p2'.token -token_out | 151 | $ openssl ts -reply -in "''p2'" -out "''p2'-token" -token_out |
| 149 | $ if $severity .ne. 1 then call error | 152 | $ if $severity .ne. 1 then call error |
| 150 | $ openssl ts -verify -queryfile 'p1' -in 'p2'.token -token_in - | 153 | $ openssl ts -verify -queryfile "''p1'" -in "''p2'-token" - |
| 151 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 154 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
| 152 | $ if $severity .ne. 1 then call error | 155 | $ if $severity .ne. 1 then call error |
| 153 | $ openssl ts -verify -data 'p3' -in 'p2'.token -token_in - | 156 | $ openssl ts -verify -data "''p3'" -in "''p2'-token" - |
| 154 | "-CAfile" tsaca.pem -untrusted tsa_cert1.pem | 157 | -token_in "-CAfile" tsaca.pem -untrusted tsa_cert1.pem |
| 155 | $ if $severity .ne. 1 then call error | 158 | $ if $severity .ne. 1 then call error |
| 156 | $ endsubroutine | 159 | $ endsubroutine |
| 157 | $ | 160 | $ |
| @@ -167,6 +170,8 @@ $ endsubroutine | |||
| 167 | $ | 170 | $ |
| 168 | $ ! Main body ---------------------------------------------------------- | 171 | $ ! Main body ---------------------------------------------------------- |
| 169 | $ | 172 | $ |
| 173 | $ set noon | ||
| 174 | $ | ||
| 170 | $ write sys$output "Setting up TSA test directory..." | 175 | $ write sys$output "Setting up TSA test directory..." |
| 171 | $ call setup_dir | 176 | $ call setup_dir |
| 172 | $ | 177 | $ |
| @@ -183,66 +188,68 @@ $ write sys$output "Creating req1.req time stamp request for file testtsa..." | |||
| 183 | $ call create_time_stamp_request1 | 188 | $ call create_time_stamp_request1 |
| 184 | $ | 189 | $ |
| 185 | $ write sys$output "Printing req1.req..." | 190 | $ write sys$output "Printing req1.req..." |
| 186 | $ call print_request req1.tsq | 191 | $ call print_request "req1.tsq" |
| 187 | $ | 192 | $ |
| 188 | $ write sys$output "Generating valid response for req1.req..." | 193 | $ write sys$output "Generating valid response for req1.req..." |
| 189 | $ call create_time_stamp_response req1.tsq resp1.tsr tsa_config1 | 194 | $ call create_time_stamp_response "req1.tsq" "resp1.tsr" "tsa_config1" |
| 190 | $ | 195 | $ |
| 191 | $ write sys$output "Printing response..." | 196 | $ write sys$output "Printing response..." |
| 192 | $ call print_response resp1.tsr | 197 | $ call print_response "resp1.tsr" |
| 193 | $ | 198 | $ |
| 194 | $ write sys$output "Verifying valid response..." | 199 | $ write sys$output "Verifying valid response..." |
| 195 | $ call verify_time_stamp_response req1.tsq resp1.tsr [-]testtsa.com | 200 | $ call verify_time_stamp_response "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
| 196 | $ | 201 | $ |
| 197 | $ write sys$output "Verifying valid token..." | 202 | $ write sys$output "Verifying valid token..." |
| 198 | $ call verify_time_stamp_token req1.tsq resp1.tsr [-]testtsa.com | 203 | $ call verify_time_stamp_token "req1.tsq" "resp1.tsr" "[-]testtsa.com" |
| 199 | $ | 204 | $ |
| 200 | $ ! The tests below are commented out, because invalid signer certificates | 205 | $ ! The tests below are commented out, because invalid signer certificates |
| 201 | $ ! can no longer be specified in the config file. | 206 | $ ! can no longer be specified in the config file. |
| 202 | $ | 207 | $ |
| 203 | $ ! write sys$output "Generating _invalid_ response for req1.req..." | 208 | $ ! write sys$output "Generating _invalid_ response for req1.req..." |
| 204 | $ ! call create_time_stamp_response req1.tsq resp1_bad.tsr tsa_config2 | 209 | $ ! call create_time_stamp_response "req1.tsq" "resp1_bad.tsr" "tsa_config2" |
| 205 | $ | 210 | $ |
| 206 | $ ! write sys$output "Printing response..." | 211 | $ ! write sys$output "Printing response..." |
| 207 | $ ! call print_response resp1_bad.tsr | 212 | $ ! call print_response "resp1_bad.tsr" |
| 208 | $ | 213 | $ |
| 209 | $ ! write sys$output "Verifying invalid response, it should fail..." | 214 | $ ! write sys$output "Verifying invalid response, it should fail..." |
| 210 | $ ! call verify_time_stamp_response_fail req1.tsq resp1_bad.tsr | 215 | $ ! call verify_time_stamp_response_fail "req1.tsq" "resp1_bad.tsr" |
| 211 | $ | 216 | $ |
| 212 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." | 217 | $ write sys$output "Creating req2.req time stamp request for file testtsa..." |
| 213 | $ call create_time_stamp_request2 | 218 | $ call create_time_stamp_request2 |
| 214 | $ | 219 | $ |
| 215 | $ write sys$output "Printing req2.req..." | 220 | $ write sys$output "Printing req2.req..." |
| 216 | $ call print_request req2.tsq | 221 | $ call print_request "req2.tsq" |
| 217 | $ | 222 | $ |
| 218 | $ write sys$output "Generating valid response for req2.req..." | 223 | $ write sys$output "Generating valid response for req2.req..." |
| 219 | $ call create_time_stamp_response req2.tsq resp2.tsr tsa_config1 | 224 | $ call create_time_stamp_response "req2.tsq" "resp2.tsr" "tsa_config1" |
| 220 | $ | 225 | $ |
| 221 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." | 226 | $ write sys$output "Checking '-token_in' and '-token_out' options with '-reply'..." |
| 222 | $ call time_stamp_response_token_test req2.tsq resp2.tsr | 227 | $ call time_stamp_response_token_test "req2.tsq" "resp2.tsr" |
| 223 | $ | 228 | $ |
| 224 | $ write sys$output "Printing response..." | 229 | $ write sys$output "Printing response..." |
| 225 | $ call print_response resp2.tsr | 230 | $ call print_response "resp2.tsr" |
| 226 | $ | 231 | $ |
| 227 | $ write sys$output "Verifying valid response..." | 232 | $ write sys$output "Verifying valid response..." |
| 228 | $ call verify_time_stamp_response req2.tsq resp2.tsr [-]testtsa.com | 233 | $ call verify_time_stamp_response "req2.tsq" "resp2.tsr" "[-]testtsa.com" |
| 229 | $ | 234 | $ |
| 230 | $ write sys$output "Verifying response against wrong request, it should fail..." | 235 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 231 | $ call verify_time_stamp_response_fail req1.tsq resp2.tsr | 236 | $ call verify_time_stamp_response_fail "req1.tsq" "resp2.tsr" |
| 232 | $ | 237 | $ |
| 233 | $ write sys$output "Verifying response against wrong request, it should fail..." | 238 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 234 | $ call verify_time_stamp_response_fail req2.tsq resp1.tsr | 239 | $ call verify_time_stamp_response_fail "req2.tsq" "resp1.tsr" |
| 235 | $ | 240 | $ |
| 236 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." | 241 | $ write sys$output "Creating req3.req time stamp request for file CAtsa.cnf..." |
| 237 | $ call create_time_stamp_request3 | 242 | $ call create_time_stamp_request3 |
| 238 | $ | 243 | $ |
| 239 | $ write sys$output "Printing req3.req..." | 244 | $ write sys$output "Printing req3.req..." |
| 240 | $ call print_request req3.tsq | 245 | $ call print_request "req3.tsq" |
| 241 | $ | 246 | $ |
| 242 | $ write sys$output "Verifying response against wrong request, it should fail..." | 247 | $ write sys$output "Verifying response against wrong request, it should fail..." |
| 243 | $ call verify_time_stamp_response_fail req3.tsq resp1.tsr | 248 | $ call verify_time_stamp_response_fail "req3.tsq" "resp1.tsr" |
| 244 | $ | 249 | $ |
| 245 | $ write sys$output "Cleaning up..." | 250 | $ write sys$output "Cleaning up..." |
| 246 | $ call clean_up_dir | 251 | $ call clean_up_dir |
| 247 | $ | 252 | $ |
| 253 | $ set on | ||
| 254 | $ | ||
| 248 | $ exit | 255 | $ exit |
diff --git a/src/lib/libssl/test/tpkcs7.com b/src/lib/libssl/test/tpkcs7.com index e107cc141a..3fc4982bb0 100644 --- a/src/lib/libssl/test/tpkcs7.com +++ b/src/lib/libssl/test/tpkcs7.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TPKCS7.COM -- Tests pkcs7 keys | 1 | $! TPKCS7.COM -- Tests pkcs7 keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl pkcs7 | 12 | $ cmd = "mcr ''exe_dir'openssl pkcs7" |
| 10 | $ | 13 | $ |
| 11 | $ t := testp7.pem | 14 | $ t = "testp7.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing PKCS7 conversions" | 17 | $ write sys$output "testing PKCS7 conversions" |
diff --git a/src/lib/libssl/test/tpkcs7d.com b/src/lib/libssl/test/tpkcs7d.com index 5ff653ccee..eea8c888ee 100644 --- a/src/lib/libssl/test/tpkcs7d.com +++ b/src/lib/libssl/test/tpkcs7d.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TPKCS7.COM -- Tests pkcs7 keys | 1 | $! TPKCS7.COM -- Tests pkcs7 keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl pkcs7 | 12 | $ cmd = "mcr ''exe_dir'openssl pkcs7" |
| 10 | $ | 13 | $ |
| 11 | $ t := pkcs7-1.pem | 14 | $ t = "pkcs7-1.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing PKCS7 conversions (2)" | 17 | $ write sys$output "testing PKCS7 conversions (2)" |
diff --git a/src/lib/libssl/test/treq.com b/src/lib/libssl/test/treq.com index d2594be6a7..acf08b79ef 100644 --- a/src/lib/libssl/test/treq.com +++ b/src/lib/libssl/test/treq.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TREQ.COM -- Tests req keys | 1 | $! TREQ.COM -- Tests req keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl req -config [-.apps]openssl-vms.cnf | 12 | $ cmd = "mcr ''exe_dir'openssl req -config [-.apps]openssl-vms.cnf" |
| 10 | $ | 13 | $ |
| 11 | $ t := testreq.pem | 14 | $ t = "testreq.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing req conversions" | 17 | $ write sys$output "testing req conversions" |
diff --git a/src/lib/libssl/test/trsa.com b/src/lib/libssl/test/trsa.com index d3a8a605b7..54180843ee 100644 --- a/src/lib/libssl/test/trsa.com +++ b/src/lib/libssl/test/trsa.com | |||
| @@ -1,10 +1,13 @@ | |||
| 1 | $! TRSA.COM -- Tests rsa keys | 1 | $! TRSA.COM -- Tests rsa keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ set noon | 12 | $ set noon |
| 10 | $ define/user sys$output nla0: | 13 | $ define/user sys$output nla0: |
| @@ -17,9 +20,9 @@ $ write sys$output "skipping RSA conversion test" | |||
| 17 | $ exit | 20 | $ exit |
| 18 | $ endif | 21 | $ endif |
| 19 | $ | 22 | $ |
| 20 | $ cmd := mcr 'exe_dir'openssl rsa | 23 | $ cmd = "mcr ''exe_dir'openssl rsa" |
| 21 | $ | 24 | $ |
| 22 | $ t := testrsa.pem | 25 | $ t = "testrsa.pem" |
| 23 | $ if p1 .nes. "" then t = p1 | 26 | $ if p1 .nes. "" then t = p1 |
| 24 | $ | 27 | $ |
| 25 | $ write sys$output "testing RSA conversions" | 28 | $ write sys$output "testing RSA conversions" |
diff --git a/src/lib/libssl/test/tsid.com b/src/lib/libssl/test/tsid.com index 267ace1135..b6c4e49473 100644 --- a/src/lib/libssl/test/tsid.com +++ b/src/lib/libssl/test/tsid.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TSID.COM -- Tests sid keys | 1 | $! TSID.COM -- Tests sid keys |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl sess_id | 12 | $ cmd = "mcr ''exe_dir'openssl sess_id" |
| 10 | $ | 13 | $ |
| 11 | $ t := testsid.pem | 14 | $ t = "testsid.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing session-id conversions" | 17 | $ write sys$output "testing session-id conversions" |
diff --git a/src/lib/libssl/test/tverify.com b/src/lib/libssl/test/tverify.com index 01431f4aac..d888344637 100644 --- a/src/lib/libssl/test/tverify.com +++ b/src/lib/libssl/test/tverify.com | |||
| @@ -1,13 +1,15 @@ | |||
| 1 | $! TVERIFY.COM | 1 | $! TVERIFY.COM |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $! | ||
| 8 | $ if (p1 .eqs. "64") then __arch = __arch+ "_64" | ||
| 7 | $! | 9 | $! |
| 8 | $ line_max = 255 ! Could be longer on modern non-VAX. | 10 | $ line_max = 255 ! Could be longer on modern non-VAX. |
| 9 | $ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp" | 11 | $ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp" |
| 10 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 12 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" |
| 11 | $ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'" | 13 | $ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'" |
| 12 | $ cmd_len = f$length( cmd) | 14 | $ cmd_len = f$length( cmd) |
| 13 | $ pems = "[-.certs...]*.pem" | 15 | $ pems = "[-.certs...]*.pem" |
| @@ -19,7 +21,7 @@ $! | |||
| 19 | $! Loop through all the certificate files. | 21 | $! Loop through all the certificate files. |
| 20 | $! | 22 | $! |
| 21 | $ args = "" | 23 | $ args = "" |
| 22 | $ old_f := | 24 | $ old_f = "" |
| 23 | $ loop_file: | 25 | $ loop_file: |
| 24 | $ f = f$search( pems) | 26 | $ f = f$search( pems) |
| 25 | $ if ((f .nes. "") .and. (f .nes. old_f)) | 27 | $ if ((f .nes. "") .and. (f .nes. old_f)) |
diff --git a/src/lib/libssl/test/tx509.com b/src/lib/libssl/test/tx509.com index 399eb01490..93ce988b41 100644 --- a/src/lib/libssl/test/tx509.com +++ b/src/lib/libssl/test/tx509.com | |||
| @@ -1,14 +1,17 @@ | |||
| 1 | $! TX509.COM -- Tests x509 certificates | 1 | $! TX509.COM -- Tests x509 certificates |
| 2 | $ | 2 | $ |
| 3 | $ __arch := VAX | 3 | $ __arch = "VAX" |
| 4 | $ if f$getsyi("cpu") .ge. 128 then - | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
| 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 6 | $ if __arch .eqs. "" then __arch := UNK | 6 | $ if __arch .eqs. "" then __arch = "UNK" |
| 7 | $ exe_dir := sys$disk:[-.'__arch'.exe.apps] | 7 | $! |
| 8 | $ if (p2 .eqs. "64") then __arch = __arch+ "_64" | ||
| 9 | $! | ||
| 10 | $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" | ||
| 8 | $ | 11 | $ |
| 9 | $ cmd := mcr 'exe_dir'openssl x509 | 12 | $ cmd = "mcr ''exe_dir'openssl x509" |
| 10 | $ | 13 | $ |
| 11 | $ t := testx509.pem | 14 | $ t = "testx509.pem" |
| 12 | $ if p1 .nes. "" then t = p1 | 15 | $ if p1 .nes. "" then t = p1 |
| 13 | $ | 16 | $ |
| 14 | $ write sys$output "testing X509 conversions" | 17 | $ write sys$output "testing X509 conversions" |
