Have the VMS build system catch up with the 1.0.0-stable branch.
diff --git a/apps/makeapps.com b/apps/makeapps.com
index 5bfe311..b96c4a1 100644
--- a/apps/makeapps.com
+++ b/apps/makeapps.com
@@ -6,6 +6,7 @@
 $!               byer@mail.all-net.net
 $!
 $!  Changes by Richard Levitte <richard@levitte.org>
+$!             Zoltan Arpadffy <zoli@polarhome.com>   
 $!
 $!  This command files compiles and creates all the various different
 $!  "application" programs for the different types of encryption for OpenSSL.
@@ -150,7 +151,7 @@
 $!
 $! Setup exceptional compilations
 $!
-$ COMPILEWITH_CC2 = ",S_SERVER,S_CLIENT,"
+$ COMPILEWITH_CC2 = ",S_SOCKET,S_SERVER,S_CLIENT,"
 $!
 $ PHASE := LIB
 $!
@@ -168,6 +169,10 @@
 $!
 $ CURRENT_APP = F$EDIT(F$ELEMENT(APP_COUNTER,",",PROGRAMS),"TRIM")
 $!
+$!  Create The Executable File Name.
+$!
+$   EXE_FILE = EXE_DIR + CURRENT_APP + ".EXE"
+$!
 $!  Check To See If We Are At The End Of The File List.
 $!
 $ IF (CURRENT_APP.EQS.",")
@@ -231,10 +236,6 @@
 $!  Create The Object File Name.
 $!
 $   OBJECT_FILE = OBJ_DIR + FILE_NAME + ".OBJ"
-$!
-$!  Create The Executable File Name.
-$!
-$   EXE_FILE = EXE_DIR + FILE_NAME + ".EXE"
 $   ON WARNING THEN GOTO NEXT_LIB
 $!
 $!  Check To See If The File We Want To Compile Actually Exists.
diff --git a/crypto/crypto-lib.com b/crypto/crypto-lib.com
index 6bbe37d..624b439 100644
--- a/crypto/crypto-lib.com
+++ b/crypto/crypto-lib.com
@@ -6,6 +6,7 @@
 $!               byer@mail.all-net.net
 $!
 $!  Changes by Richard Levitte <richard@levitte.org>
+$!             Zoltan Arpadffy <arpadffy@polarhome.com>
 $!
 $!  This command files compiles and creates the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" 
 $!  library for OpenSSL.  The "xxx" denotes the machine architecture, ALPHA,
@@ -192,7 +193,8 @@
 $ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb"
 $ LIB_MODES = "cbc128,ctr128,cfb128,ofb128"
 $ LIB_BN_ASM = "[.asm]vms.mar,vms-helper"
-$ IF F$TRNLNM("OPENSSL_NO_ASM").OR.ARCH.NES."VAX" THEN LIB_BN_ASM = "bn_asm"
+$ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN -
+     LIB_BN_ASM = "bn_asm"
 $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ -
 	"bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ -
 	"bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ -
@@ -217,7 +219,7 @@
 	"eng_table,eng_pkey,eng_fat,eng_all,"+ -
 	"tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_ecdh,tb_rand,tb_store,"+ -
 	"tb_cipher,tb_digest,tb_pkmeth,tb_asnmth,"+ -
-	"eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,"+ -
+	"eng_openssl,eng_dyn,eng_cnf,eng_cryptodev"+ -
 	"eng_aesni"
 $ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,aes_ctr,"+ -
 	"aes_ige,aes_wrap"
diff --git a/crypto/install.com b/crypto/install.com
index 15df543..b3f24cc 100644
--- a/crypto/install.com
+++ b/crypto/install.com
@@ -3,6 +3,8 @@
 $! Author: Richard Levitte <richard@levitte.org>
 $! Time of creation: 22-MAY-1998 10:13
 $!
+$! Changes by Zoltan Arpadffy <zoli@polarhome.com>
+$!
 $! P1	root of the directory tree
 $!
 $	IF P1 .EQS. ""
@@ -47,8 +49,8 @@
 		 EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,-
 		 UI,KRB5,-
 		 STORE,CMS,PQUEUE,TS,JPAKE
-$	EXHEADER_ := crypto.h,tmdiff.h,opensslv.h,opensslconf.h,ebcdic.h,-
-		symhacks.h,ossl_typ.h
+$	EXHEADER_ := crypto.h,opensslv.h,opensslconf.h,ebcdic.h,symhacks.h,-
+		ossl_typ.h
 $	EXHEADER_OBJECTS := objects.h,obj_mac.h
 $	EXHEADER_MD2 := md2.h
 $	EXHEADER_MD4 := md4.h
@@ -105,8 +107,7 @@
 $	EXHEADER_JPAKE := jpake.h
 $	LIBS := LIBCRYPTO
 $
-$	VEXE_DIR := [-.VAX.EXE.CRYPTO]
-$	AEXE_DIR := [-.AXP.EXE.CRYPTO]
+$	EXE_DIR := [-.'ARCH'.EXE.CRYPTO]
 $
 $	I = 0
 $ LOOP_SDIRS: 
@@ -130,15 +131,15 @@
 $	I = I + 1
 $	IF E .EQS. "," THEN GOTO LOOP_LIB_END
 $	SET NOON
-$	IF F$SEARCH(VEXE_DIR+E+".OLB") .NES. ""
+$	IF F$SEARCH(EXE_DIR+E+".OLB") .NES. ""
 $	THEN
-$	  COPY 'VEXE_DIR''E'.OLB WRK_SSLLIB:'E'.OLB/log
+$	  COPY 'EXE_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. ""
+$	IF F$SEARCH(EXE_DIR+E+".EXE") .NES. ""
 $	THEN
-$	  COPY 'VEXE_DIR''E'.EXE WRK_SSLLIB:'E'.EXE/log
+$	  COPY 'EXE_DIR''E'.EXE WRK_SSLLIB:'E'.EXE/log
 $	  SET FILE/PROT=W:RE WRK_SSLLIB:'E'.EXE
 $	ENDIF
 $	SET ON
diff --git a/engines/makeengines.com b/engines/makeengines.com
index e140054..5f9b8d4 100644
--- a/engines/makeengines.com
+++ b/engines/makeengines.com
@@ -211,7 +211,7 @@
 $! Do the dirty work.
 $!
 $ ON ERROR THEN GOTO FILE_NEXT
-$ IF FILE_NAME - ".MAR" .NES. FILE_NAME
+$ IF F$EDIT(F$PARSE(SOURCE_FILE,,,"TYPE","SYNTAX_ONLY"),"UPCASE") .EQS. ".MAR"
 $ THEN
 $   MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
 $ ELSE
diff --git a/makevms.com b/makevms.com
index 65699f7..4b34450 100755
--- a/makevms.com
+++ b/makevms.com
@@ -7,6 +7,7 @@
 $!                byer@mail.all-net.net
 $!
 $! Changes by Richard Levitte <richard@levitte.org>
+$!	      Zoltan Arpadffy <zoli@polarhome.com>
 $!
 $! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
 $! "[.xxx.EXE.SSL]LIBSSL.OLB"
@@ -37,7 +38,7 @@
 $! Speficy DEBUG or NODEBUG as P3 to compile with or without debugging
 $! information.
 $!
-$! Specify which compiler at P4 to try to compile under.
+$! Specify which compiler as P4 to try to compile under.
 $!
 $!	  VAXC	 For VAX C.
 $!	  DECC	 For DEC C.
@@ -264,10 +265,10 @@
 $     ENDIF
 $   ENDIF
 $ ENDIF
-$ IF ARCH .EQS. "AXP"
+$ IF ARCH .NES. "VAX"
 $ THEN
 $!
-$!  Write the Alpha specific data
+$!  Write the non-VAX specific data
 $!
 $   WRITE H_FILE "#if defined(HEADER_RC4_H)"
 $   WRITE H_FILE "#undef RC4_INT"
@@ -735,7 +736,8 @@
 $   IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
        .OR.(P1.EQS."BUILDALL") -
        .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
-       .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS")
+       .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS") -
+       .OR.(P1.EQS."ENGINES")
 $   THEN
 $!
 $!    A Valid Arguement.
@@ -749,7 +751,11 @@
 $!    Tell The User We Don't Know What They Want.
 $!
 $     WRITE SYS$OUTPUT ""
-$     WRITE SYS$OUTPUT "The Option ",P1," Is Invalid.  The Valid Options Are:"
+$     WRITE SYS$OUTPUT "USAGE:   @MAKEVMS.COM [Target] [not-used option] [Debug option] <Compiler>"
+$     WRITE SYS$OUTPUT ""
+$     WRITE SYS$OUTPUT "Example: @MAKEVMS.COM ALL """" NODEBUG "
+$     WRITE SYS$OUTPUT ""
+$     WRITE SYS$OUTPUT "The Target ",P1," Is Invalid.  The Valid Target Options Are:"
 $     WRITE SYS$OUTPUT ""
 $     WRITE SYS$OUTPUT "    ALL      :  Just Build Everything."
 $     WRITE SYS$OUTPUT "    CONFIG   :  Just build the [.CRYPTO.''ARCH']OPENSSLCONF.H file."
@@ -763,6 +769,7 @@
 $     WRITE SYS$OUTPUT "    SSL_TASK :  To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
 $     WRITE SYS$OUTPUT "    TEST     :  To Build Just The OpenSSL Test Programs."
 $     WRITE SYS$OUTPUT "    APPS     :  To Build Just The OpenSSL Application Programs."
+$     WRITE SYS$OUTPUT "    ENGINES  :  To Build Just The ENGINES"
 $     WRITE SYS$OUTPUT ""
 $     WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
 $     WRITE SYS$OUTPUT ""
diff --git a/test/maketests.com b/test/maketests.com
index 7316be9..7adb82e 100644
--- a/test/maketests.com
+++ b/test/maketests.com
@@ -138,7 +138,9 @@
 	       "MDC2TEST,RMDTEST,"+ -
 	       "RANDTEST,DHTEST,ENGINETEST,"+ -
 	       "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_TEST,"+ -
-	       "EVP_TEST"
+	       "EVP_TEST,JPAKETEST"
+$! Should we add MTTEST,PQ_TEST,LH_TEST,DIVTEST,TABTEST as well?
+$
 $ TCPIP_PROGRAMS = ",,"
 $ IF COMPILER .EQS. "VAXC" THEN -
      TCPIP_PROGRAMS = ",SSLTEST,"
@@ -199,7 +201,9 @@
 $! Compile The File.
 $!
 $ ON ERROR THEN GOTO NEXT_FILE
-$ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
+$ CC/OBJECT='OBJECT_FILE' /PREFIX=ALL -
+    /INCLUDE=(SYS$DISK:[-],SYS$DISK:[-.CRYPTO],SYS$DISK:[-.CRYPTO.X509V3],SYS$DISK:[-.INCLUDE.OPENSSL]) - 
+    'SOURCE_FILE'
 $ ON WARNING THEN GOTO NEXT_FILE
 $!
 $! Check If What We Are About To Compile Works Without A TCP/IP Library.
diff --git a/test/tcrl.com b/test/tcrl.com
index 4856709..1f606eb 100644
--- a/test/tcrl.com
+++ b/test/tcrl.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
diff --git a/test/testca.com b/test/testca.com
index e9e9873..ec7e56d 100644
--- a/test/testca.com
+++ b/test/testca.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __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 4a46ce9..621d9a2 100644
--- a/test/testenc.com
+++ b/test/testenc.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $
 $	testsrc := makefile.
diff --git a/test/testgen.com b/test/testgen.com
index ee62c4c..a4bc574 100644
--- a/test/testgen.com
+++ b/test/testgen.com
@@ -2,8 +2,9 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
+$	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
 $	T := testcert
 $	KEY = 512
diff --git a/test/tests.com b/test/tests.com
index 7fd9993..d151cd3 100644
--- a/test/tests.com
+++ b/test/tests.com
@@ -7,7 +7,7 @@
 $	__save_default = f$environment("default")
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __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]
@@ -16,6 +16,7 @@
 $	define /translation_attributes = concealed sslroot 'sslroot'
 $
 $	set default '__here'
+$
 $	on control_y then goto exit
 $	on error then goto exit
 $
@@ -34,7 +35,7 @@
 	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_jpake,test_cms
 $	endif
 $	tests = f$edit(tests,"COLLAPSE")
 $
@@ -286,6 +287,10 @@
 $	write sys$output "Test JPAKE"
 $	mcr 'texe_dir''jpaketest'
 $	return
+$ test_cms:
+$	write sys$output "CMS consistency test"
+$	perl CMS-TEST.PL
+$	return
 $
 $
 $ exit:
diff --git a/test/testss.com b/test/testss.com
index 6b31f72..6598106 100644
--- a/test/testss.com
+++ b/test/testss.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
diff --git a/test/testssl.com b/test/testssl.com
index b79d470..9c83afb 100644
--- a/test/testssl.com
+++ b/test/testssl.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __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 31a86d3..e107cc1 100644
--- a/test/tpkcs7.com
+++ b/test/tpkcs7.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
diff --git a/test/tpkcs7d.com b/test/tpkcs7d.com
index 22f0d0b..5ff653c 100644
--- a/test/tpkcs7d.com
+++ b/test/tpkcs7d.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
diff --git a/test/treq.com b/test/treq.com
index 7b9cb98..d2594be 100644
--- a/test/treq.com
+++ b/test/treq.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
diff --git a/test/trsa.com b/test/trsa.com
index aa15c47..d3a8a60 100644
--- a/test/trsa.com
+++ b/test/trsa.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
diff --git a/test/tsid.com b/test/tsid.com
index e4316b9..267ace1 100644
--- a/test/tsid.com
+++ b/test/tsid.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
diff --git a/test/tverify.com b/test/tverify.com
index 2c5f25a..01431f4 100644
--- a/test/tverify.com
+++ b/test/tverify.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $!
 $	line_max = 255 ! Could be longer on modern non-VAX.
diff --git a/test/tx509.com b/test/tx509.com
index cd23a35..399eb01 100644
--- a/test/tx509.com
+++ b/test/tx509.com
@@ -2,7 +2,7 @@
 $
 $	__arch := VAX
 $	if f$getsyi("cpu") .ge. 128 then -
-	   __arch := f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+	   __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
 $	if __arch .eqs. "" then __arch := UNK
 $	exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $