summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2009-05-15 16:37:08 +0000
committerRichard Levitte <levitte@openssl.org>2009-05-15 16:37:08 +0000
commit006c7c6bb1fbf13295a531bf5ee55e8e6fb0a501 (patch)
treeaff8907d76668bd049098e7da93c75fccdb29491 /test
parentbd4a902a1506f00e3d738a7c87a606c15adf8f59 (diff)
Functional VMS changes submitted by sms@antinode.info (Steven M. Schweda).
Thank you\! (note: not tested for now, a few nightly builds should give indications though)
Diffstat (limited to 'test')
-rw-r--r--test/maketests.com58
-rw-r--r--test/tcrl.com4
-rw-r--r--test/testca.com5
-rw-r--r--test/testenc.com5
-rw-r--r--test/testgen.com5
-rw-r--r--test/tests.com7
-rw-r--r--test/testss.com4
-rw-r--r--test/testssl.com4
-rw-r--r--test/tpkcs7.com4
-rw-r--r--test/tpkcs7d.com4
-rw-r--r--test/treq.com4
-rw-r--r--test/trsa.com4
-rw-r--r--test/tsid.com4
-rw-r--r--test/tverify.com78
-rw-r--r--test/tx509.com4
15 files changed, 129 insertions, 65 deletions
diff --git a/test/maketests.com b/test/maketests.com
index 103b211044..7316be98cf 100644
--- a/test/maketests.com
+++ b/test/maketests.com
@@ -12,9 +12,9 @@ $! "test" programs for the different types of encryption for OpenSSL.
$! It was written so it would try to determine what "C" compiler to
$! use or you can specify which "C" compiler to use.
$!
-$! The test "executeables" will be placed in a directory called
-$! [.xxx.EXE.TEST] where "xxx" denotes AXP or VAX depending on your machines
-$! architecture.
+$! The test "executables" will be placed in a directory called
+$! [.xxx.EXE.TEST] where "xxx" denotes ALPHA, IA64, or VAX, depending
+$! on your machine architecture.
$!
$! Specify DEBUG or NODEBUG P1 to compile with or without debugger
$! information.
@@ -42,27 +42,36 @@ $! (That is, If Wee Need To Link To One.)
$!
$ TCPIP_LIB = ""
$!
-$! Check Which Architecture We Are Using.
+$! Check What Architecture We Are Using.
$!
-$ IF (F$GETSYI("CPU").GE.128)
+$ IF (F$GETSYI("CPU").LT.128)
$ THEN
$!
-$! The Architecture Is AXP.
+$! The Architecture Is VAX.
$!
-$ ARCH := AXP
+$ ARCH := VAX
$!
$! Else...
$!
$ ELSE
$!
-$! The Architecture Is VAX.
+$! The Architecture Is Alpha, IA64 or whatever comes in the future.
$!
-$ ARCH := VAX
+$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
+$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
$!
$! End The Architecture Check.
$!
$ ENDIF
$!
+$! Define The OBJ Directory.
+$!
+$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.TEST]
+$!
+$! Define The EXE Directory.
+$!
+$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.TEST]
+$!
$! Check To Make Sure We Have Valid Command Line Parameters.
$!
$ GOSUB CHECK_OPTIONS
@@ -83,10 +92,6 @@ $! Define The SSL We Are To Use.
$!
$ SSL_LIB := SYS$DISK:[-.'ARCH'.EXE.SSL]LIBSSL.OLB
$!
-$! Define The OBJ Directory.
-$!
-$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.TEST]
-$!
$! Check To See If The Architecture Specific OBJ Directory Exists.
$!
$ IF (F$PARSE(OBJ_DIR).EQS."")
@@ -100,10 +105,6 @@ $! End The Architecture Specific OBJ Directory Check.
$!
$ ENDIF
$!
-$! Define The EXE Directory.
-$!
-$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.TEST]
-$!
$! Check To See If The Architecture Specific EXE Directory Exists.
$!
$ IF (F$PARSE(EXE_DIR).EQS."")
@@ -126,6 +127,9 @@ $!
$ GOSUB CHECK_OPT_FILE
$!
$! Define The TEST Files.
+$! NOTE: Some might think this list ugly. However, it's made this way to
+$! reflect the EXE variable in Makefile as closely as possible,
+$! thereby making it fairly easy to verify that the lists are the same.
$!
$ TEST_FILES = "BNTEST,ECTEST,ECDSATEST,ECDHTEST,IDEATEST,"+ -
"MD2TEST,MD4TEST,MD5TEST,HMACTEST,WP_TEST,"+ -
@@ -327,7 +331,7 @@ $!
$ IF (F$SEARCH(OPT_FILE).EQS."")
$ THEN
$!
-$! Figure Out If We Need An AXP Or A VAX Linker Option File.
+$! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
$!
$ IF (ARCH.EQS."VAX")
$ THEN
@@ -347,19 +351,19 @@ $! Else...
$!
$ ELSE
$!
-$! Create The AXP Linker Option File.
+$! Create The non-VAX Linker Option File.
$!
$ CREATE 'OPT_FILE'
$DECK
!
-! Default System Options File For AXP To Link Agianst
+! Default System Options File For non-VAX To Link Agianst
! The Sharable C Runtime Library.
!
SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
SYS$SHARE:CMA$OPEN_RTL/SHARE
$EOD
$!
-$! End The VAX/AXP DEC C Option File Check.
+$! End The DEC C Option File Check.
$!
$ ENDIF
$!
@@ -511,7 +515,7 @@ $ ELSE
$!
$! Check To See If We Have VAXC Or DECC.
$!
-$ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
+$ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
$ THEN
$!
$! Looks Like DECC, Set To Use DECC.
@@ -621,7 +625,7 @@ $ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
$!
$! Define The Linker Options File Name.
$!
-$ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
+$ OPT_FILE = "''EXE_DIR'VAX_DECC_OPTIONS.OPT"
$!
$! End DECC Check.
$!
@@ -643,9 +647,9 @@ $!
$! Compile Using VAXC.
$!
$ CC = "CC"
-$ IF ARCH.EQS."AXP"
+$ IF ARCH.NES."VAX"
$ THEN
-$ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
+$ WRITE SYS$OUTPUT "There is no VAX C on ''ARCH'!"
$ EXIT
$ ENDIF
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
@@ -659,7 +663,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
$!
$! Define The Linker Options File Name.
$!
-$ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
+$ OPT_FILE = "''EXE_DIR'VAX_VAXC_OPTIONS.OPT"
$!
$! End VAXC Check
$!
@@ -685,7 +689,7 @@ $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
$!
$! Define The Linker Options File Name.
$!
-$ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
+$ OPT_FILE = "''EXE_DIR'VAX_GNUC_OPTIONS.OPT"
$!
$! End The GNU C Check.
$!
diff --git a/test/tcrl.com b/test/tcrl.com
index 86bf9735aa..4856709569 100644
--- a/test/tcrl.com
+++ b/test/tcrl.com
@@ -1,7 +1,9 @@
$! TCRL.COM -- Tests crl keys
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
$ cmd := mcr 'exe_dir'openssl crl
diff --git a/test/testca.com b/test/testca.com
index 2bef904948..e9e98736a7 100644
--- a/test/testca.com
+++ b/test/testca.com
@@ -1,8 +1,9 @@
$! TESTCA.COM
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
-$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$ if f$getsyi("cpu") .ge. 128 then -
+ __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ if __arch .eqs. "" then __arch := UNK
$
$ openssl := mcr 'exe_dir'openssl
$
diff --git a/test/testenc.com b/test/testenc.com
index 5e6f521f9d..4a46ce9f06 100644
--- a/test/testenc.com
+++ b/test/testenc.com
@@ -1,8 +1,9 @@
$! TESTENC.COM -- Test encoding and decoding
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
-$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$ if f$getsyi("cpu") .ge. 128 then -
+ __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ if __arch .eqs. "" then __arch := UNK
$
$ testsrc := makefile.
$ test := p.txt
diff --git a/test/testgen.com b/test/testgen.com
index 5d28ebec72..ee62c4c1b5 100644
--- a/test/testgen.com
+++ b/test/testgen.com
@@ -1,8 +1,9 @@
$! TETSGEN.COM
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
-$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$ if f$getsyi("cpu") .ge. 128 then -
+ __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ if __arch .eqs. "" then __arch := UNK
$
$ T := testcert
$ KEY = 512
diff --git a/test/tests.com b/test/tests.com
index b3ebd57951..702d087107 100644
--- a/test/tests.com
+++ b/test/tests.com
@@ -6,7 +6,9 @@ $ __proc = f$element(0,";",f$environment("procedure"))
$ __here = f$parse(f$parse("A.;",__proc) - "A.;","[]A.;") - "A.;"
$ __save_default = f$environment("default")
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
@@ -18,6 +20,9 @@ $ if p1 .nes. ""
$ then
$ tests = p1
$ else
+$! NOTE: This list reflects the list of dependencies following the
+$! "alltests" target in Makefile. This should make it easy to see
+$! if there's a difference that needs to be taken care of.
$ tests := -
test_des,test_idea,test_sha,test_md4,test_md5,test_hmac,-
test_md2,test_mdc2,test_wp,-
diff --git a/test/testss.com b/test/testss.com
index 685ae5043d..6b31f72c31 100644
--- a/test/testss.com
+++ b/test/testss.com
@@ -1,7 +1,9 @@
$! TESTSS.COM
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
$ digest="-md5"
diff --git a/test/testssl.com b/test/testssl.com
index 26308f7715..b79d470a14 100644
--- a/test/testssl.com
+++ b/test/testssl.com
@@ -1,7 +1,9 @@
$! TESTSSL.COM
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
diff --git a/test/tpkcs7.com b/test/tpkcs7.com
index 047834fba4..31a86d3cdd 100644
--- a/test/tpkcs7.com
+++ b/test/tpkcs7.com
@@ -1,7 +1,9 @@
$! TPKCS7.COM -- Tests pkcs7 keys
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
$ cmd := mcr 'exe_dir'openssl pkcs7
diff --git a/test/tpkcs7d.com b/test/tpkcs7d.com
index 193bb72137..22f0d0b2c5 100644
--- a/test/tpkcs7d.com
+++ b/test/tpkcs7d.com
@@ -1,7 +1,9 @@
$! TPKCS7.COM -- Tests pkcs7 keys
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
$ cmd := mcr 'exe_dir'openssl pkcs7
diff --git a/test/treq.com b/test/treq.com
index 5524e485ba..7b9cb9897c 100644
--- a/test/treq.com
+++ b/test/treq.com
@@ -1,7 +1,9 @@
$! TREQ.COM -- Tests req keys
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
$ cmd := mcr 'exe_dir'openssl req -config [-.apps]openssl-vms.cnf
diff --git a/test/trsa.com b/test/trsa.com
index 6dbe59ef64..aa15c4726f 100644
--- a/test/trsa.com
+++ b/test/trsa.com
@@ -1,7 +1,9 @@
$! TRSA.COM -- Tests rsa keys
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
$ set noon
diff --git a/test/tsid.com b/test/tsid.com
index abd1d4d737..e4316b966b 100644
--- a/test/tsid.com
+++ b/test/tsid.com
@@ -1,7 +1,9 @@
$! TSID.COM -- Tests sid keys
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
$ cmd := mcr 'exe_dir'openssl sess_id
diff --git a/test/tverify.com b/test/tverify.com
index 021d701d79..2c5f25a97c 100644
--- a/test/tverify.com
+++ b/test/tverify.com
@@ -1,29 +1,63 @@
$! TVERIFY.COM
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ if f$getsyi("cpu") .ge. 128 then -
+ __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ if __arch .eqs. "" then __arch := UNK
+$!
+$ line_max = 255 ! Could be longer on modern non-VAX.
+$ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp"
$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
-$
-$ copy/concatenate [-.certs]*.pem certs.tmp
-$
+$ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'"
+$ cmd_len = f$length( cmd)
+$ pems = "[-.certs...]*.pem"
+$!
+$! Concatenate all the certificate files.
+$!
+$ copy /concatenate 'pems' 'temp_file_name'
+$!
+$! Loop through all the certificate files.
+$!
+$ args = ""
$ old_f :=
-$ loop_certs:
-$ verify := NO
-$ more := YES
-$ certs :=
-$ loop_certs2:
-$ f = f$search("[-.certs]*.pem")
-$ if f .nes. "" .and. f .nes. old_f
+$ loop_file:
+$ f = f$search( pems)
+$ if ((f .nes. "") .and. (f .nes. old_f))
+$ then
+$ old_f = f
+$!
+$! If this file name would over-extend the command line, then
+$! run the command now.
+$!
+$ if (cmd_len+ f$length( args)+ 1+ f$length( f) .gt. line_max)
+$ then
+$ if (args .eqs. "") then goto disaster
+$ 'cmd''args'
+$ args = ""
+$ endif
+$! Add the next file to the argument list.
+$ args = args+ " "+ f
+$ else
+$! No more files in the list
+$ goto loop_file_end
+$ endif
+$ goto loop_file
+$ loop_file_end:
+$!
+$! Run the command for any left-over arguments.
+$!
+$ if (args .nes. "")
$ then
-$ certs = certs + " [-.certs]" + f$parse(f,,,"NAME") + ".pem"
-$ verify := YES
-$ if f$length(certs) .lt. 180 then goto loop_certs2
-$ else
-$ more := NO
+$ 'cmd''args'
$ endif
-$ certs = certs - " "
-$
-$ if verify then mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs'
-$ if more then goto loop_certs
-$
-$ delete certs.tmp;*
+$!
+$! Delete the temporary file.
+$!
+$ if (f$search( "''temp_file_name';*") .nes. "") then -
+ delete 'temp_file_name';*
+$!
+$ exit
+$!
+$ disaster:
+$ write sys$output " Command line too long. Doomed."
+$!
diff --git a/test/tx509.com b/test/tx509.com
index 7b2592f773..cd23a354fb 100644
--- a/test/tx509.com
+++ b/test/tx509.com
@@ -1,7 +1,9 @@
$! TX509.COM -- Tests x509 certificates
$
$ __arch := VAX
-$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ 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]
$
$ cmd := mcr 'exe_dir'openssl x509