diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/bntest.com | 7 | ||||
-rw-r--r-- | test/cms-test.pl | 4 | ||||
-rw-r--r-- | test/maketests.com | 263 | ||||
-rw-r--r-- | test/tcrl.com | 13 | ||||
-rw-r--r-- | test/testca.com | 8 | ||||
-rw-r--r-- | test/testenc.com | 13 | ||||
-rw-r--r-- | test/testgen.com | 22 | ||||
-rw-r--r-- | test/tests.com | 110 | ||||
-rw-r--r-- | test/testss.com | 17 | ||||
-rw-r--r-- | test/testssl.com | 20 | ||||
-rw-r--r-- | test/testtsa.com | 61 | ||||
-rw-r--r-- | test/tpkcs7.com | 13 | ||||
-rw-r--r-- | test/tpkcs7d.com | 13 | ||||
-rw-r--r-- | test/treq.com | 13 | ||||
-rw-r--r-- | test/trsa.com | 13 | ||||
-rw-r--r-- | test/tsid.com | 13 | ||||
-rw-r--r-- | test/tverify.com | 10 | ||||
-rw-r--r-- | test/tx509.com | 13 |
18 files changed, 383 insertions, 243 deletions
diff --git a/test/bntest.com b/test/bntest.com index cb6d3abd7a..6545d2e5a5 100644 --- a/test/bntest.com +++ b/test/bntest.com @@ -4,6 +4,8 @@ $! $! Exit status = 1 (success) if all tests passed, $! 0 (warning) if any test failed. $! +$! 2011-02-20 SMS. Added code to skip "#" comments in the input file. +$! $! 2010-04-05 SMS. New. Based (loosely) on perl code in bntest-vms.sh. $! $! Expect data like: @@ -35,6 +37,11 @@ $! $ read_loop: $ read /end = read_loop_end /error = tidy result_file line $ t1 = f$element( 0, " ", line) +$! +$! Skip "#" comment lines. +$ if (f$extract( 0, 1, f$edit( line, "TRIM")) .eqs. "#") then - + goto read_loop +$! $ if (t1 .eqs. "test") $ then $ passed = passed+ 1 diff --git a/test/cms-test.pl b/test/cms-test.pl index 31b84707ad..c938bcf00d 100644 --- a/test/cms-test.pl +++ b/test/cms-test.pl @@ -56,8 +56,8 @@ my $ossl_path; my $redir = " 2> cms.err > cms.out"; # Make VMS work -if ( $^O eq "VMS" && -f "$ENV{EXE_DIR}openssl.exe" ) { - $ossl_path = "pipe mcr $ENV{EXE_DIR}openssl.exe"; +if ( $^O eq "VMS" && -f "OSSLX:openssl.exe" ) { + $ossl_path = "pipe mcr OSSLX:openssl"; } # Make MSYS work elsif ( $^O eq "MSWin32" && -f "../apps/openssl.exe" ) { diff --git a/test/maketests.com b/test/maketests.com index 929551f44a..5c2e2bdf19 100644 --- a/test/maketests.com +++ b/test/maketests.com @@ -36,54 +36,84 @@ $! SOCKETSHR for SOCKETSHR+NETLIB $! $! P4, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up) $! -$! For 64 bit architectures (Alpha and IA64), specify the pointer size as P5. -$! For 32 bit architectures (VAX), P5 is ignored. -$! Currently supported values are: $! -$! 32 To ge a library compiled with /POINTER_SIZE=32 -$! 64 To ge a library compiled with /POINTER_SIZE=64 +$! P5, if defined, specifies the C pointer size. Ignored on VAX. +$! Supported values are: $! +$! "" Compile with default (/NOPOINTER_SIZE) +$! 32 Compile with /POINTER_SIZE=32 (SHORT) +$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]) +$! +$! P6, if defined, specifies a directory where ZLIB files (zlib.h, +$! libz.olb) may be found. Optionally, a non-default object library +$! name may be included ("dev:[dir]libz_64.olb", for example). +$! +$! +$! Announce/identify. +$! +$ proc = f$environment( "procedure") +$ write sys$output "@@@ "+ - + f$parse( proc, , , "name")+ f$parse( proc, , , "type") $! $! Define A TCP/IP Library That We Will Need To Link To. -$! (That is, If Wee Need To Link To One.) +$! (That is, If We Need To Link To One.) $! $ TCPIP_LIB = "" +$ ZLIB_LIB = "" $! $! Check Which Architecture We Are Using. $! -$ if (f$getsyi( "HW_MODEL") .lt. 1024) +$ if (f$getsyi( "cpu") .lt. 128) $ then -$ arch = "VAX" +$ ARCH = "VAX" $ else -$ arch = "" -$ arch = arch+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") -$ if (arch .eqs. "") then arch = "UNK" +$ ARCH = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") +$ if (ARCH .eqs. "") then ARCH = "UNK" $ endif $! -$! Define The OBJ and EXE Directories (EXE before CHECK_OPTIONS). -$! -$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.TEST] -$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.TEST] +$ ARCHD = ARCH +$ LIB32 = "32" +$ OPT_FILE = "" +$ POINTER_SIZE = "" $! $! Check To Make Sure We Have Valid Command Line Parameters. $! $ GOSUB CHECK_OPTIONS $! +$! Define The OBJ and EXE Directories. +$! +$ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.TEST] +$ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.TEST] +$! +$! Specify the destination directory in any /MAP option. +$! +$ if (LINKMAP .eqs. "MAP") +$ then +$ LINKMAP = LINKMAP+ "=''EXE_DIR'" +$ endif +$! +$! Add the location prefix to the linker options file name. +$! +$ if (OPT_FILE .nes. "") +$ then +$ OPT_FILE = EXE_DIR+ OPT_FILE +$ endif +$! $! Initialise logical names and such $! $ GOSUB INITIALISE $! $! Tell The User What Kind of Machine We Run On. $! -$ WRITE SYS$OUTPUT "Compiling On ''ARCH'." +$ WRITE SYS$OUTPUT "Host system architecture: ''ARCHD'" $! $! Define The CRYPTO-LIB We Are To Use. $! -$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO'LIB32'.OLB +$ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB $! $! Define The SSL We Are To Use. $! -$ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL'LIB32'.OLB +$ SSL_LIB := SYS$DISK:[-.'ARCHD'.EXE.SSL]SSL_LIBSSL'LIB32'.OLB $! $! Create the OBJ and EXE Directories, if needed. $! @@ -112,7 +142,7 @@ $ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ - "MDC2TEST,RMDTEST,"+ - "RANDTEST,DHTEST,ENGINETEST,"+ - "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ - - "EVP_TEST,IGETEST,JPAKETEST" + "EVP_TEST,IGETEST,JPAKETEST,SRPTEST" $! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well? $! $! Additional directory information. @@ -148,6 +178,7 @@ $ T_D_RSA_TEST := [-.crypto.rsa] $ T_D_EVP_TEST := [-.crypto.evp] $ T_D_IGETEST := [-.test] $ T_D_JPAKETEST := [-.crypto.jpake] +$ T_D_SRPTEST := [-.crypto.srp] $! $ TCPIP_PROGRAMS = ",," $ IF COMPILER .EQS. "VAXC" THEN - @@ -230,33 +261,15 @@ $! $! Link The Program, Check To See If We Need To Link With RSAREF Or Not. $! Check To See If We Are To Link With A Specific TCP/IP Library. $! -$ IF (TCPIP_LIB.NES."") -$ THEN -$! $! Don't Link With The RSAREF Routines And TCP/IP Library. $! -$ LINK /'DEBUGGER' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' - - 'OBJECT_FILE', - - 'SSL_LIB' /LIBRARY, - - 'CRYPTO_LIB' /LIBRARY, - - 'TCPIP_LIB', - - 'OPT_FILE' /OPTIONS -$! -$! Else... -$! -$ ELSE -$! -$! Don't Link With The RSAREF Routines And Link With A TCP/IP Library. -$! -$ LINK /'DEBUGGER' /'TRACEBACK' /EXECUTABLE = 'EXE_FILE' - - 'OBJECT_FILE', - - 'SSL_LIB' /LIBRARY, - - 'CRYPTO_LIB' /LIBRARY, - - 'OPT_FILE' /OPTIONS -$! -$! End The TCP/IP Library Check. -$! -$ ENDIF +$ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /EXECTABLE = 'EXE_FILE' - + 'OBJECT_FILE', - + 'SSL_LIB' /LIBRARY, - + 'CRYPTO_LIB' /LIBRARY - + 'TCPIP_LIB' - + 'ZLIB_LIB' - + ,'OPT_FILE' /OPTIONS $! $! Go Back And Do It Again. $! @@ -320,7 +333,7 @@ $! $ CREATE 'OPT_FILE' $DECK ! -! Default System Options File To Link Agianst +! Default System Options File To Link Against ! The Sharable C Runtime Library. ! GNU_CC:[000000]GCCLIB.OLB /LIBRARY @@ -355,7 +368,7 @@ $! $ CREATE 'OPT_FILE' $DECK ! -! Default System Options File To Link Agianst +! Default System Options File To Link Against ! The Sharable DEC C Runtime Library. ! SYS$SHARE:DECC$SHR.EXE /SHAREABLE @@ -370,7 +383,7 @@ $! $ CREATE 'OPT_FILE' $DECK ! -! Default System Options File For non-VAX To Link Agianst +! Default System Options File For non-VAX To Link Against ! The Sharable C Runtime Library. ! SYS$SHARE:CMA$OPEN_LIB_SHR.EXE /SHAREABLE @@ -449,19 +462,24 @@ $! Check The User's Options. $! $ CHECK_OPTIONS: $! +$! Set basic C compiler /INCLUDE directories. +$! +$ CC_INCLUDES = "SYS$DISK:[-],SYS$DISK:[-.CRYPTO]" +$! $! Check To See If P1 Is Blank. $! $ IF (P1.EQS."NODEBUG") $ THEN $! -$! P1 Is NODEBUG, So Compile Without Debugger Information. +$! P1 Is NODEBUG, So Compile Without Debugger Information. $! -$ DEBUGGER = "NODEBUG" -$ TRACEBACK = "NOTRACEBACK" -$ GCC_OPTIMIZE = "OPTIMIZE" -$ CC_OPTIMIZE = "OPTIMIZE" -$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." -$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." +$ DEBUGGER = "NODEBUG" +$ LINKMAP = "NOMAP" +$ TRACEBACK = "NOTRACEBACK" +$ GCC_OPTIMIZE = "OPTIMIZE" +$ CC_OPTIMIZE = "OPTIMIZE" +$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile." +$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization." $! $! Else... $! @@ -475,6 +493,7 @@ $! $! Compile With Debugger Information. $! $ DEBUGGER = "DEBUG" +$ LINKMAP = "MAP" $ TRACEBACK = "TRACEBACK" $ GCC_OPTIMIZE = "NOOPTIMIZE" $ CC_OPTIMIZE = "NOOPTIMIZE" @@ -485,7 +504,7 @@ $! Else... $! $ ELSE $! -$! Tell The User Entered An Invalid Option.. +$! Tell The User Entered An Invalid Option. $! $ WRITE SYS$OUTPUT "" $ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:" @@ -498,7 +517,7 @@ $! Time To EXIT. $! $ EXIT $! -$! End The Valid Arguement Check. +$! End The Valid Argument Check. $! $ ENDIF $! @@ -506,55 +525,42 @@ $! End The P1 Check. $! $ ENDIF $! -$! Check To See If P5 Is Blank. +$! Check P5 (POINTER_SIZE). $! -$ IF (P5.EQS."") +$ IF (P5 .NES. "") .AND. (ARCH .NES. "VAX") $ THEN -$ POINTER_SIZE = "" -$ ELSE -$! -$! Check is P5 Is Valid $! -$ IF (P5.EQS."32") +$ IF (P5 .EQS. "32") $ THEN $ POINTER_SIZE = "/POINTER_SIZE=32" -$ IF ARCH .EQS. "VAX" -$ THEN -$ LIB32 = "" -$ ELSE -$ LIB32 = "32" -$ ENDIF $ ELSE -$ IF (P5.EQS."64") +$ IF (P5 .EQS. "64") $ THEN +$ POINTER_SIZE = "/POINTER_SIZE=64=ARGV" +$ ARCHD = ARCH+ "_64" $ LIB32 = "" -$ IF ARCH .EQS. "VAX" -$ THEN -$ POINTER_SIZE = "/POINTER_SIZE=32" -$ ELSE -$ POINTER_SIZE = "/POINTER_SIZE=64" -$ ENDIF $ ELSE $! -$! Tell The User Entered An Invalid Option.. +$! Tell The User Entered An Invalid Option. $! $ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:" +$ WRITE SYS$OUTPUT "The Option ", P5, - + " Is Invalid. The Valid Options Are:" $ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT " 32 : Compile with 32 bit pointer size" -$ WRITE SYS$OUTPUT " 64 : Compile with 64 bit pointer size" +$ WRITE SYS$OUTPUT " """" : Compile with default (short) pointers." +$ WRITE SYS$OUTPUT " 32 : Compile with 32-bit (short) pointers." +$ WRITE SYS$OUTPUT " 64 : Compile with 64-bit (long) pointers." $ WRITE SYS$OUTPUT "" -$! +$! $! Time To EXIT. $! -$ GOTO TIDY -$! -$! End The Valid Arguement Check. +$ EXIT $! $ ENDIF +$! $ ENDIF $! -$! End The P5 Check. +$! End The P5 (POINTER_SIZE) Check. $! $ ENDIF $! @@ -662,7 +668,60 @@ $ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR" $ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN - CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS $! -$! Check To See If The User Entered A Valid Paramter. +$! Check To See If We Have A ZLIB Option. +$! +$ ZLIB = P6 +$ IF (ZLIB .NES. "") +$ THEN +$! +$! Check for expected ZLIB files. +$! +$ err = 0 +$ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY") +$ if (f$search( file1) .eqs. "") +$ then +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." +$ WRITE SYS$OUTPUT " Can't find header: ''file1'" +$ err = 1 +$ endif +$ file1 = f$parse( "A.;", ZLIB)- "A.;" +$! +$ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY") +$ if (f$search( file2) .eqs. "") +$ then +$ if (err .eq. 0) +$ then +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid." +$ endif +$ WRITE SYS$OUTPUT " Can't find library: ''file2'" +$ WRITE SYS$OUTPUT "" +$ err = err+ 2 +$ endif +$ if (err .eq. 1) +$ then +$ WRITE SYS$OUTPUT "" +$ endif +$! +$ if (err .ne. 0) +$ then +$ GOTO EXIT +$ endif +$! +$ CCDEFS = """ZLIB=1"", "+ CCDEFS +$ CC_INCLUDES = CC_INCLUDES+ ", "+ file1 +$ ZLIB_LIB = ", ''file2' /library" +$! +$! Print info +$! +$ WRITE SYS$OUTPUT "ZLIB library spec: ", file2 +$! +$! End The P8 Check. +$! +$ ENDIF +$! +$! Check To See If The User Entered A Valid Parameter. $! $ IF (P2.EQS."VAXC").OR.(P2.EQS."DECC").OR.(P2.EQS."GNUC") $ THEN @@ -685,13 +744,13 @@ $! $ CC = "CC" $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" - THEN CC = "CC /DECC" -$ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=ANSI89 ''POINTER_SIZE'" + - - "/NOLIST /PREFIX=ALL" + - - "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS +$ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ - + "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + - + "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS $! $! Define The Linker Options File Name. $! -$ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT" +$ OPT_FILE = "VAX_DECC_OPTIONS.OPT" $! $! End DECC Check. $! @@ -720,7 +779,7 @@ $ EXIT $ ENDIF $ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC /VAXC" $ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - - "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS + "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS $ CCDEFS = CCDEFS + ",""VAXC""" $! $! Define <sys> As SYS$COMMON:[SYSLIB] @@ -729,7 +788,7 @@ $ DEFINE /NOLOG SYS SYS$COMMON:[SYSLIB] $! $! Define The Linker Options File Name. $! -$ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT" +$ OPT_FILE = "VAX_VAXC_OPTIONS.OPT" $! $! End VAXC Check $! @@ -751,11 +810,11 @@ $! $! Use GNU C... $! $ CC = "GCC /NOCASE_HACK /''GCC_OPTIMIZE' /''DEBUGGER' /NOLIST" + - - "/INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO])" + CCEXTRAFLAGS + "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS $! $! Define The Linker Options File Name. $! -$ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT" +$ OPT_FILE = "VAX_GNUC_OPTIONS.OPT" $! $! End The GNU C Check. $! @@ -787,7 +846,7 @@ $! Show user the result $! $ WRITE /SYMBOL SYS$OUTPUT "Main Compiling Command: ", CC $! -$! Else The User Entered An Invalid Arguement. +$! Else The User Entered An Invalid Argument. $! $ ELSE $! @@ -819,7 +878,7 @@ $ THEN $! $! Set the library to use SOCKETSHR $! -$ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" +$ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS" $! $! Done with SOCKETSHR $! @@ -845,13 +904,13 @@ $ THEN $! $! Set the library to use UCX. $! -$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" +$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS" $ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" $ THEN -$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" +$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS" $ ELSE $ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN - - TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" + TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS" $ ENDIF $! $! Done with UCX @@ -865,7 +924,7 @@ $ THEN $! $! Set the library to use TCPIP (post UCX). $! -$ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" +$ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS" $! $! Done with TCPIP $! @@ -886,9 +945,9 @@ $ ENDIF $! $! Print info $! -$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB +$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- "," $! -$! Else The User Entered An Invalid Arguement. +$! Else The User Entered An Invalid Argument. $! $ ELSE $! diff --git a/test/tcrl.com b/test/tcrl.com index 1f606eb850..dd96a2b6dd 100644 --- a/test/tcrl.com +++ b/test/tcrl.com @@ -1,14 +1,17 @@ $! TCRL.COM -- Tests crl keys $ -$ __arch := VAX +$ __arch = "VAX" $ if f$getsyi("cpu") .ge. 128 then - __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") -$ if __arch .eqs. "" then __arch := UNK -$ exe_dir := sys$disk:[-.'__arch'.exe.apps] +$ if __arch .eqs. "" then __arch = "UNK" +$! +$ if (p2 .eqs. "64") then __arch = __arch+ "_64" +$! +$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" $ -$ cmd := mcr 'exe_dir'openssl crl +$ cmd = "mcr ''exe_dir'openssl crl" $ -$ t := testcrl.pem +$ t = "testcrl.pem" $ if p1 .nes. "" then t = p1 $ $ write sys$output "testing CRL conversions" diff --git a/test/testca.com b/test/testca.com index ec7e56dad6..78cda9ec5a 100644 --- a/test/testca.com +++ b/test/testca.com @@ -1,11 +1,13 @@ $! TESTCA.COM $ -$ __arch := VAX +$ __arch = "VAX" $ if f$getsyi("cpu") .ge. 128 then - __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") -$ if __arch .eqs. "" then __arch := UNK +$ if __arch .eqs. "" then __arch = "UNK" +$! +$ if (p1 .eqs. "64") then __arch = __arch+ "_64" $ -$ openssl := mcr 'exe_dir'openssl +$ openssl = "mcr ''exe_dir'openssl" $ $ SSLEAY_CONFIG="-config ""CAss.cnf""" $ diff --git a/test/testenc.com b/test/testenc.com index 621d9a2126..75acd6f07f 100644 --- a/test/testenc.com +++ b/test/testenc.com @@ -1,13 +1,16 @@ $! TESTENC.COM -- Test encoding and decoding $ -$ __arch := VAX +$ __arch = "VAX" $ if f$getsyi("cpu") .ge. 128 then - __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") -$ if __arch .eqs. "" then __arch := UNK +$ if __arch .eqs. "" then __arch = "UNK" +$! +$ if (p1 .eqs. 64) then __arch = __arch+ "_64" $ -$ testsrc := makefile. -$ test := p.txt -$ cmd := mcr 'exe_dir'openssl +$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" +$ testsrc = "makefile." +$ test = "p.txt" +$ cmd = "mcr ''exe_dir'openssl" $ $ if f$search(test) .nes. "" then delete 'test';* $ convert/fdl=sys$input: 'testsrc' 'test' diff --git a/test/testgen.com b/test/testgen.com index a4bc574bec..e076da2f30 100644 --- a/test/testgen.com +++ b/test/testgen.com @@ -1,14 +1,15 @@ -$! TETSGEN.COM +$! TESTGEN.COM $ -$ __arch := VAX +$ __arch = "VAX" $ if f$getsyi("cpu") .ge. 128 then - __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") -$ if __arch .eqs. "" then __arch := UNK -$ exe_dir := sys$disk:[-.'__arch'.exe.apps] +$ if __arch .eqs. "" then __arch = "UNK" +$ if (p1 .eqs. 64) then __arch = __arch+ "_64" +$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" $ -$ T := testcert +$ T = "testcert" $ KEY = 512 -$ CA := [-.certs]testca.pem +$ CA = "[-.certs]testca.pem" $ $ set noon $ if f$search(T+".1;*") .nes. "" then delete 'T'.1;* @@ -20,7 +21,8 @@ $ write sys$output "generating certificate request" $ $ append/new nl: .rnd $ open/append random_file .rnd -$ write random_file "string to make the random number generator think it has entropy" +$ write random_file - + "string to make the random number generator think it has entropy" $ close random_file $ $ set noon @@ -33,8 +35,10 @@ $ then $ req_new="-newkey dsa:[-.apps]dsa512.pem" $ else $ req_new="-new" -$ write sys$output "There should be a 2 sequences of .'s and some +'s." -$ write sys$output "There should not be more that at most 80 per line" +$ write sys$output - + "There should be a 2 sequences of .'s and some +'s." +$ write sys$output - + "There should not be more that at most 80 per line" $ endif $ $ write sys$output "This could take some time." diff --git a/test/tests.com b/test/tests.com index 08e99beafa..62be1e7a46 100644 --- a/test/tests.com +++ b/test/tests.com @@ -1,16 +1,32 @@ $! TESTS.COM -- Performs the necessary tests $! $! P1 tests to be performed. Empty means all. -$ +$! P2 Pointer size: "", "32", or "64". +$! +$! Announce/identify. +$! +$ proc = f$environment( "procedure") +$ write sys$output "@@@ "+ - + f$parse( proc, , , "name")+ f$parse( proc, , , "type") +$! $ __proc = f$element(0,";",f$environment("procedure")) $ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;" $ __save_default = f$environment("default") -$ __arch := VAX +$ __arch = "VAX" $ if f$getsyi("cpu") .ge. 128 then - __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") -$ if __arch .eqs. "" then __arch := UNK -$ texe_dir := sys$disk:[-.'__arch'.exe.test] -$ exe_dir := sys$disk:[-.'__arch'.exe.apps] +$ if __arch .eqs. "" then __arch = "UNK" +$! +$ __archd = __arch +$ pointer_size = "" +$ if (p2 .eq. "64") +$ then +$ pointer_size = "64" +$ __archd = __arch+ "_64" +$ endif +$! +$ texe_dir := sys$disk:[-.'__archd'.exe.test] +$ exe_dir := sys$disk:[-.'__archd'.exe.apps] $ $ set default '__here' $ @@ -40,7 +56,7 @@ $ tests := - test_enc,test_x509,test_rsa,test_crl,test_sid,- test_gen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,- test_ss,test_ca,test_engine,test_evp,test_ssl,test_tsa,test_ige,- - test_jpake,test_cms + test_jpake,test_srp,test_cms $ endif $ tests = f$edit(tests,"COLLAPSE") $ @@ -75,7 +91,8 @@ $ ENGINETEST := enginetest $ EVPTEST := evp_test $ IGETEST := igetest $ JPAKETEST := jpaketest -$ +$ SRPTEST := srptest +$! $ tests_i = 0 $ loop_tests: $ tests_e = f$element(tests_i,",",tests) @@ -138,58 +155,69 @@ $ test_rand: $ mcr 'texe_dir''randtest' $ return $ test_enc: -$ @testenc.com +$ @testenc.com 'pointer_size' $ return $ test_x509: -$ define sys$error nla0: +$ set noon +$ define sys$error test_x509.err $ write sys$output "test normal x509v1 certificate" -$ @tx509.com +$ @tx509.com "" 'pointer_size' $ write sys$output "test first x509v3 certificate" -$ @tx509.com v3-cert1.pem +$ @tx509.com v3-cert1.pem 'pointer_size' $ write sys$output "test second x509v3 certificate" -$ @tx509.com v3-cert2.pem +$ @tx509.com v3-cert2.pem 'pointer_size' $ deassign sys$error +$ set on $ return $ test_rsa: -$ define sys$error nla0: -$ @trsa.com +$ set noon +$ define sys$error test_rsa.err +$ @trsa.com "" 'pointer_size' $ deassign sys$error $ mcr 'texe_dir''rsatest' +$ set on $ return $ test_crl: -$ define sys$error nla0: -$ @tcrl.com +$ set noon +$ define sys$error test_crl.err +$ @tcrl.com "" 'pointer_size' $ deassign sys$error +$ set on $ return $ test_sid: -$ define sys$error nla0: -$ @tsid.com +$ set noon +$ define sys$error test_sid.err +$ @tsid.com "" 'pointer_size' $ deassign sys$error +$ set on $ return $ test_req: -$ define sys$error nla0: -$ @treq.com -$ @treq.com testreq2.pem +$ set noon +$ define sys$error test_req.err +$ @treq.com "" 'pointer_size' +$ @treq.com testreq2.pem 'pointer_size' $ deassign sys$error +$ set on $ return $ test_pkcs7: -$ define sys$error nla0: -$ @tpkcs7.com -$ @tpkcs7d.com +$ set noon +$ define sys$error test_pkcs7.err +$ @tpkcs7.com "" 'pointer_size' +$ @tpkcs7d.com "" 'pointer_size' $ deassign sys$error +$ set on $ return $ test_bn: $ write sys$output - "starting big number library test, could take a while..." $ set noon -$ define sys$error nl: -$ define sys$output nl: +$ define sys$error test_bn.err +$ define sys$output test_bn.out $ @ bctest.com $ status = $status $ deassign sys$error $ deassign sys$output -$ on control_y then goto exit -$ on error then goto exit +$ set on $ if (status) $ then $ create /fdl = sys$input bntest-vms.tmp @@ -218,7 +246,7 @@ RECORD $ open /append bntest_file bntest-vms.sh $ type /output = bntest_file sys$input: << __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"' -$ define/user sys$output bntest-vms.tmp +$ define /user_mode sys$output bntest-vms.tmp $ mcr 'texe_dir''bntest' $ copy bntest-vms.tmp bntest_file $ delete bntest-vms.tmp;* @@ -248,7 +276,7 @@ $ return $ test_verify: $ write sys$output "The following command should have some OK's and some failures" $ write sys$output "There are definitly a few expired certificates" -$ @tverify.com +$ @tverify.com 'pointer_size' $ return $ test_dh: $ write sys$output "Generate a set of DH parameters" @@ -260,7 +288,7 @@ $ mcr 'texe_dir''dsatest' $ return $ test_gen: $ write sys$output "Generate and verify a certificate request" -$ @testgen.com +$ @testgen.com 'pointer_size' $ return $ maybe_test_ss: $ testss_RDT = f$cvtime(f$file_attributes("testss.com","RDT")) @@ -273,7 +301,7 @@ $ if f$cvtime(f$file_attributes("certCA.ss","RDT")) .les. testss_RDT then - $ return $ test_ss: $ write sys$output "Generate and certify a test certificate" -$ @testss.com +$ @testss.com 'pointer_size' $ return $ test_engine: $ write sys$output "Manipulate the ENGINE structures" @@ -282,11 +310,11 @@ $ return $ test_ssl: $ write sys$output "test SSL protocol" $ gosub maybe_test_ss -$ @testssl.com keyU.ss certU.ss certCA.ss +$ @testssl.com keyU.ss certU.ss certCA.ss 'pointer_size' $ return $ test_ca: $ set noon -$ define/user sys$output nla0: +$ define /user_mode sys$output test_ca.out $ mcr 'exe_dir'openssl no-rsa $ save_severity=$SEVERITY $ set on @@ -295,7 +323,7 @@ $ then $ write sys$output "skipping CA.com test -- requires RSA" $ else $ write sys$output "Generate and certify a test certificate via the 'ca' program" -$ @testca.com +$ @testca.com 'pointer_size' $ endif $ return $ test_aes: @@ -304,7 +332,7 @@ $! !mcr 'texe_dir''aestest' $ return $ test_tsa: $ set noon -$ define/user sys$output nla0: +$ define /user_mode sys$output nla0: $ mcr 'exe_dir'openssl no-rsa $ save_severity=$SEVERITY $ set on @@ -312,7 +340,7 @@ $ if save_severity $ then $ write sys$output "skipping testtsa.com test -- requires RSA" $ else -$ @testtsa.com +$ @testtsa.com "" "" "" 'pointer_size' $ endif $ return $ test_ige: @@ -325,10 +353,14 @@ $ mcr 'texe_dir''jpaketest' $ return $ test_cms: $ write sys$output "CMS consistency test" -$ ! The following makes perl include the DCL symbol table in the env. -$ define/user perl_env_tables clisym_local,lnm$file_dev,ctrl_env +$ ! Define the logical name used to find openssl.exe in the perl script. +$ define /user_mode osslx 'exe_dir' $ perl CMS-TEST.PL $ return +$ test_srp: +$ write sys$output "Test SRP" +$ mcr 'texe_dir''srptest' +$ return $ $ $ exit: diff --git a/test/testss.com b/test/testss.com index 6598106b09..32a74d0fc2 100644 --- a/test/testss.com +++ b/test/testss.com @@ -1,16 +1,19 @@ $! TESTSS.COM $ -$ __arch := VAX +$ __arch = "VAX" $ if f$getsyi("cpu") .ge. 128 then - __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") -$ if __arch .eqs. "" then __arch := UNK -$ exe_dir := sys$disk:[-.'__arch'.exe.apps] +$ if __arch .eqs. "" then __arch = "UNK" +$! +$ if (p1 .eqs. "64") then __arch = __arch+ "_64" +$! +$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" $ $ digest="-md5" -$ reqcmd := mcr 'exe_dir'openssl req -$ x509cmd := mcr 'exe_dir'openssl x509 'digest' -$ verifycmd := mcr 'exe_dir'openssl verify -$ dummycnf := sys$disk:[-.apps]openssl-vms.cnf +$ reqcmd = "mcr ''exe_dir'openssl req" +$ x509cmd = "mcr ''exe_dir'openssl x509 ''digest'" +$ verifycmd = "mcr ''exe_dir'openssl verify" +$ dummycnf = "sys$disk:[-.apps]openssl-vms.cnf" $ $ CAkey="""keyCA.ss""" $ CAcert="""certCA.ss""" diff --git a/test/testssl.com b/test/testssl.com index 88580291f1..f19edc4719 100644 --- a/test/testssl.com +++ b/test/testssl.com @@ -1,11 +1,14 @@ $! TESTSSL.COM $ -$ __arch := VAX +$ __arch = "VAX" $ if f$getsyi("cpu") .ge. 128 then - __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") -$ if __arch .eqs. "" then __arch := UNK -$ texe_dir := sys$disk:[-.'__arch'.exe.test] -$ exe_dir := sys$disk:[-.'__arch'.exe.apps] +$ if __arch .eqs. "" then __arch = "UNK" +$! +$ if (p4 .eqs. "64") then __arch = __arch+ "_64" +$! +$ texe_dir = "sys$disk:[-.''__arch'.exe.test]" +$ exe_dir = "sys$disk:[-.''__arch'.exe.apps]" $ $ if p1 .eqs. "" $ then @@ -19,8 +22,9 @@ $ cert="[-.apps]server.pem" $ else $ cert=p2 $ endif -$ ssltest := mcr 'texe_dir'ssltest -key 'key' -cert 'cert' -c_key 'key' -c_cert 'cert' -$ +$ ssltest = "mcr ''texe_dir'ssltest -key ''key'"+ - + " -cert ''cert' -c_key ''key' -c_cert ''cert'" +$! $ set noon $ define/user sys$output testssl-x509-output. $ define/user sys$error nla0: @@ -29,9 +33,9 @@ $ define/user sys$error nla0: $ search/output=nla0: testssl-x509-output. "DSA Public Key"/exact $ if $severity .eq. 1 $ then -$ dsa_cert := YES +$ dsa_cert = "YES" $ else -$ dsa_cert := NO +$ dsa_cert = "NO" $ endif $ delete testssl-x509-output.;* $ diff --git a/test/testtsa.com b/test/testtsa.com index 2ca1adac59..29fb1d0e63 100644 --- a/test/testtsa.com +++ b/test/testtsa.com @@ -2,14 +2,17 @@ $! $! A few very basic tests for the 'ts' time stamping authority command. $! $ |