summaryrefslogtreecommitdiff
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
parentbd4a902a1506f00e3d738a7c87a606c15adf8f59 (diff)
downloadopenssl-new-006c7c6bb1fbf13295a531bf5ee55e8e6fb0a501.tar.gz
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)
-rw-r--r--VMS/install.com25
-rw-r--r--VMS/mkshared.com63
-rw-r--r--VMS/openssl_utils.com62
-rw-r--r--apps/install.com42
-rw-r--r--apps/makeapps.com66
-rw-r--r--crypto/crypto-lib.com91
-rw-r--r--crypto/des/des-lib.com54
-rw-r--r--crypto/install.com39
-rw-r--r--crypto/threads/pthreads-vms.com9
-rw-r--r--demos/engines/rsaref/build.com34
-rw-r--r--engines/makeengines.com72
-rw-r--r--install.com62
-rwxr-xr-xmakevms.com115
-rw-r--r--ssl/install.com69
-rw-r--r--ssl/ssl-lib.com60
-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
30 files changed, 623 insertions, 434 deletions
diff --git a/VMS/install.com b/VMS/install.com
index f62635f24d..9c9c0e1e27 100644
--- a/VMS/install.com
+++ b/VMS/install.com
@@ -12,6 +12,14 @@ $ WRITE SYS$OUTPUT "Should be the directory where you want things installed.
$ EXIT
$ ENDIF
$
+$ IF (F$GETSYI("CPU").LT.128)
+$ THEN
+$ ARCH := VAX
+$ ELSE
+$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
+$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
+$ ENDIF
+$
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
@@ -19,13 +27,7 @@ $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
$
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
-$ DEFINE/NOLOG WRK_SSLVLIB WRK_SSLROOT:[VAX_LIB]
-$ DEFINE/NOLOG WRK_SSLALIB WRK_SSLROOT:[ALPHA_LIB]
$ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
-$ DEFINE/NOLOG WRK_SSLVEXE WRK_SSLROOT:[VAX_EXE]
-$ DEFINE/NOLOG WRK_SSLAEXE WRK_SSLROOT:[ALPHA_EXE]
-$ DEFINE/NOLOG WRK_SSLCERTS WRK_SSLROOT:[CERTS]
-$ DEFINE/NOLOG WRK_SSLPRIVATE WRK_SSLROOT:[PRIVATE]
$
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
CREATE/DIR/LOG WRK_SSLROOT:[000000]
@@ -39,7 +41,7 @@ $ IF F$SEARCH("WRK_SSLINCLUDE:vms_idhacks.h") .NES. "" THEN -
$
$ OPEN/WRITE SF WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM
$ WRITE SYS$OUTPUT "%OPEN-I-CREATED, ",F$SEARCH("WRK_SSLROOT:[VMS]OPENSSL_STARTUP.COM")," created."
-$ WRITE SF "$! Startup file for Openssl 0.9.2-RL 15-Mar-1999"
+$ WRITE SF "$! Startup file for Openssl"
$ WRITE SF "$!"
$ WRITE SF "$! Do not edit this file, as it will be regenerated during next installation."
$ WRITE SF "$! Instead, add or change SSLROOT:[VMS]OPENSSL_SYSTARTUP.COM"
@@ -47,8 +49,13 @@ $ WRITE SF "$!"
$ WRITE SF "$! P1 a qualifier to DEFINE. For example ""/SYSTEM"" to get the logical names"
$ WRITE SF "$! defined in the system logical name table."
$ WRITE SF "$!"
-$ WRITE SF "$ ARCH = ""VAX"""
-$ WRITE SF "$ IF F$GETSYI(""CPU"") .GE. 128 THEN ARCH = ""ALPHA"""
+$ WRITE SF "$ IF (F$GETSYI(""CPU"").LT.128)"
+$ WRITE SF "$ THEN"
+$ WRITE SF "$ ARCH := VAX"
+$ WRITE SF "$ ELSE"
+$ WRITE SF "$ ARCH = F$EDIT( F$GETSYI( ""ARCH_NAME""), ""UPCASE"")"
+$ WRITE SF "$ IF (ARCH .EQS. """") THEN ARCH = ""UNK"""
+$ WRITE SF "$ ENDIF"
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLROOT ",ROOT,".] /TRANS=CONC"
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLLIB SSLROOT:['ARCH'_LIB]"
$ WRITE SF "$ DEFINE/NOLOG'P1 SSLINCLUDE SSLROOT:[INCLUDE]"
diff --git a/VMS/mkshared.com b/VMS/mkshared.com
index 1356fb9dd7..c8acd2adeb 100644
--- a/VMS/mkshared.com
+++ b/VMS/mkshared.com
@@ -3,10 +3,10 @@ $!
$! No command line parameters. This should be run at the start of the source
$! tree (the same directory where one finds INSTALL.VMS).
$!
-$! Input: [.UTIL]LIBEAY.NUM,[.AXP.EXE.CRYPTO]LIBCRYPTO.OLB
-$! [.UTIL]SSLEAY.NUM,[.AXP.EXE.SSL]LIBSSL.OLB
-$! Output: [.AXP.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE
-$! [.AXP.EXE.SSL]LIBSSL.OPT,.MAP,.EXE
+$! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB
+$! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]LIBSSL.OLB
+$! Output: [.xxx.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE
+$! [.xxx.EXE.SSL]LIBSSL.OPT,.MAP,.EXE
$!
$! So far, tests have only been made on VMS for Alpha. VAX will come in time.
$! ===========================================================================
@@ -19,31 +19,41 @@ $ write sys$error "ERROR: Couldn't find any library version info..."
$ exit
$ endif
$
-$ if f$getsyi("CPU") .ge. 128
+$ if (f$getsyi("cpu").lt.128)
$ then
+$ arch := VAX
+$ else
+$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ if (arch .eqs. "") then arch = "UNK"
+$ endif
+$
+$ if arch .nes. "VAX"
+$ then
+$ arch_vax = 0
$ libid = "Crypto"
$ libnum = "[.UTIL]LIBEAY.NUM"
-$ libdir = "[.AXP.EXE.CRYPTO]"
+$ libdir = "[.''ARCH'.EXE.CRYPTO]"
$ libolb = "''libdir'LIBCRYPTO.OLB"
$ libopt = "''libdir'LIBCRYPTO.OPT"
$ libmap = "''libdir'LIBCRYPTO.MAP"
$ libgoal= "''libdir'LIBCRYPTO.EXE"
$ libref = ""
-$ gosub create_axp_shr
+$ gosub create_nonvax_shr
$ libid = "SSL"
$ libnum = "[.UTIL]SSLEAY.NUM"
-$ libdir = "[.AXP.EXE.SSL]"
+$ libdir = "[.''ARCH'.EXE.SSL]"
$ libolb = "''libdir'LIBSSL.OLB"
$ libopt = "''libdir'LIBSSL.OPT"
$ libmap = "''libdir'LIBSSL.MAP"
$ libgoal= "''libdir'LIBSSL.EXE"
-$ libref = "[.AXP.EXE.CRYPTO]LIBCRYPTO.EXE"
-$ gosub create_axp_shr
+$ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE"
+$ gosub create_nonvax_shr
$ else
+$ arch_vax = 1
$ libtit = "CRYPTO_TRANSFER_VECTOR"
$ libid = "Crypto"
$ libnum = "[.UTIL]LIBEAY.NUM"
-$ libdir = "[.VAX.EXE.CRYPTO]"
+$ libdir = "[.''ARCH'.EXE.CRYPTO]"
$ libmar = "''libdir'LIBCRYPTO.MAR"
$ libolb = "''libdir'LIBCRYPTO.OLB"
$ libopt = "''libdir'LIBCRYPTO.OPT"
@@ -56,22 +66,22 @@ $ gosub create_vax_shr
$ libtit = "SSL_TRANSFER_VECTOR"
$ libid = "SSL"
$ libnum = "[.UTIL]SSLEAY.NUM"
-$ libdir = "[.VAX.EXE.SSL]"
+$ libdir = "[.''ARCH'.EXE.SSL]"
$ libmar = "''libdir'LIBSSL.MAR"
$ libolb = "''libdir'LIBSSL.OLB"
$ libopt = "''libdir'LIBSSL.OPT"
$ libobj = "''libdir'LIBSSL.OBJ"
$ libmap = "''libdir'LIBSSL.MAP"
$ libgoal= "''libdir'LIBSSL.EXE"
-$ libref = "[.VAX.EXE.CRYPTO]LIBCRYPTO.EXE"
+$ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE"
$ libvec = "LIBSSL"
$ gosub create_vax_shr
$ endif
$ exit
$
-$! ----- Soubroutines to actually build the shareable libraries
-$! The way things work, there's a main shareable library creator for each
-$! supported architecture, which is called from the main code above.
+$! ----- Soubroutines to build the shareable libraries
+$! For each supported architecture, there's a main shareable library
+$! creator, which is called from the main code above.
$! The creator will define a number of variables to tell the next levels of
$! subroutines what routines to use to write to the option files, call the
$! main processor, read_func_num, and when that is done, it will write version
@@ -97,10 +107,10 @@ $! read_func_num depends on the following variables from the creator:
$! libwriter The name of the writer routine to call for each .num file line
$! -----
$
-$! ----- Subroutines for AXP
+$! ----- Subroutines for non-VAX
$! -----
$! The creator routine
-$ create_axp_shr:
+$ create_nonvax_shr:
$ open/write opt 'libopt'
$ write opt "identification=""",libid," ",libverstr,""""
$ write opt libolb,"/lib"
@@ -108,7 +118,7 @@ $ if libref .nes. "" then write opt libref,"/SHARE"
$ write opt "SYMBOL_VECTOR=(-"
$ libfirstentry := true
$ libwrch := opt
-$ libwriter := write_axp_transfer_entry
+$ libwriter := write_nonvax_transfer_entry
$ textcount = 0
$ gosub read_func_num
$ write opt ")"
@@ -118,7 +128,7 @@ $ link/map='libmap'/full/share='libgoal' 'libopt'/option
$ return
$
$! The record writer routine
-$ write_axp_transfer_entry:
+$ write_nonvax_transfer_entry:
$ if libentry .eqs. ".dummy" then return
$ if info_kind .eqs. "VARIABLE"
$ then
@@ -144,7 +154,7 @@ $ libfirstentry := false
$ textcount = textcount + textcount_this
$ return
$
-$! ----- Subroutines for AXP
+$! ----- Subroutines for VAX
$! -----
$! The creator routine
$ create_vax_shr:
@@ -264,8 +274,15 @@ $ truesum = truesum + 1
$ if plat_entry .eqs. "!EXPORT_VAR_AS_FUNCTION" then -
$ falsesum = falsesum + 1
$ endif
-$ if plat_entry .eqs. "VMS" then truesum = truesum + 1
-$ if plat_entry .eqs. "!VMS" then falsesum = falsesum + 1
+$!
+$ if ((plat_entry .eqs. "VMS") .or. -
+ (arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then -
+ truesum = truesum + 1
+$!
+$ if ((plat_entry .eqs. "!VMS") .or. -
+ (arch_vax .and. (plat_entry .eqs. "!VMSVAX"))) then -
+ falsesum = falsesum + 1
+$!
$ goto loop1
$ endif
$ endloop1:
diff --git a/VMS/openssl_utils.com b/VMS/openssl_utils.com
index ddc107394f..64f4915104 100644
--- a/VMS/openssl_utils.com
+++ b/VMS/openssl_utils.com
@@ -8,31 +8,39 @@ $!
$!
$! Slightly modified by Richard Levitte <richard@levitte.org>
$!
+$!
+$! Always define OPENSSL. Others are optional (non-null P1).
+$!
$ OPENSSL :== $SSLEXE:OPENSSL
-$ VERIFY :== $SSLEXE:OPENSSL VERIFY
-$ ASN1PARSE:== $SSLEXE:OPENSSL ASN1PARS
-$ REQ :== $SSLEXE:OPENSSL REQ
-$ DGST :== $SSLEXE:OPENSSL DGST
-$ DH :== $SSLEXE:OPENSSL DH
-$ ENC :== $SSLEXE:OPENSSL ENC
-$ GENDH :== $SSLEXE:OPENSSL GENDH
-$ ERRSTR :== $SSLEXE:OPENSSL ERRSTR
-$ CA :== $SSLEXE:OPENSSL CA
-$ CRL :== $SSLEXE:OPENSSL CRL
-$ RSA :== $SSLEXE:OPENSSL RSA
-$ DSA :== $SSLEXE:OPENSSL DSA
-$ DSAPARAM :== $SSLEXE:OPENSSL DSAPARAM
-$ X509 :== $SSLEXE:OPENSSL X509
-$ GENRSA :== $SSLEXE:OPENSSL GENRSA
-$ GENDSA :== $SSLEXE:OPENSSL GENDSA
-$ S_SERVER :== $SSLEXE:OPENSSL S_SERVER
-$ S_CLIENT :== $SSLEXE:OPENSSL S_CLIENT
-$ SPEED :== $SSLEXE:OPENSSL SPEED
-$ S_TIME :== $SSLEXE:OPENSSL S_TIME
-$ VERSION :== $SSLEXE:OPENSSL VERSION
-$ PKCS7 :== $SSLEXE:OPENSSL PKCS7
-$ CRL2PKCS7:== $SSLEXE:OPENSSL CRL2P7
-$ SESS_ID :== $SSLEXE:OPENSSL SESS_ID
-$ CIPHERS :== $SSLEXE:OPENSSL CIPHERS
-$ NSEQ :== $SSLEXE:OPENSSL NSEQ
-$ PKCS12 :== $SSLEXE:OPENSSL PKCS12
+$
+$ IF (P1 .NES. "")
+$ THEN
+$ VERIFY :== $SSLEXE:OPENSSL VERIFY
+$ ASN1PARSE:== $SSLEXE:OPENSSL ASN1PARS
+$! REQ could conflict with REQUEST.
+$ OREQ :== $SSLEXE:OPENSSL REQ
+$ DGST :== $SSLEXE:OPENSSL DGST
+$ DH :== $SSLEXE:OPENSSL DH
+$ ENC :== $SSLEXE:OPENSSL ENC
+$ GENDH :== $SSLEXE:OPENSSL GENDH
+$ ERRSTR :== $SSLEXE:OPENSSL ERRSTR
+$ CA :== $SSLEXE:OPENSSL CA
+$ CRL :== $SSLEXE:OPENSSL CRL
+$ RSA :== $SSLEXE:OPENSSL RSA
+$ DSA :== $SSLEXE:OPENSSL DSA
+$ DSAPARAM :== $SSLEXE:OPENSSL DSAPARAM
+$ X509 :== $SSLEXE:OPENSSL X509
+$ GENRSA :== $SSLEXE:OPENSSL GENRSA
+$ GENDSA :== $SSLEXE:OPENSSL GENDSA
+$ S_SERVER :== $SSLEXE:OPENSSL S_SERVER
+$ S_CLIENT :== $SSLEXE:OPENSSL S_CLIENT
+$ SPEED :== $SSLEXE:OPENSSL SPEED
+$ S_TIME :== $SSLEXE:OPENSSL S_TIME
+$ VERSION :== $SSLEXE:OPENSSL VERSION
+$ PKCS7 :== $SSLEXE:OPENSSL PKCS7
+$ CRL2PKCS7:== $SSLEXE:OPENSSL CRL2P7
+$ SESS_ID :== $SSLEXE:OPENSSL SESS_ID
+$ CIPHERS :== $SSLEXE:OPENSSL CIPHERS
+$ NSEQ :== $SSLEXE:OPENSSL NSEQ
+$ PKCS12 :== $SSLEXE:OPENSSL PKCS12
+$ ENDIF
diff --git a/apps/install.com b/apps/install.com
index f927dc29f5..080415e62e 100644
--- a/apps/install.com
+++ b/apps/install.com
@@ -5,13 +5,23 @@ $! Time of creation: 22-MAY-1998 10:13
$!
$! P1 root of the directory tree
$!
+$
$ IF P1 .EQS. ""
$ THEN
$ WRITE SYS$OUTPUT "First argument missing."
-$ WRITE SYS$OUTPUT "Should be the directory where you want things installed."
+$ WRITE SYS$OUTPUT -
+ "Should be the directory where you want things installed."
$ EXIT
$ ENDIF
$
+$ IF (F$GETSYI("CPU").LT.128)
+$ THEN
+$ ARCH := VAX
+$ ELSE
+$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
+$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
+$ ENDIF
+$
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
@@ -19,23 +29,16 @@ $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
$
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
-$ DEFINE/NOLOG WRK_SSLVEXE WRK_SSLROOT:[VAX_EXE]
-$ DEFINE/NOLOG WRK_SSLAEXE WRK_SSLROOT:[ALPHA_EXE]
-$ DEFINE/NOLOG WRK_SSLLIB WRK_SSLROOT:[LIB]
+$ DEFINE/NOLOG WRK_SSLEXE WRK_SSLROOT:['ARCH'_EXE]
$
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
CREATE/DIR/LOG WRK_SSLROOT:[000000]
-$ IF F$PARSE("WRK_SSLVEXE:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLVEXE:
-$ IF F$PARSE("WRK_SSLAEXE:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLAEXE:
-$ IF F$PARSE("WRK_SSLLIB:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLLIB:
+$ IF F$PARSE("WRK_SSLEXE:") .EQS. "" THEN -
+ CREATE/DIR/LOG WRK_SSLEXE:
$
$ EXE := openssl
$
-$ VEXE_DIR := [-.VAX.EXE.APPS]
-$ AEXE_DIR := [-.AXP.EXE.APPS]
+$ EXE_DIR := [-.'ARCH'.EXE.APPS]
$
$ I = 0
$ LOOP_EXE:
@@ -43,24 +46,17 @@ $ E = F$EDIT(F$ELEMENT(I, ",", EXE),"TRIM")
$ I = I + 1
$ IF E .EQS. "," THEN GOTO LOOP_EXE_END
$ SET NOON
-$ IF F$SEARCH(VEXE_DIR+E+".EXE") .NES. ""
-$ THEN
-$ COPY 'VEXE_DIR''E'.EXE WRK_SSLVEXE:'E'.EXE/log
-$ SET FILE/PROT=W:RE WRK_SSLVEXE:'E'.EXE
-$ ENDIF
-$ IF F$SEARCH(AEXE_DIR+E+".EXE") .NES. ""
+$ IF F$SEARCH(EXE_DIR+E+".EXE") .NES. ""
$ THEN
-$ COPY 'AEXE_DIR''E'.EXE WRK_SSLAEXE:'E'.EXE/log
-$ SET FILE/PROT=W:RE WRK_SSLAEXE:'E'.EXE
+$ COPY 'EXE_DIR''E'.EXE WRK_SSLEXE:'E'.EXE/log
+$ SET FILE/PROT=W:RE WRK_SSLEXE:'E'.EXE
$ ENDIF
$ SET ON
$ GOTO LOOP_EXE
$ LOOP_EXE_END:
$
$ SET NOON
-$ COPY CA.COM WRK_SSLAEXE:CA.COM/LOG
-$ SET FILE/PROT=W:RE WRK_SSLAEXE:CA.COM
-$ COPY CA.COM WRK_SSLVEXE:CA.COM/LOG
+$ COPY CA.COM WRK_SSLEXE:CA.COM/LOG
$ SET FILE/PROT=W:RE WRK_SSLVEXE:CA.COM
$ COPY OPENSSL-VMS.CNF WRK_SSLROOT:[000000]OPENSSL.CNF/LOG
$ SET FILE/PROT=W:R WRK_SSLROOT:[000000]OPENSSL.CNF
diff --git a/apps/makeapps.com b/apps/makeapps.com
index 2e90443fbc..5bfe311ca2 100644
--- a/apps/makeapps.com
+++ b/apps/makeapps.com
@@ -10,7 +10,7 @@ $!
$! This command files compiles and creates all the various different
$! "application" programs for the different types of encryption for OpenSSL.
$! The EXE's are placed in the directory [.xxx.EXE.APPS] where "xxx" denotes
-$! either AXP or VAX depending on your machine architecture.
+$! ALPHA, IA64 or VAX, depending on your machine architecture.
$!
$! It was written so it would try to determine what "C" compiler to
$! use or you can specify which "C" compiler to use.
@@ -46,20 +46,21 @@ $ TCPIP_LIB = ""
$!
$! 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.
$!
@@ -69,18 +70,6 @@ $! Define what programs should be compiled
$!
$ PROGRAMS := OPENSSL
$!
-$! Check To Make Sure We Have Valid Command Line Parameters.
-$!
-$ GOSUB CHECK_OPTIONS
-$!
-$! Initialise logical names and such
-$!
-$ GOSUB INITIALISE
-$!
-$! Tell The User What Kind of Machine We Run On.
-$!
-$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
-$!
$! Define The CRYPTO Library.
$!
$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
@@ -93,6 +82,22 @@ $! Define The OBJ Directory.
$!
$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.APPS]
$!
+$! Define The EXE Directory.
+$!
+$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.APPS]
+$!
+$! Check To Make Sure We Have Valid Command Line Parameters.
+$!
+$ GOSUB CHECK_OPTIONS
+$!
+$! Initialise logical names and such
+$!
+$ GOSUB INITIALISE
+$!
+$! Tell The User What Kind of Machine We Run On.
+$!
+$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
+$!
$! Check To See If The OBJ Directory Exists.
$!
$ IF (F$PARSE(OBJ_DIR).EQS."")
@@ -106,10 +111,6 @@ $! End The OBJ Directory Check.
$!
$ ENDIF
$!
-$! Define The EXE Directory.
-$!
-$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.APPS]
-$!
$! Check To See If The EXE Directory Exists.
$!
$ IF (F$PARSE(EXE_DIR).EQS."")
@@ -132,6 +133,9 @@ $!
$ GOSUB CHECK_OPT_FILE
$!
$! Define The Application Files.
+$! NOTE: Some might think this list ugly. However, it's made this way to
+$! reflect the E_OBJ variable in Makefile as closely as possible, thereby
+$! making it fairly easy to verify that the lists are the same.
$!
$ LIB_OPENSSL = "VERIFY,ASN1PARS,REQ,DGST,DH,DHPARAM,ENC,PASSWD,GENDH,ERRSTR,"+-
"CA,PKCS7,CRL2P7,CRL,"+-
@@ -420,19 +424,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
$!
@@ -581,7 +585,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.
@@ -691,7 +695,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.
$!
@@ -712,9 +716,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"
@@ -728,7 +732,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
$!
@@ -755,7 +759,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/crypto/crypto-lib.com b/crypto/crypto-lib.com
index e9a1eeff1d..4535b58c3f 100644
--- a/crypto/crypto-lib.com
+++ b/crypto/crypto-lib.com
@@ -8,8 +8,8 @@ $!
$! Changes by Richard Levitte <richard@levitte.org>
$!
$! This command files compiles and creates the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
-$! library for OpenSSL. The "xxx" denotes the machine architecture of AXP
-$! or VAX.
+$! library for OpenSSL. The "xxx" denotes the machine architecture, ALPHA,
+$! IA64 or VAX.
$!
$! It was re-written so it would try to determine what "C" compiler to use
$! or you can specify which "C" compiler to use.
@@ -17,28 +17,28 @@ $!
$! Specify the following as P1 to build just that part or ALL to just
$! build everything.
$!
-$! LIBRARY To just compile the [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
-$! APPS To just compile the [.xxx.EXE.CRYPTO]*.EXE
-$! ALL To do both LIBRARY and APPS
+$! LIBRARY To just compile the [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
+$! APPS To just compile the [.xxx.EXE.CRYPTO]*.EXE
+$! ALL To do both LIBRARY and APPS
$!
$! Specify DEBUG or NODEBUG as P2 to compile with or without debugger
$! information.
$!
$! Specify which compiler at P3 to try to compile under.
$!
-$! VAXC For VAX C.
-$! DECC For DEC C.
-$! GNUC For GNU C.
+$! VAXC For VAX C.
+$! DECC For DEC C.
+$! GNUC For GNU C.
$!
-$! If you don't speficy a compiler, it will try to determine which
+$! If you don't specify a compiler, it will try to determine which
$! "C" compiler to use.
$!
$! P4, if defined, sets a TCP/IP library to use, through one of the following
$! keywords:
$!
-$! UCX for UCX
-$! TCPIP for TCPIP (post UCX)
-$! SOCKETSHR for SOCKETSHR+NETLIB
+$! UCX For UCX
+$! TCPIP For TCPIP (post UCX)
+$! SOCKETSHR For SOCKETSHR+NETLIB
$!
$! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
$!
@@ -54,26 +54,30 @@ $ TCPIP_LIB = ""
$!
$! Check Which 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 Different Encryption Types.
+$! NOTE: Some might think this list ugly. However, it's made this way to
+$! reflect the SDIRS variable in [-]Makefile.org as closely as possible,
+$! thereby making it fairly easy to verify that the lists are the same.
$!
$ ENCRYPT_TYPES = "Basic,"+ -
"OBJECTS,"+ -
@@ -84,6 +88,13 @@ $ ENCRYPT_TYPES = "Basic,"+ -
"EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
"CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ -
"STORE,CMS,PQUEUE,TS,JPAKE"
+$! Define The OBJ Directory.
+$!
+$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.CRYPTO]
+$!
+$! Define The EXE Directory.
+$!
+$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]
$!
$! Check To Make Sure We Have Valid Command Line Parameters.
$!
@@ -97,9 +108,6 @@ $! Tell The User What Kind of Machine We Run On.
$!
$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
$!
-$! Define The OBJ Directory.
-$!
-$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.CRYPTO]
$!
$! Check To See If The Architecture Specific OBJ Directory Exists.
$!
@@ -114,10 +122,6 @@ $! End The Architecture Specific OBJ Directory Check.
$!
$ ENDIF
$!
-$! Define The EXE Directory.
-$!
-$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]
-$!
$! Check To See If The Architecture Specific Directory Exists.
$!
$ IF (F$PARSE(EXE_DIR).EQS."")
@@ -299,7 +303,7 @@ $ ! Disable the DOLLARID warning
$ COMPILEWITH_CC4 = ",a_utctm,bss_log,o_time,o_dir"
$ ! Disable disjoint optimization
$ COMPILEWITH_CC5 = ",md2_dgst,md4_dgst,md5_dgst,mdc2dgst," + -
- "sha_dgst,sha1dgst,rmd_dgst,bf_enc,"
+ "seed,sha_dgst,sha1dgst,rmd_dgst,bf_enc,"
$ ! Disable the MIXLINKAGE warning
$ COMPILEWITH_CC6 = ",enc_read,set_key,"
$!
@@ -342,11 +346,11 @@ $! Create The Library and Apps Module Names.
$!
$ LIB_MODULE = "LIB_" + MODULE_NAME
$ APPS_MODULE = "APPS_" + MODULE_NAME
-$ IF (MODULE_NAME.EQS."ASN1_2")
+$ IF (F$EXTRACT(0,5,MODULE_NAME).EQS."ASN1_")
$ THEN
$ MODULE_NAME = "ASN1"
$ ENDIF
-$ IF (MODULE_NAME.EQS."EVP_2".OR.MODULE_NAME.EQS."EVP_3")
+$ IF (F$EXTRACT(0,5,MODULE_NAME).EQS."EVP_")
$ THEN
$ MODULE_NAME = "EVP"
$ ENDIF
@@ -702,7 +706,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
@@ -722,19 +726,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
$!
@@ -795,8 +799,9 @@ $ WRITE SYS$OUTPUT " APPS : To Compile Just The [.xxx.EXE.CRYPTO]*.E
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
-$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
+$ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture."
+$ WRITE SYS$OUTPUT " IA64 : IA64 Architecture."
+$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
$ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
@@ -921,7 +926,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.
@@ -1027,12 +1032,12 @@ $ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
THEN CC = "CC/DECC"
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
"/NOLIST/PREFIX=ALL" + -
- "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + -
+ "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + -
CCEXTRAFLAGS
$!
$! 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.
$!
@@ -1054,14 +1059,14 @@ $!
$! 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"
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
- "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + -
+ "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + -
CCEXTRAFLAGS
$ CCDEFS = """VAXC""," + CCDEFS
$!
@@ -1071,7 +1076,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
$!
@@ -1093,12 +1098,12 @@ $!
$! Use GNU C...
$!
$ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
- "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + -
+ "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.''ARCH'],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1])" + -
CCEXTRAFLAGS
$!
$! 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.
$!
@@ -1168,7 +1173,7 @@ $!
$! Build a MACRO command for the architecture at hand
$!
$ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'"
-$ IF ARCH .EQS. "AXP" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
+$ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
$!
$! Show user the result
$!
diff --git a/crypto/des/des-lib.com b/crypto/des/des-lib.com
index fc2c35a1ce..afc2607640 100644
--- a/crypto/des/des-lib.com
+++ b/crypto/des/des-lib.com
@@ -9,7 +9,7 @@ $! Changes by Richard Levitte <richard@levitte.org>
$!
$! This command files compiles and creates the
$! "[.xxx.EXE.CRYPTO.DES]LIBDES.OLB" library. The "xxx" denotes the machine
-$! architecture of AXP or VAX.
+$! architecture of ALPHA, IA64 or VAX.
$!
$! It was re-written to try to determine which "C" compiler to try to use
$! or the user can specify a compiler in P3.
@@ -45,25 +45,34 @@ $!
$!
$! Check Which 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 Name.
+$!
+$ OBJ_DIR := SYS$DISK:[--.'ARCH'.OBJ.CRYPTO.DES]
+$!
+$! Define The EXE Directory Name.
+$!
+$ EXE_DIR :== SYS$DISK:[--.'ARCH'.EXE.CRYPTO.DES]
+$!
$! Check To Make Sure We Have Valid Command Line Parameters.
$!
$ GOSUB CHECK_OPTIONS
@@ -72,10 +81,6 @@ $! Tell The User What Kind of Machine We Run On.
$!
$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
$!
-$! Define The OBJ Directory Name.
-$!
-$ OBJ_DIR := SYS$DISK:[--.'ARCH'.OBJ.CRYPTO.DES]
-$!
$! Check To See If The Architecture Specific OBJ Directory Exists.
$!
$ IF (F$PARSE(OBJ_DIR).EQS."")
@@ -89,10 +94,6 @@ $! End The Architecture Specific OBJ Directory Check.
$!
$ ENDIF
$!
-$! Define The EXE Directory Name.
-$!
-$ EXE_DIR :== SYS$DISK:[--.'ARCH'.EXE.CRYPTO.DES]
-$!
$! Check To See If The Architecture Specific Directory Exists.
$!
$ IF (F$PARSE(EXE_DIR).EQS."")
@@ -564,7 +565,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 An non-VAX Or A VAX Linker Option File.
$!
$ IF (F$GETSYI("CPU").LT.128)
$ THEN
@@ -584,19 +585,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
$!
@@ -687,8 +688,9 @@ $ WRITE SYS$OUTPUT " DES_OPTS : To Compile Just The [.xxx.EXE.CRYTPO.DES
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " Where 'xxx' Stands For: "
$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
-$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
+$ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture."
+$ WRITE SYS$OUTPUT " IA64 : IA64 Architecture."
+$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
$ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
@@ -817,7 +819,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.
@@ -882,7 +884,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.
$!
@@ -904,9 +906,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"
@@ -919,7 +921,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
$!
@@ -944,7 +946,7 @@ $ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS
$!
$! 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/crypto/install.com b/crypto/install.com
index 9501573334..15df5436c5 100644
--- a/crypto/install.com
+++ b/crypto/install.com
@@ -8,10 +8,19 @@ $!
$ IF P1 .EQS. ""
$ THEN
$ WRITE SYS$OUTPUT "First argument missing."
-$ WRITE SYS$OUTPUT "Should be the directory where you want things installed."
+$ WRITE SYS$OUTPUT -
+ "It should be the directory where you want things installed."
$ EXIT
$ ENDIF
$
+$ IF (F$GETSYI("CPU").LT.128)
+$ THEN
+$ ARCH := VAX
+$ ELSE
+$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
+$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
+$ ENDIF
+$
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
@@ -19,16 +28,13 @@ $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
$
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
-$ DEFINE/NOLOG WRK_SSLVLIB WRK_SSLROOT:[VAX_LIB]
-$ DEFINE/NOLOG WRK_SSLALIB WRK_SSLROOT:[ALPHA_LIB]
+$ DEFINE/NOLOG WRK_SSLLIB WRK_SSLROOT:['ARCH'_LIB]
$ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
$
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
CREATE/DIR/LOG WRK_SSLROOT:[000000]
-$ IF F$PARSE("WRK_SSLVLIB:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLVLIB:
-$ IF F$PARSE("WRK_SSLALIB:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLALIB:
+$ IF F$PARSE("WRK_SSLLIB:") .EQS. "" THEN -
+ CREATE/DIR/LOG WRK_SSLLIB:
$ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
CREATE/DIR/LOG WRK_SSLINCLUDE:
$
@@ -126,25 +132,14 @@ $ IF E .EQS. "," THEN GOTO LOOP_LIB_END
$ SET NOON
$ IF F$SEARCH(VEXE_DIR+E+".OLB") .NES. ""
$ THEN
-$ COPY 'VEXE_DIR''E'.OLB WRK_SSLVLIB:'E'.OLB/log
-$ SET FILE/PROT=W:RE WRK_SSLVLIB:'E'.OLB
+$ COPY 'VEXE_DIR''E'.OLB WRK_SSLLIB:'E'.OLB/log
+$ SET FILE/PROT=W:RE WRK_SSLLIB:'E'.OLB
$ ENDIF
$ ! Preparing for the time when we have shareable images
$ IF F$SEARCH(VEXE_DIR+E+".EXE") .NES. ""
$ THEN
-$ COPY 'VEXE_DIR''E'.EXE WRK_SSLVLIB:'E'.EXE/log
-$ SET FILE/PROT=W:RE WRK_SSLVLIB:'E'.EXE
-$ ENDIF
-$ IF F$SEARCH(AEXE_DIR+E+".OLB") .NES. ""
-$ THEN
-$ COPY 'AEXE_DIR''E'.OLB WRK_SSLALIB:'E'.OLB/log
-$ SET FILE/PROT=W:RE WRK_SSLALIB:'E'.OLB
-$ ENDIF
-$ ! Preparing for the time when we have shareable images
-$ IF F$SEARCH(AEXE_DIR+E+".EXE") .NES. ""
-$ THEN
-$ COPY 'AEXE_DIR''E'.EXE WRK_SSLALIB:'E'.EXE/log
-$ SET FILE/PROT=W:RE WRK_SSLALIB:'E'.EXE
+$ COPY 'VEXE_DIR''E'.EXE WRK_SSLLIB:'E'.EXE/log
+$ SET FILE/PROT=W:RE WRK_SSLLIB:'E'.EXE
$ ENDIF
$ SET ON
$ GOTO LOOP_LIB
diff --git a/crypto/threads/pthreads-vms.com b/crypto/threads/pthreads-vms.com
index 63f5b8cc2e..1cf92bdf57 100644
--- a/crypto/threads/pthreads-vms.com
+++ b/crypto/threads/pthreads-vms.com
@@ -2,8 +2,13 @@ $! To compile mttest on VMS.
$!
$! WARNING: only tested with DEC C so far.
$
-$ arch := vax
-$ if f$getsyi("CPU") .ge. 128 then arch := axp
+$ if (f$getsyi("cpu").lt.128)
+$ then
+$ arch := VAX
+$ else
+$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ if (arch .eqs. "") then arch = "UNK"
+$ endif
$ define/user openssl [--.include.openssl]
$ cc/def=PTHREADS mttest.c
$ link mttest,[--.'arch'.exe.ssl]libssl/lib,[--.'arch'.exe.crypto]libcrypto/lib
diff --git a/demos/engines/rsaref/build.com b/demos/engines/rsaref/build.com
index b956912916..72b013d45e 100644
--- a/demos/engines/rsaref/build.com
+++ b/demos/engines/rsaref/build.com
@@ -7,6 +7,14 @@ $ write sys$error "RSAref 2.0 hasn't been properly extracted."
$ exit
$ endif
$
+$ if (f$getsyi("cpu").lt.128)
+$ then
+$ arch := vax
+$ else
+$ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ if (arch .eqs. "") then arch = "UNK"
+$ endif
+$
$ _save_default = f$environment("default")
$ set default [.install]
$ files := desc,digit,md2c,md5c,nn,prime,-
@@ -29,14 +37,8 @@ $ set default [-]
$ define/user openssl [---.include.openssl]
$ cc/define=ENGINE_DYNAMIC_SUPPORT rsaref.c
$
-$ if f$getsyi("CPU") .ge. 128
+$ if arch .eqs. "VAX"
$ then
-$ link/share=librsaref.exe sys$input:/option
-[]rsaref.obj
-[.install]rsaref.olb/lib
-[---.axp.exe.crypto]libcrypto.olb/lib
-symbol_vector=(bind_engine=procedure,v_check=procedure)
-$ else
$ macro/object=rsaref_vec.obj sys$input:
;
; Transfer vector for VAX shareable image
@@ -80,6 +82,24 @@ PSECT_ATTR=$CHAR_STRING_CONSTANTS,NOWRT
[]rsaref.obj
[.install]rsaref.olb/lib
[---.vax.exe.crypto]libcrypto.olb/lib
+$ else
+$ if arch_name .eqs. "ALPHA"
+$ then
+$ link/share=librsaref.exe sys$input:/option
+[]rsaref.obj
+[.install]rsaref.olb/lib
+[---.alpha.exe.crypto]libcrypto.olb/lib
+symbol_vector=(bind_engine=procedure,v_check=procedure)
+$ else
+$ if arch_name .eqs. "IA64"
+$ then
+$ link /shareable=librsaref.exe sys$input: /options
+[]rsaref.obj
+[.install]rsaref.olb/lib
+[---.ia64.exe.crypto]libcrypto.olb/lib
+symbol_vector=(bind_engine=procedure,v_check=procedure)
+$ endif
+$ endif
$ endif
$
$ set default '_save_default'
diff --git a/engines/makeengines.com b/engines/makeengines.com
index a1806c82ae..e140054911 100644
--- a/engines/makeengines.com
+++ b/engines/makeengines.com
@@ -5,7 +5,7 @@ $! richard@levitte.org
$!
$! This command file compiles and creates the various engines in form
$! of shared images. They are placed in [.xxx.EXE.ENGINES], where "xxx"
-$! is either AXP or VAX depending on your hardware.
+$! is ALPHA, IA64 or VAX, depending on your hardware.
$!
$! P1 if this is ENGINES or ALL, the engines will build, otherwise not.
$!
@@ -31,6 +31,11 @@ $!
$!-----------------------------------------------------------------------------
$!
$! Set the names of the engines we want to build
+$! NOTE: Some might think this list ugly. However, it's made this way to
+$! reflect the LIBNAMES variable in Makefile as closely as possible,
+$! thereby making it fairly easy to verify that the lists are the same.
+$! NOTE: gmp isn't built, as it's mostly a test engine and brings in another
+$! library that isn't necessarely ported to VMS.
$!
$ ENGINES = "," + P6
$ IF ENGINES .EQS. "," THEN -
@@ -40,10 +45,27 @@ $! Set the default TCP/IP library to link against if needed
$!
$ TCPIP_LIB = ""
$!
-$! Set the architecture name
+$! Check What Architecture We Are Using.
$!
-$ ARCH := VAX
-$ IF F$GETSYI("CPU") .GE. 128 THEN ARCH := AXP
+$ IF (F$GETSYI("CPU").LT.128)
+$ THEN
+$!
+$! The Architecture Is VAX.
+$!
+$ ARCH := VAX
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! The Architecture Is Alpha, IA64 or whatever comes in the future.
+$!
+$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
+$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
+$!
+$! End The Architecture Check.
+$!
+$ ENDIF
$!
$! Set the goal directories, and creat them if necessary
$!
@@ -55,7 +77,6 @@ $!
$! Set the goal files, and create them if necessary
$!
$ CRYPTO_LIB :=SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
-$ CRYPTO_EXE :=SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE
$ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB'
$!
$! OK, time to check options and initialise
@@ -71,13 +92,15 @@ $ GOSUB CHECK_OPTIONS
$ GOSUB INITIALISE
$ GOSUB CHECK_OPT_FILE
$!
-$! Define what goes into each engine
+$! Define what goes into each engine. VAX includes a transfer vector.
$!
$ ENGINE_ = ""
+$ TV_OBJ = ""
$ IF ARCH .EQS. "VAX"
$ THEN
$ ENGINE_ = "engine_vector.mar"
-$ EXTRA_OBJ := ,'OBJ_DIR'ENGINE_VECTOR.OBJ
+$ TV_OBJ_NAME = OBJ_DIR + F$PARSE(ENGINE_,,,"NAME","SYNTAX_ONLY") + ".OBJ"
+$ TV_OBJ = ",''TV_OBJ_NAME'"
$ ENDIF
$ ENGINE_4758CCA = "e_4758cca"
$ ENGINE_aep = "e_aep"
@@ -205,7 +228,11 @@ $ CLOSE OBJECTS
$!
$! Do not link the support files.
$!
-$ IF ENGINE_NAME .EQS. "" THEN GOTO ENGINE_DONE
+$ IF ENGINE_NAME .EQS. "" THEN GOTO ENGINE_NEXT
+$!
+$! Do not link the support files.
+$!
+$ IF ENGINE_NAME .EQS. "" THEN GOTO ENGINE_NEXT
$!
$! Now, there are two ways to handle this. We can either build
$! shareable images or stick the engine object file into libcrypto.
@@ -220,12 +247,12 @@ $ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT
$ IF TCPIP_LIB .NES. ""
$ THEN
$ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
- 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'EXTRA_OBJ', -
+ 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'TV_OBJ', -
'CRYPTO_LIB'/LIBRARY, -
'ENGINE_OPT'/OPTION,'TCPIP_LIB','OPT_FILE'/OPTION
$ ELSE
$ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
- 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'EXTRA_OBJ', -
+ 'EXE_DIR''ENGINE_NAME'.OPT/OPTION'TV_OBJ', -
'CRYPTO_LIB'/LIBRARY, -
'ENGINE_OPT'/OPTION,'OPT_FILE'/OPTION
$ ENDIF
@@ -316,7 +343,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
@@ -336,19 +363,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
$!
@@ -413,8 +440,9 @@ $ IF ("," + ACCEPT_PHASE + ",") - ",ENGINES," -
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " where 'xxx' stands for:"
$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT " AXP : Alpha architecture."
-$ WRITE SYS$OUTPUT " VAX : VAX architecture."
+$ WRITE SYS$OUTPUT " ALPHA : Alpha architecture."
+$ WRITE SYS$OUTPUT " IA64 : IA64 architecture."
+$ WRITE SYS$OUTPUT " VAX : VAX architecture."
$ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
@@ -539,7 +567,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.
@@ -650,7 +678,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.
$!
@@ -672,7 +700,7 @@ $!
$! Compile Using VAXC.
$!
$ CC = "CC"
-$ IF ARCH.EQS."AXP"
+$ IF ARCH.NES."VAX"
$ THEN
$ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
$ EXIT
@@ -689,7 +717,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
$!
@@ -716,7 +744,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.
$!
@@ -768,7 +796,7 @@ $!
$! Build a MACRO command for the architecture at hand
$!
$ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'"
-$ IF ARCH .EQS. "AXP" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
+$ IF ARCH .NES. "VAX" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
$!
$! Show user the result
$!
diff --git a/install.com b/install.com
index 4e4fe80dfe..d15c23a832 100644
--- a/install.com
+++ b/install.com
@@ -5,15 +5,25 @@ $! Time of creation: 22-MAY-1998 10:13
$!
$! P1 root of the directory tree
$!
+$ DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
+$ ON ERROR THEN GOTO TIDY
+$ ON CONTROL_C THEN GOTO TIDY
+$
$ IF P1 .EQS. ""
$ THEN
$ WRITE SYS$OUTPUT "First argument missing."
-$ WRITE SYS$OUTPUT "Should be the directory where you want things installed."
+$ WRITE SYS$OUTPUT -
+ "It Should be the directory where you want things installed."
$ EXIT
$ ENDIF
$
-$ ARCH = "AXP"
-$ IF F$GETSYI("CPU") .LT. 128 THEN ARCH = "VAX"
+$ IF (F$GETSYI("CPU").LT.128)
+$ THEN
+$ ARCH := VAX
+$ ELSE
+$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
+$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
+$ ENDIF
$
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
@@ -22,25 +32,26 @@ $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
$
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
-$ DEFINE/NOLOG WRK_SSLVLIB WRK_SSLROOT:[VAX_LIB]
-$ DEFINE/NOLOG WRK_SSLALIB WRK_SSLROOT:[ALPHA_LIB]
+$ DEFINE/NOLOG WRK_SSLXLIB WRK_SSLROOT:['ARCH'_LIB]
$ DEFINE/NOLOG WRK_SSLLIB WRK_SSLROOT:[LIB]
$ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
-$ DEFINE/NOLOG WRK_SSLVEXE WRK_SSLROOT:[VAX_EXE]
-$ DEFINE/NOLOG WRK_SSLAEXE WRK_SSLROOT:[ALPHA_EXE]
+$ DEFINE/NOLOG WRK_SSLXEXE WRK_SSLROOT:['ARCH'_EXE]
$ DEFINE/NOLOG WRK_SSLCERTS WRK_SSLROOT:[CERTS]
$ DEFINE/NOLOG WRK_SSLPRIVATE WRK_SSLROOT:[PRIVATE]
$
+$!
+$! Exhibit the destination directory.
+$!
+$ WRITE SYS$OUTPUT " Installing to (WRK_SSLROOT) ="
+$ WRITE SYS$OUTPUT " ''f$trnlnm( "WRK_SSLROOT")'"
+$ WRITE SYS$OUTPUT ""
+$
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
CREATE/DIR/LOG WRK_SSLROOT:[000000]
-$ IF F$PARSE("WRK_SSLVEXE:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLVEXE:
-$ IF F$PARSE("WRK_SSLAEXE:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLAEXE:
-$ IF F$PARSE("WRK_SSLVLIB:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLVLIB:
-$ IF F$PARSE("WRK_SSLALIB:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLALIB:
+$ IF F$PARSE("WRK_SSLXEXE:") .EQS. "" THEN -
+ CREATE/DIR/LOG WRK_SSLXEXE:
+$ IF F$PARSE("WRK_SSLXLIB:") .EQS. "" THEN -
+ CREATE/DIR/LOG WRK_SSLXLIB:
$ IF F$PARSE("WRK_SSLLIB:") .EQS. "" THEN -
CREATE/DIR/LOG WRK_SSLLIB:
$ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
@@ -70,20 +81,21 @@ $ SET DEFAULT [-]
$ GOTO LOOP_SDIRS
$ LOOP_SDIRS_END:
$
-$ DEASSIGN WRK_SSLROOT
-$ DEASSIGN WRK_SSLVLIB
-$ DEASSIGN WRK_SSLALIB
-$ DEASSIGN WRK_SSLLIB
-$ DEASSIGN WRK_SSLINCLUDE
-$ DEASSIGN WRK_SSLVEXE
-$ DEASSIGN WRK_SSLAEXE
-$ DEASSIGN WRK_SSLCERTS
-$ DEASSIGN WRK_SSLPRIVATE
-$
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " Installation done!"
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " You might want to purge ",ROOT,"...]"
$ WRITE SYS$OUTPUT ""
$
+$ TIDY:
+$ SET DEFAULT 'DEF_ORIG'
+$
+$ DEASSIGN WRK_SSLROOT
+$ DEASSIGN WRK_SSLXLIB
+$ DEASSIGN WRK_SSLLIB
+$ DEASSIGN WRK_SSLINCLUDE
+$ DEASSIGN WRK_SSLXEXE
+$ DEASSIGN WRK_SSLCERTS
+$ DEASSIGN WRK_SSLPRIVATE
+$
$ EXIT
diff --git a/makevms.com b/makevms.com
index 092ce9e662..65699f7f69 100755
--- a/makevms.com
+++ b/makevms.com
@@ -10,15 +10,15 @@ $! Changes by Richard Levitte <richard@levitte.org>
$!
$! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
$! "[.xxx.EXE.SSL]LIBSSL.OLB"
-$! The "xxx" denotes the machine architecture of AXP or VAX.
+$! The "xxx" denotes the machine architecture of ALPHA, IA64 or VAX.
$!
$! This procedures accepts two command line options listed below.
$!
$! Specify one of the following build options for P1.
$!
$! ALL Just build "everything".
-$! CONFIG Just build the "[.CRYPTO]OPENSSLCONF.H" file.
-$! BUILDINF Just build the "[.CRYPTO]BUILDINF.H" file.
+$! CONFIG Just build the "[.CRYPTO.<ARCH>]OPENSSLCONF.H" file.
+$! BUILDINF Just build the "[.CRYPTO.<ARCH>]BUILDINF.H" file.
$! SOFTLINKS Just fix the Unix soft links.
$! BUILDALL Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done.
$! CRYPTO Just build the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
@@ -62,6 +62,10 @@ $!
$! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
$!
$!
+$ DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
+$ ON ERROR THEN GOTO TIDY
+$ ON CONTROL_C THEN GOTO TIDY
+$!
$! Check if we're in a batch job, and make sure we get to
$! the directory this script is in
$!
@@ -72,22 +76,23 @@ $ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
$ SET DEF 'COMPATH'
$ ENDIF
$!
-$! 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.
$!
@@ -155,25 +160,34 @@ $ ENDIF
$!
$! Time To EXIT.
$!
-$ EXIT
+$ GOTO TIDY
$!
-$! Rebuild The "[.CRYPTO]OPENSSLCONF.H" file.
+$! Rebuild The "[.CRYPTO.''ARCH']OPENSSLCONF.H" file.
$!
$ CONFIG:
$!
-$! Tell The User We Are Creating The [.CRYPTO]OPENSSLCONF.H File.
+$! Tell The User We Are Creating The [.CRYPTO.<ARCH>]OPENSSLCONF.H File.
+$!
+$ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCH']OPENSSLCONF.H Include File."
$!
-$ WRITE SYS$OUTPUT "Creating [.CRYPTO]OPENSSLCONF.H Include File."
+$! First, make sure the directory exists.
$!
-$! Create The [.CRYPTO]OPENSSLCONF.H File.
+$ IF F$PARSE("SYS$DISK:[.CRYPTO.''ARCH']") .EQS. "" THEN -
+ CREATE/DIRECTORY SYS$DISK:[.CRYPTO.'ARCH']
$!
-$ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]OPENSSLCONF.H
+$! Create The [.CRYPTO.<ARCH>]OPENSSLCONF.H File.
+$! Make sure it has the right format.
$!
-$! Write The [.CRYPTO]OPENSSLCONF.H File.
+$ OSCH_NAME = "SYS$DISK:[.CRYPTO.''ARCH']OPENSSLCONF.H"
+$ CREATE /FDL=SYS$INPUT: 'OSCH_NAME'
+RECORD
+ FORMAT stream_lf
+$ OPEN /APPEND H_FILE 'OSCH_NAME'
+$!
+$! Write The [.CRYPTO.<ARCH>]OPENSSLCONF.H File.
$!
$ WRITE H_FILE "/* This file was automatically built using makevms.com */"
-$ WRITE H_FILE "/* and [.CRYPTO]OPENSSLCONF.H_IN */"
-$
+$ WRITE H_FILE "/* and [.CRYPTO.''ARCH']OPENSSLCONF.H_IN */"
$!
$! Write a few macros that indicate how this system was built.
$!
@@ -245,7 +259,8 @@ $ THEN
$ TYPE [.CRYPTO]OPENSSLCONF.H.IN /OUTPUT=H_FILE:
$ ELSE
$ WRITE SYS$ERROR "Couldn't find a [.CRYPTO]OPENSSLCONF.H_IN. Exiting!"
-$ EXIT 0
+$ $STATUS = %X00018294 ! "%RMS-F-FNF, file not found".
+$ GOTO TIDY
$ ENDIF
$ ENDIF
$ ENDIF
@@ -318,10 +333,11 @@ $ WRITE H_FILE "#undef SIXTEEN_BIT"
$ WRITE H_FILE "#undef EIGHT_BIT"
$ WRITE H_FILE "#endif"
$!
-$ WRITE H_FILE "#if defined(HEADER_SHA_H)"
+$! Oddly enough, the following symbol is tested in crypto/sha/sha512.c
+$! before sha.h gets included (and HEADER_SHA_H defined), so we will not
+$! protect this one...
$ WRITE H_FILE "#undef OPENSSL_NO_SHA512"
$ WRITE H_FILE "#define OPENSSL_NO_SHA512"
-$ WRITE H_FILE "#endif"
$!
$ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
$ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
@@ -330,40 +346,53 @@ $! End
$!
$ ENDIF
$!
-$! Close the [.CRYPTO]OPENSSLCONF.H file
+$! Close the [.CRYPTO.<ARCH>]OPENSSLCONF.H file
$!
$ CLOSE H_FILE
$!
+$! Purge The [.CRYPTO.<ARCH>]OPENSSLCONF.H file
+$!
+$ PURGE SYS$DISK:[.CRYPTO.'ARCH']OPENSSLCONF.H
+$!
$! That's All, Time To RETURN.
$!
$ RETURN
$!
-$! Rebuild The "[.CRYPTO]BUILDINF.H" file.
+$! Rebuild The "[.CRYPTO.<ARCH>]BUILDINF.H" file.
$!
$ BUILDINF:
$!
-$! Tell The User We Are Creating The [.CRYPTO]BUILDINF.H File.
+$! Tell The User We Are Creating The [.CRYPTO.<ARCH>]BUILDINF.H File.
$!
-$ WRITE SYS$OUTPUT "Creating [.CRYPTO]BUILDINF.H Include File."
+$ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCH']BUILDINF.H Include File."
$!
-$! Create The [.CRYPTO]BUILDINF.H File.
+$! Create The [.CRYPTO.<ARCH>]BUILDINF.H File.
$!
-$ OPEN/WRITE H_FILE SYS$DISK:[.CRYPTO]BUILDINF.H
+$ BIH_NAME = "SYS$DISK:[.CRYPTO.''ARCH']BUILDINF.H"
+$ CREATE /FDL=SYS$INPUT: 'BIH_NAME'
+RECORD
+ FORMAT stream_lf
+$!
+$ OPEN /APPEND H_FILE 'bih_name'
$!
$! Get The Current Date & Time.
$!
$ TIME = F$TIME()
$!
-$! Write The [.CRYPTO]BUILDINF.H File.
+$! Write The [.CRYPTO.<ARCH>]BUILDINF.H File.
$!
$ WRITE H_FILE "#define CFLAGS """" /* Not filled in for now */"
-$ WRITE H_FILE "#define PLATFORM ""VMS"""
+$ WRITE H_FILE "#define PLATFORM ""VMS ''ARCH' ''VMS_VER'"""
$ WRITE H_FILE "#define DATE ""''TIME'"" "
$!
-$! Close The [.CRYPTO]BUILDINF.H File.
+$! Close The [.CRYPTO.<ARCH>]BUILDINF.H File.
$!
$ CLOSE H_FILE
$!
+$! Purge The [.CRYPTO.<ARCH>]BUILDINF.H File.
+$!
+$ PURGE SYS$DISK:[.CRYPTO.'ARCH']BUILDINF.H
+$!
$! That's All, Time To RETURN.
$!
$ RETURN
@@ -427,6 +456,7 @@ $!
$! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
$!
$ SDIRS := ,-
+ 'ARCH',-
OBJECTS,-
MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,WHRLPOOL,-
DES,AES,RC2,RC4,RC5,IDEA,BF,CAST,CAMELLIA,SEED,MODES,-
@@ -434,7 +464,8 @@ $ SDIRS := ,-
BUFFER,BIO,STACK,LHASH,RAND,ERR,-
EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,-
STORE,CMS,PQUEUE,TS,JPAKE
-$ EXHEADER_ := crypto.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,ossl_typ.h
+$ EXHEADER_ := crypto.h,opensslv.h,ebcdic.h,symhacks.h,ossl_typ.h
+$ EXHEADER_'ARCH' := opensslconf.h
$ EXHEADER_OBJECTS := objects.h,obj_mac.h
$ EXHEADER_MD2 := md2.h
$ EXHEADER_MD4 := md4.h
@@ -721,8 +752,8 @@ $ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " ALL : Just Build Everything."
-$ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO]OPENSSLCONF.H file."
-$ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO]BUILDINF.H file."
+$ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO.''ARCH']OPENSSLCONF.H file."
+$ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO.''ARCH']BUILDINF.H file."
$ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
$ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
$ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
@@ -735,13 +766,14 @@ $ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Pr
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
-$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
+$ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture."
+$ WRITE SYS$OUTPUT " IA64 : IA64 Architecture."
+$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
$ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
$!
-$ EXIT
+$ GOTO TIDY
$!
$! End The Valid Argument Check.
$!
@@ -788,7 +820,7 @@ $ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
$!
-$ EXIT
+$ GOTO TIDY
$!
$! End The Valid Arguement Check.
$!
@@ -945,7 +977,7 @@ $ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
$!
-$ EXIT
+$ GOTO TIDY
$!
$! End The Valid Arguement Check.
$!
@@ -1073,7 +1105,7 @@ $ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
$!
-$ EXIT
+$ GOTO TIDY
$ ELSE
$!
$! If TCPIP is not defined, then hardcode it to make
@@ -1132,3 +1164,8 @@ $!
$! Time To RETURN...
$!
$ RETURN
+$!
+$ TIDY:
+$ SET DEFAULT 'DEF_ORIG'
+$ EXIT
+$!
diff --git a/ssl/install.com b/ssl/install.com
index fce8c66737..7f56067599 100644
--- a/ssl/install.com
+++ b/ssl/install.com
@@ -8,10 +8,19 @@ $!
$ IF P1 .EQS. ""
$ THEN
$ WRITE SYS$OUTPUT "First argument missing."
-$ WRITE SYS$OUTPUT "Should be the directory where you want things installed."
+$ WRITE SYS$OUTPUT -
+ "It should be the directory where you want things installed."
$ EXIT
$ ENDIF
$
+$ IF (F$GETSYI("CPU").LT.128)
+$ THEN
+$ ARCH := VAX
+$ ELSE
+$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
+$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
+$ ENDIF
+$
$ ROOT = F$PARSE(P1,"[]A.;0",,,"SYNTAX_ONLY,NO_CONCEAL") - "A.;0"
$ ROOT_DEV = F$PARSE(ROOT,,,"DEVICE","SYNTAX_ONLY")
$ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
@@ -19,31 +28,24 @@ $ ROOT_DIR = F$PARSE(ROOT,,,"DIRECTORY","SYNTAX_ONLY") -
$ ROOT = ROOT_DEV + "[" + ROOT_DIR
$
$ DEFINE/NOLOG WRK_SSLROOT 'ROOT'.] /TRANS=CONC
-$ DEFINE/NOLOG WRK_SSLVLIB WRK_SSLROOT:[VAX_LIB]
-$ DEFINE/NOLOG WRK_SSLALIB WRK_SSLROOT:[ALPHA_LIB]
+$ DEFINE/NOLOG WRK_SSLXLIB WRK_SSLROOT:['ARCH'_LIB]
$ DEFINE/NOLOG WRK_SSLINCLUDE WRK_SSLROOT:[INCLUDE]
-$ DEFINE/NOLOG WRK_SSLVEXE WRK_SSLROOT:[VAX_EXE]
-$ DEFINE/NOLOG WRK_SSLAEXE WRK_SSLROOT:[ALPHA_EXE]
+$ DEFINE/NOLOG WRK_SSLXEXE WRK_SSLROOT:['ARCH'_EXE]
$
$ IF F$PARSE("WRK_SSLROOT:[000000]") .EQS. "" THEN -
CREATE/DIR/LOG WRK_SSLROOT:[000000]
-$ IF F$PARSE("WRK_SSLVLIB:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLVLIB:
-$ IF F$PARSE("WRK_SSLALIB:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLALIB:
+$ IF F$PARSE("WRK_SSLXLIB:") .EQS. "" THEN -
+ CREATE/DIR/LOG WRK_SSLXLIB:
$ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN -
CREATE/DIR/LOG WRK_SSLINCLUDE:
-$ IF F$PARSE("WRK_SSLVEXE:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLVEXE:
-$ IF F$PARSE("WRK_SSLAEXE:") .EQS. "" THEN -
- CREATE/DIR/LOG WRK_SSLAEXE:
+$ IF F$PARSE("WRK_SSLXEXE:") .EQS. "" THEN -
+ CREATE/DIR/LOG WRK_SSLXEXE:
$
$ EXHEADER := ssl.h,ssl2.h,ssl3.h,ssl23.h,tls1.h,dtls1.h,kssl.h
$ E_EXE := ssl_task
$ LIBS := LIBSSL
$
-$ VEXE_DIR := [-.VAX.EXE.SSL]
-$ AEXE_DIR := [-.AXP.EXE.SSL]
+$ XEXE_DIR := [-.'ARCH'.EXE.SSL]
$
$ COPY 'EXHEADER' WRK_SSLINCLUDE:/LOG
$ SET FILE/PROT=WORLD:RE WRK_SSLINCLUDE:'EXHEADER'
@@ -54,15 +56,10 @@ $ E = F$EDIT(F$ELEMENT(I, ",", E_EXE),"TRIM")
$ I = I + 1
$ IF E .EQS. "," THEN GOTO LOOP_EXE_END
$ SET NOON
-$ IF F$SEARCH(VEXE_DIR+E+".EXE") .NES. ""
-$ THEN
-$ COPY 'VEXE_DIR''E'.EXE WRK_SSLVEXE:'E'.EXE/log
-$ SET FILE/PROT=W:RE WRK_SSLVEXE:'E'.EXE
-$ ENDIF
-$ IF F$SEARCH(AEXE_DIR+E+".EXE") .NES. ""
+$ IF F$SEARCH(XEXE_DIR+E+".EXE") .NES. ""
$ THEN
-$ COPY 'AEXE_DIR''E'.EXE WRK_SSLAEXE:'E'.EXE/log
-$ SET FILE/PROT=W:RE WRK_SSLAEXE:'E'.EXE
+$ COPY 'XEXE_DIR''E'.EXE WRK_SSLXEXE:'E'.EXE/log
+$ SET FILE/PROT=W:RE WRK_SSLXEXE:'E'.EXE
$ ENDIF
$ SET ON
$ GOTO LOOP_EXE
@@ -74,27 +71,17 @@ $ E = F$EDIT(F$ELEMENT(I, ",", LIBS),"TRIM")
$ I = I + 1
$ IF E .EQS. "," THEN GOTO LOOP_LIB_END
$ SET NOON
-$ IF F$SEARCH(VEXE_DIR+E+".OLB") .NES. ""
-$ THEN
-$ COPY 'VEXE_DIR''E'.OLB WRK_SSLVLIB:'E'.OLB/log
-$ SET FILE/PROT=W:RE WRK_SSLVLIB:'E'.OLB
-$ ENDIF
-$ ! Preparing for the time when we have shareable images
-$ IF F$SEARCH(VEXE_DIR+E+".EXE") .NES. ""
-$ THEN
-$ COPY 'VEXE_DIR''E'.EXE WRK_SSLVLIB:'E'.EXE/log
-$ SET FILE/PROT=W:RE WRK_SSLVLIB:'E'.EXE
-$ ENDIF
-$ IF F$SEARCH(AEXE_DIR+E+".OLB") .NES. ""
+$! Object library.
+$ IF F$SEARCH(XEXE_DIR+E+".OLB") .NES. ""
$ THEN
-$ COPY 'AEXE_DIR''E'.OLB WRK_SSLALIB:'E'.OLB/log
-$ SET FILE/PROT=W:RE WRK_SSLALIB:'E'.OLB
+$ COPY 'XEXE_DIR''E'.OLB WRK_SSLXLIB:'E'.OLB/log
+$ SET FILE/PROT=W:RE WRK_SSLXLIB:'E'.OLB
$ ENDIF
-$ ! Preparing for the time when we have shareable images
-$ IF F$SEARCH(AEXE_DIR+E+".EXE") .NES. ""
+$! Shareable image.
+$ IF F$SEARCH(XEXE_DIR+E+".EXE") .NES. ""
$ THEN
-$ COPY 'AEXE_DIR''E'.EXE WRK_SSLALIB:'E'.EXE/log
-$ SET FILE/PROT=W:RE WRK_SSLALIB:'E'.EXE
+$ COPY 'XEXE_DIR''E'.EXE WRK_SSLXLIB:'E'.EXE/log
+$ SET FILE/PROT=W:RE WRK_SSLXLIB:'E'.EXE
$ ENDIF
$ SET ON
$ GOTO LOOP_LIB
diff --git a/ssl/ssl-lib.com b/ssl/ssl-lib.com
index fcd7ff774c..e61d501cfc 100644
--- a/ssl/ssl-lib.com
+++ b/ssl/ssl-lib.com
@@ -8,11 +8,11 @@ $!
$! Changes by Richard Levitte <richard@levitte.org>
$!
$! This command file compiles and creates the "[.xxx.EXE.SSL]LIBSSL.OLB"
-$! library for OpenSSL. The "xxx" denotes the machine architecture of AXP
-$! or VAX.
+$! library for OpenSSL. The "xxx" denotes the machine architecture of
+$! ALPHA, IA64 or VAX.
$!
$! It is written to detect what type of machine you are compiling on
-$! (i.e. AXP or VAX) and which "C" compiler you have (i.e. VAXC, DECC
+$! (i.e. ALPHA or VAX) and which "C" compiler you have (i.e. VAXC, DECC
$! or GNU C) or you can specify which compiler to use.
$!
$! Specify the following as P1 to build just that part or ALL to just
@@ -48,27 +48,36 @@ $! (That Is, If We 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.SSL]
+$!
+$! Define The EXE Directory.
+$!
+$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.SSL]
+$!
$! Check To Make Sure We Have Valid Command Line Parameters.
$!
$ GOSUB CHECK_OPTIONS
@@ -81,10 +90,6 @@ $! Tell The User What Kind of Machine We Run On.
$!
$ WRITE SYS$OUTPUT "Compiling On A ",ARCH," Machine."
$!
-$! Define The OBJ Directory.
-$!
-$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.SSL]
-$!
$! Check To See If The Architecture Specific OBJ Directory Exists.
$!
$ IF (F$PARSE(OBJ_DIR).EQS."")
@@ -98,10 +103,6 @@ $! End The Architecture Specific OBJ Directory Check.
$!
$ ENDIF
$!
-$! Define The EXE Directory.
-$!
-$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.SSL]
-$!
$! Check To See If The Architecture Specific Directory Exists.
$!
$ IF (F$PARSE(EXE_DIR).EQS."")
@@ -409,7 +410,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
@@ -429,19 +430,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
$!
@@ -547,8 +548,9 @@ $ WRITE SYS$OUTPUT " SSL_TASK : To Compile Just The [.xxx.EXE.SSL]SSL_TA
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT " AXP : Alpha Architecture."
-$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
+$ WRITE SYS$OUTPUT " ALPHA : Alpha Architecture."
+$ WRITE SYS$OUTPUT " IA64 : IA64 Architecture."
+$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
$ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
@@ -674,7 +676,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.
@@ -784,7 +786,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.
$!
@@ -806,9 +808,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"
@@ -822,7 +824,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
$!
@@ -849,7 +851,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/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