Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-05-13 15:37:32 +0400
committerUlf Möller <ulf@openssl.org>1999-05-13 15:37:32 +0400
commit7d7d2cbcb02206f3393681f2bce198e11e2e185b (patch)
tree93410fafc5aa977c748ea492994da3f581d11278 /test
parent8d111f4a476896a417069d16597ce3009f9bb992 (diff)
VMS support.
Submitted by: Richard Levitte <richard@levitte.org>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.ssl5
-rw-r--r--test/VMSca-response.11
-rw-r--r--test/VMSca-response.22
-rw-r--r--test/maketests.com1053
-rw-r--r--test/tcrl.com78
-rw-r--r--test/testca.com76
-rw-r--r--test/testenc.com50
-rw-r--r--test/testgen.com33
-rw-r--r--test/tests.com203
-rw-r--r--test/testss.com104
-rw-r--r--test/testssl.com63
-rw-r--r--test/tpkcs7.com49
-rw-r--r--test/tpkcs7d.com42
-rw-r--r--test/treq.com78
-rw-r--r--test/trsa.com78
-rw-r--r--test/tsid.com78
-rw-r--r--test/tverify.com26
-rw-r--r--test/tx509.com78
18 files changed, 2096 insertions, 1 deletions
diff --git a/test/Makefile.ssl b/test/Makefile.ssl
index ef12e629c9..9478f6a8e5 100644
--- a/test/Makefile.ssl
+++ b/test/Makefile.ssl
@@ -19,7 +19,10 @@ EX_LIBS= #-lnsl -lsocket
CFLAGS= $(INCLUDES) $(CFLAG)
-GENERAL=Makefile.ssl
+GENERAL=Makefile.ssl maketests.com \
+ tests.com testenc.com tx509.com trsa.com tcrl.com tsid.com treq.com \
+ tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \
+ testca.com VMSca-response.1 VMSca-response.2
DLIBCRYPTO= ../libcrypto.a
DLIBSSL= ../libssl.a
diff --git a/test/VMSca-response.1 b/test/VMSca-response.1
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/test/VMSca-response.1
@@ -0,0 +1 @@
+
diff --git a/test/VMSca-response.2 b/test/VMSca-response.2
new file mode 100644
index 0000000000..9b48ee4cf9
--- /dev/null
+++ b/test/VMSca-response.2
@@ -0,0 +1,2 @@
+y
+y
diff --git a/test/maketests.com b/test/maketests.com
new file mode 100644
index 0000000000..e4b052e688
--- /dev/null
+++ b/test/maketests.com
@@ -0,0 +1,1053 @@
+$!
+$! MAKETESTS.COM
+$! Written By: Robert Byer
+$! Vice-President
+$! A-Com Computing, Inc.
+$! byer@mail.all-net.net
+$!
+$! Changes by Richard Levitte <richard@levitte.org>
+$!
+$! This command files compiles and creates all the various different
+$! "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.
+$!
+$! Specify RSAREF as P1 to compile with the RSAREF library instead of
+$! the regular one. If you specify NORSAREF it will compile with the
+$! regular RSAREF routines. (Note: If you are in the United States
+$! you MUST compile with RSAREF unless you have a license from RSA).
+$!
+$! Note: The RSAREF libraries are NOT INCLUDED and you have to
+$! download it from "ftp://ftp.rsa.com/rsaref". You have to
+$! get the ".tar-Z" file as the ".zip" file dosen't have the
+$! directory structure stored. You have to extract the file
+$! into the [.RSAREF] directory under the root directory as that
+$! is where the scripts will look for the files.
+$!
+$! Specify DEBUG or NODEBUG 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.
+$!
+$! If you don't speficy 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
+$! SOCKETSHR for SOCKETSHR+NETLIB
+$!
+$! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
+$!
+$!
+$! Define A TCP/IP Library That We Will Need To Link To.
+$! (That is, If Wee Need To Link To One.)
+$!
+$ TCPIP_LIB = ""
+$!
+$! Check Which Architecture We Are Using.
+$!
+$ IF (F$GETSYI("CPU").GE.128)
+$ THEN
+$!
+$! The Architecture Is AXP.
+$!
+$ ARCH := AXP
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! The Architecture Is VAX.
+$!
+$ ARCH := VAX
+$!
+$! End The Architecture Check.
+$!
+$ ENDIF
+$!
+$! 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-LIB We Are To Use.
+$!
+$ CRYPTO_LIB := SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
+$!
+$! Define The RSAREF-LIB We Are To Use.
+$!
+$ RSAREF_LIB := SYS$DISK:[-.'ARCH'.EXE.RSAREF]LIBRSAGLUE.OLB
+$!
+$! 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."")
+$ THEN
+$!
+$! The EXE Directory Dosen't Exist, So Create It.
+$!
+$ CREATE/DIRECTORY 'OBJ_DIR'
+$!
+$! 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."")
+$ THEN
+$!
+$! The EXE Directory Dosen't Exist, So Create It.
+$!
+$ CREATE/DIRECTORY 'EXE_DIR'
+$!
+$! End The Architecture Specific EXE Directory Check.
+$!
+$ ENDIF
+$!
+$! Check To See If We Have The Proper Libraries.
+$!
+$ GOSUB LIB_CHECK
+$!
+$! Check To See If We Have A Linker Option File.
+$!
+$ GOSUB CHECK_OPT_FILE
+$!
+$! Define The TEST Files.
+$!
+$ TEST_FILES = "BNTEST,IDEATEST,MD2TEST,MD5TEST,HMACTEST,"+ -
+ "RC2TEST,RC4TEST,RC5TEST,"+ -
+ "DESTEST,SHATEST,SHA1TEST,MDC2TEST,RMDTEST,"+ -
+ "RANDTEST,DHTEST,"+ -
+ "BFTEST,CASTTEST,SSLTEST,EXPTEST,DSATEST,RSA_OAEP_TEST"
+$ TCPIP_PROGRAMS = ",,"
+$ IF COMPILER .EQS. "VAXC" THEN -
+ TCPIP_PROGRAMS = ",SSLTEST,"
+$!
+$! Define A File Counter And Set It To "0".
+$!
+$ FILE_COUNTER = 0
+$!
+$! Top Of The File Loop.
+$!
+$ NEXT_FILE:
+$!
+$! O.K, Extract The File Name From The File List.
+$!
+$ FILE_NAME = F$ELEMENT(FILE_COUNTER,",",TEST_FILES)
+$!
+$! Check To See If We Are At The End Of The File List.
+$!
+$ IF (FILE_NAME.EQS.",") THEN GOTO FILE_DONE
+$!
+$! Increment The Counter.
+$!
+$ FILE_COUNTER = FILE_COUNTER + 1
+$!
+$! Create The Source File Name.
+$!
+$ SOURCE_FILE = "SYS$DISK:[]" + FILE_NAME + ".C"
+$!
+$! 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_FILE
+$!
+$! Check To See If The File We Want To Compile Actually Exists.
+$!
+$ IF (F$SEARCH(SOURCE_FILE).EQS."")
+$ THEN
+$!
+$! Tell The User That The File Dosen't Exist.
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "The File ",SOURCE_FILE," Dosen't Exist."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Exit The Build.
+$!
+$ GOTO EXIT
+$ ENDIF
+$!
+$! Tell The User What We Are Building.
+$!
+$ WRITE SYS$OUTPUT "Building The ",FILE_NAME," Test Program."
+$!
+$! Compile The File.
+$!
+$ ON ERROR THEN GOTO NEXT_FILE
+$ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
+$ ON WARNING THEN GOTO NEXT_FILE
+$!
+$! Check If What We Are About To Compile Works Without A TCP/IP Library.
+$!
+$ IF ((TCPIP_LIB.EQS."").AND.((TCPIP_PROGRAMS-FILE_NAME).NES.TCPIP_PROGRAMS))
+$ THEN
+$!
+$! Inform The User That A TCP/IP Library Is Needed To Compile This Program.
+$!
+$ WRITE SYS$OUTPUT FILE_NAME," Needs A TCP/IP Library. Can't Link. Skipping..."
+$ GOTO NEXT_FILE
+$!
+$! End The TCP/IP Library Check.
+$!
+$ ENDIF
+$!
+$! Link The Program, Check To See If We Need To Link With RSAREF Or Not.
+$!
+$ IF (RSAREF.EQS."TRUE")
+$ THEN
+$!
+$! Check To See If We Are To Link With A Specific TCP/IP Library.
+$!
+$ IF (TCPIP_LIB.NES."")
+$ THEN
+$!
+$! Link With The RSAREF Library And A Specific TCP/IP Library.
+$!
+$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
+ 'OBJECT_FILE',-
+ 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, -
+ 'TCPIP_LIB','OPT_FILE'/OPTION
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! Link With The RSAREF Library And NO TCP/IP Library.
+$!
+$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
+ 'OBJECT_FILE', -
+ 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY,'RSAREF_LIB'/LIBRARY, -
+ 'OPT_FILE'/OPTION
+$!
+$! End The TCP/IP Library Check.
+$!
+$ ENDIF
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! Don't Link With The RSAREF Routines.
+$!
+$!
+$! Check To See If We Are To Link With A Specific TCP/IP Library.
+$!
+$ IF (TCPIP_LIB.NES."")
+$ THEN
+$!
+$! Don't Link With The RSAREF Routines And TCP/IP Library.
+$!
+$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
+ 'OBJECT_FILE', -
+ 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
+ 'TCPIP_LIB','OPT_FILE'/OPTION
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! Don't Link With The RSAREF Routines And Link With A TCP/IP Library.
+$!
+$ LINK/'DEBUGGER'/'TRACEBACK' /EXE='EXE_FILE' -
+ 'OBJECT_FILE', -
+ 'SSL_LIB'/LIBRARY,'CRYPTO_LIB'/LIBRARY, -
+ 'OPT_FILE'/OPTION
+$!
+$! End The TCP/IP Library Check.
+$!
+$ ENDIF
+$!
+$! End The RSAREF Link Check.
+$!
+$ ENDIF
+$!
+$! Go Back And Do It Again.
+$!
+$ GOTO NEXT_FILE
+$!
+$! All Done With This Library Part.
+$!
+$ FILE_DONE:
+$!
+$! All Done, Time To Exit.
+$!
+$ EXIT:
+$ GOSUB CLEANUP
+$ EXIT
+$!
+$! Check For The Link Option FIle.
+$!
+$ CHECK_OPT_FILE:
+$!
+$! Check To See If We Need To Make A VAX C Option File.
+$!
+$ IF (COMPILER.EQS."VAXC")
+$ THEN
+$!
+$! Check To See If We Already Have A VAX C Linker Option File.
+$!
+$ IF (F$SEARCH(OPT_FILE).EQS."")
+$ THEN
+$!
+$! We Need A VAX C Linker Option File.
+$!
+$ CREATE 'OPT_FILE'
+$DECK
+!
+! Default System Options File To Link Agianst
+! The Sharable VAX C Runtime Library.
+!
+SYS$SHARE:VAXCRTL.EXE/SHARE
+$EOD
+$!
+$! End The Option File Check.
+$!
+$ ENDIF
+$!
+$! End The VAXC Check.
+$!
+$ ENDIF
+$!
+$! Check To See If We Need A GNU C Option File.
+$!
+$ IF (COMPILER.EQS."GNUC")
+$ THEN
+$!
+$! Check To See If We Already Have A GNU C Linker Option File.
+$!
+$ IF (F$SEARCH(OPT_FILE).EQS."")
+$ THEN
+$!
+$! We Need A GNU C Linker Option File.
+$!
+$ CREATE 'OPT_FILE'
+$DECK
+!
+! Default System Options File To Link Agianst
+! The Sharable C Runtime Library.
+!
+GNU_CC:[000000]GCCLIB/LIBRARY
+SYS$SHARE:VAXCRTL/SHARE
+$EOD
+$!
+$! End The Option File Check.
+$!
+$ ENDIF
+$!
+$! End The GNU C Check.
+$!
+$ ENDIF
+$!
+$! Check To See If We Need A DEC C Option File.
+$!
+$ IF (COMPILER.EQS."DECC")
+$ THEN
+$!
+$! Check To See If We Already Have A DEC C Linker Option File.
+$!
+$ IF (F$SEARCH(OPT_FILE).EQS."")
+$ THEN
+$!
+$! Figure Out If We Need An AXP Or A VAX Linker Option File.
+$!
+$ IF (ARCH.EQS."VAX")
+$ THEN
+$!
+$! We Need A DEC C Linker Option File For VAX.
+$!
+$ CREATE 'OPT_FILE'
+$DECK
+!
+! Default System Options File To Link Agianst
+! The Sharable DEC C Runtime Library.
+!
+SYS$SHARE:DECC$SHR.EXE/SHARE
+$EOD
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! Create The AXP Linker Option File.
+$!
+$ CREATE 'OPT_FILE'
+$DECK
+!
+! Default System Options File For AXP 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.
+$!
+$ ENDIF
+$!
+$! End The Option File Search.
+$!
+$ ENDIF
+$!
+$! End The DEC C Check.
+$!
+$ ENDIF
+$!
+$! Tell The User What Linker Option File We Are Using.
+$!
+$ WRITE SYS$OUTPUT "Using Linker Option File ",OPT_FILE,"."
+$!
+$! Time To RETURN.
+$!
+$ RETURN
+$!
+$! Check To See If We Have The Appropiate Libraries.
+$!
+$ LIB_CHECK:
+$!
+$! Look For The Library LIBCRYPTO.OLB.
+$!
+$ IF (F$SEARCH(CRYPTO_LIB).EQS."")
+$ THEN
+$!
+$! Tell The User We Can't Find The LIBCRYPTO.OLB Library.
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "Can't Find The Library ",CRYPTO_LIB,"."
+$ WRITE SYS$OUTPUT "We Can't Link Without It."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Since We Can't Link Without It, Exit.
+$!
+$ EXIT
+$!
+$! End The Crypto Library Check.
+$!
+$ ENDIF
+$!
+$! See If We Need The RSAREF Library...
+$!
+$ IF (RSAREF.EQS."TRUE")
+$ THEN
+$!
+$! Look For The Library LIBRSAGLUE.OLB.
+$!
+$ IF (F$SEARCH(RSAREF_LIB).EQS."")
+$ THEN
+$!
+$! Tell The User We Can't Find The LIBRSAGLUE.OLB Library.
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "Can't Find The Library ",RSAREF_LIB,"."
+$ WRITE SYS$OUTPUT "We Can't Link Without It."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Since We Can't Link Without It, Exit.
+$!
+$ EXIT
+$ ENDIF
+$!
+$! End The RSAREF Library Check.
+$!
+$ ENDIF
+$!
+$! Look For The Library LIBSSL.OLB.
+$!
+$ IF (F$SEARCH(SSL_LIB).EQS."")
+$ THEN
+$!
+$! Tell The User We Can't Find The LIBSSL.OLB Library.
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "Can't Find The Library ",SSL_LIB,"."
+$ WRITE SYS$OUTPUT "Some Of The Test Programs Need To Link To It."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Since We Can't Link Without It, Exit.
+$!
+$ EXIT
+$!
+$! End The SSL Library Check.
+$!
+$ ENDIF
+$!
+$! Time To Return.
+$!
+$ RETURN
+$!
+$! Check The User's Options.
+$!
+$ CHECK_OPTIONS:
+$!
+$! Check To See If P1 Is Blank.
+$!
+$ IF (P1.EQS."NORSAREF")
+$ THEN
+$!
+$! P1 Is NORSAREF, So Compile With The Regular RSA Libraries.
+$!
+$ RSAREF = "FALSE"
+$ ELSE
+$!
+$! Check To See If We Are To Use The RSAREF Library.
+$!
+$ IF (P1.EQS."RSAREF")
+$ THEN
+$!
+$! Check To Make Sure We Have The RSAREF Source Code Directory.
+$!
+$ IF (F$SEARCH("SYS$DISK:[-.RSAREF]SOURCE.DIR").EQS."")
+$ THEN
+$!
+$! We Don't Have The RSAREF Souce Code Directory, So Tell The
+$! User This.
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "It appears that you don't have the RSAREF Souce Code."
+$ WRITE SYS$OUTPUT "You need to go to 'ftp://ftp.rsa.com/rsaref'. You have to"
+$ WRITE SYS$OUTPUT "get the '.tar-Z' file as the '.zip' file dosen't have the"
+$ WRITE SYS$OUTPUT "directory structure stored. You have to extract the file"
+$ WRITE SYS$OUTPUT "into the [.RSAREF] directory under the root directory"
+$ WRITE SYS$OUTPUT "as that is where the scripts will look for the files."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Time To Exit.
+$!
+$ EXIT
+$!
+$! Else, Compile Using The RSAREF Library.
+$!
+$ ELSE
+$ RSAREF = "TRUE"
+$ ENDIF
+$ ELSE
+$!
+$! They Entered An Invalid Option..
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "The Option ",P1," Is Invalid. The Valid Options Are:"
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT " RSAREF : Compile With The RSAREF Library."
+$ WRITE SYS$OUTPUT " NORSAREF : Compile With The Regular RSA Library."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Time To EXIT.
+$!
+$ EXIT
+$!
+$! End The Valid Arguement Check.
+$!
+$ ENDIF
+$!
+$! End The P1 Check.
+$!
+$ ENDIF
+$!
+$! Check To See If P2 Is Blank.
+$!
+$ IF (P2.EQS."NODEBUG")
+$ THEN
+$!
+$! P2 Is NODEBUG, So Compile Without Debugger Information.
+$!
+$ DEBUGGER = "NODEBUG"
+$ TRACEBACK = "NOTRACEBACK"
+$ GCC_OPTIMIZE = "OPTIMIZE"
+$ CC_OPTIMIZE = "OPTIMIZE"
+$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
+$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! Check To See If We Are To Compile With Debugger Information.
+$!
+$ IF (P2.EQS."DEBUG")
+$ THEN
+$!
+$! Compile With Debugger Information.
+$!
+$ DEBUGGER = "DEBUG"
+$ TRACEBACK = "TRACEBACK"
+$ GCC_OPTIMIZE = "NOOPTIMIZE"
+$ CC_OPTIMIZE = "NOOPTIMIZE"
+$ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
+$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! Tell The User Entered An Invalid Option..
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "The Option ",P2," Is Invalid. The Valid Options Are:"
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
+$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Time To EXIT.
+$!
+$ EXIT
+$!
+$! End The Valid Arguement Check.
+$!
+$ ENDIF
+$!
+$! End The P3 Check.
+$!
+$ ENDIF
+$!
+$! Check To See If P3 Is Blank.
+$!
+$ IF (P3.EQS."")
+$ THEN
+$!
+$! O.K., The User Didn't Specify A Compiler, Let's Try To
+$! Find Out Which One To Use.
+$!
+$! Check To See If We Have GNU C.
+$!
+$ IF (F$TRNLNM("GNU_CC").NES."")
+$ THEN
+$!
+$! Looks Like GNUC, Set To Use GNUC.
+$!
+$ P3 = "GNUC"
+$!
+$! End The GNU C Compiler Check.
+$!
+$ ELSE
+$!
+$! Check To See If We Have VAXC Or DECC.
+$!
+$ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
+$ THEN
+$!
+$! Looks Like DECC, Set To Use DECC.
+$!
+$ P3 = "DECC"
+$!
+$! Else...
+$!
+$ ELSE
+$!
+$! Looks Like VAXC, Set To Use VAXC.
+$!
+$ P3 = "VAXC"
+$!
+$! End The VAXC Compiler Check.
+$!
+$ ENDIF
+$!
+$! End The DECC & VAXC Compiler Check.
+$!
+$ ENDIF
+$!
+$! End The Compiler Check.
+$!
+$ ENDIF
+$!
+$! Check To See If We Have A Option For P4.
+$!
+$ IF (P4.EQS."")
+$ THEN
+$!
+$! Find out what socket library we have available
+$!
+$ IF F$PARSE("SOCKETSHR:") .NES. ""
+$ THEN
+$!
+$! We have SOCKETSHR, and it is my opinion that it's the best to use.
+$!
+$ P4 = "SOCKETSHR"
+$!
+$! Tell the user
+$!
+$ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
+$!
+$! Else, let's look for something else
+$!
+$ ELSE
+$!
+$! Like UCX (the reason to do this before Multinet is that the UCX
+$! emulation is easier to use...)
+$!
+$ IF F$TRNLNM("UCX$IPC_SHR") .NES. "" -
+ .OR. F$PARSE("SYS$SHARE:UCX$IPC_SHR.EXE") .NES. "" -
+ .OR. F$PARSE("SYS$LIBRARY:UCX$IPC.OLB") .NES. ""
+$ THEN
+$!
+$! Last resort: a UCX or UCX-compatible library
+$!
+$ P4 = "UCX"
+$!
+$! Tell the user
+$!
+$ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
+$!
+$! That was all...
+$!
+$ ENDIF
+$ ENDIF
+$ ENDIF
+$!
+$! Set Up Initial CC Definitions, Possibly With User Ones
+$!
+$ CCDEFS = "VMS=1,TCPIP_TYPE_''P4'"
+$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
+$ CCEXTRAFLAGS = ""
+$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
+$ CCDISABLEWARNINGS = ""
+$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
+ CCDISABLEWARNINGS = USER_CCDISABLEWARNINGS
+$!
+$! Check To See If The User Entered A Valid Paramter.
+$!
+$ IF (P3.EQS."VAXC").OR.(P3.EQS."DECC").OR.(P3.EQS."GNUC")
+$ THEN
+$!
+$! Check To See If The User Wanted DECC.
+$!
+$ IF (P3.EQS."DECC")
+$ THEN
+$!
+$! Looks Like DECC, Set To Use DECC.
+$!
+$ COMPILER = "DECC"
+$!
+$! Tell The User We Are Using DECC.
+$!
+$ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
+$!
+$! Use DECC...
+$!
+$ CC = "CC"
+$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
+ THEN CC = "CC/DECC"
+$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
+ "/NOLIST/PREFIX=ALL" + CCEXTRAFLAGS
+$!
+$! Define The Linker Options File Name.
+$!
+$ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
+$!
+$! End DECC Check.
+$!
+$ ENDIF
+$!
+$! Check To See If We Are To Use VAXC.
+$!
+$ IF (P3.EQS."VAXC")
+$ THEN
+$!
+$! Looks Like VAXC, Set To Use VAXC.
+$!
+$ COMPILER = "VAXC"
+$!
+$! Tell The User We Are Using VAX C.
+$!
+$ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
+$!
+$! Compile Using VAXC.
+$!
+$ CC = "CC"
+$ IF ARCH.EQS."AXP"
+$ THEN
+$ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
+$ EXIT
+$ ENDIF
+$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
+$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS
+$ CCDEFS = CCDEFS + ",""VAXC"""
+$!
+$! Define <sys> As SYS$COMMON:[SYSLIB]
+$!
+$ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
+$!
+$! Define The Linker Options File Name.
+$!
+$ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
+$!
+$! End VAXC Check
+$!
+$ ENDIF
+$!
+$! Check To See If We Are To Use GNU C.
+$!
+$ IF (P3.EQS."GNUC")
+$ THEN
+$!
+$! Looks Like GNUC, Set To Use GNUC.
+$!
+$ COMPILER = "GNUC"
+$!
+$! Tell The User We Are Using GNUC.
+$!
+$ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
+$!
+$! Use GNU C...
+$!
+$ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + CCEXTRAFLAGS
+$!
+$! Define The Linker Options File Name.
+$!
+$ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
+$!
+$! End The GNU C Check.
+$!
+$ ENDIF
+$!
+$! Set up default defines
+$!
+$ CCDEFS = """FLAT_INC=1""," + CCDEFS
+$!
+$! Check To See If We Are To Compile With RSAREF Routines.
+$!
+$ IF (RSAREF.EQS."TRUE")
+$ THEN
+$!
+$! Compile With RSAREF.
+$!
+$ CCDEFS = CCDEFS + ",""RSAref=1"""
+$!
+$! Tell The User This.
+$!
+$ WRITE SYS$OUTPUT "Compiling With RSAREF Routines."
+$!
+$! Else, We Don't Care. Compile Without The RSAREF Library.
+$!
+$ ELSE
+$!
+$! Tell The User We Are Compile Without The RSAREF Routines.
+$!
+$ WRITE SYS$OUTPUT "Compiling Without The RSAREF Routines.
+$!
+$! End The RSAREF Check.
+$!
+$ ENDIF
+$!
+$! Finish up the definition of CC.
+$!
+$ IF COMPILER .EQS. "DECC"
+$ THEN
+$ IF CCDISABLEWARNINGS .EQS. ""
+$ THEN
+$ CC4DISABLEWARNINGS = "DOLLARID"
+$ ELSE
+$ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
+$ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
+$ ENDIF
+$ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
+$ ELSE
+$ CCDISABLEWARNINGS = ""
+$ CC4DISABLEWARNINGS = ""
+$ ENDIF
+$ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
+$!
+$! Show user the result
+$!
+$ WRITE SYS$OUTPUT "Main Compiling Command: ",CC
+$!
+$! Else The User Entered An Invalid Arguement.
+$!
+$ ELSE
+$!
+$! Tell The User We Don't Know What They Want.
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
+$ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
+$ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Time To EXIT.
+$!
+$ EXIT
+$ ENDIF
+$!
+$! Time to check the contents, and to make sure we get the correct library.
+$!
+$ IF P4.EQS."SOCKETSHR" .OR. P4.EQS."MULTINET" .OR. P4.EQS."UCX"
+$ THEN
+$!
+$! Check to see if SOCKETSHR was chosen
+$!
+$ IF P4.EQS."SOCKETSHR"
+$ THEN
+$!
+$! Set the library to use SOCKETSHR
+$!
+$ TCPIP_LIB = "[-.VMS]SOCKETSHR_SHR.OPT/OPT"
+$!
+$! Done with SOCKETSHR
+$!
+$ ENDIF
+$!
+$! Check to see if MULTINET was chosen
+$!
+$ IF P4.EQS."MULTINET"
+$ THEN
+$!
+$! Set the library to use UXC emulation.
+$!
+$ P4 = "UCX"
+$!
+$! Done with MULTINET
+$!
+$ ENDIF
+$!
+$! Check to see if UCX was chosen
+$!
+$ IF P4.EQS."UCX"
+$ THEN
+$!
+$! Set the library to use UCX.
+$!
+$ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC.OPT/OPT"
+$ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
+$ THEN
+$ TCPIP_LIB = "[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT"
+$ ELSE
+$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
+ TCPIP_LIB = "[-.VMS]UCX_SHR_VAXC.OPT/OPT"
+$ ENDIF
+$!
+$! Done with UCX
+$!
+$ ENDIF
+$!
+$! Print info
+$!
+$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
+$!
+$! Else The User Entered An Invalid Arguement.
+$!
+$ ELSE
+$!
+$! Tell The User We Don't Know What They Want.
+$!
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
+$ WRITE SYS$OUTPUT ""
+$ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
+$ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
+$ WRITE SYS$OUTPUT ""
+$!
+$! Time To EXIT.
+$!
+$ EXIT
+$!
+$! Done with TCP/IP libraries
+$!
+$ ENDIF
+$!
+$! Special Threads For OpenVMS v7.1 Or Later
+$!
+$! Written By: Richard Levitte
+$! richard@levitte.org
+$!
+$!
+$! Check To See If We Have A Option For P5.
+$!
+$ IF (P5.EQS."")
+$ THEN
+$!
+$! Get The Version Of VMS We Are Using.
+$!
+$ ISSEVEN :=
+$ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,F$GETSYI("VERSION")))
+$ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
+$!
+$! Check To See If The VMS Version Is v7.1 Or Later.
+$!
+$ IF (TMP.GE.71)
+$ THEN
+$!
+$! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
+$!
+$ ISSEVEN := ,PTHREAD_USE_D4
+$!
+$! End The VMS Version Check.
+$!
+$ ENDIF
+$!
+$! End The P5 Check.
+$!
+$ ENDIF
+$!
+$! Time To RETURN...
+$!
+$ RETURN
+$!
+$ INITIALISE:
+$!
+$! Save old value of the logical name OPENSSL
+$!
+$ __SAVE_OPENSSL = F$TRNLNM("OPENSSL","LNM$PROCESS_TABLE")
+$!
+$! Save directory information
+$!
+$ __HERE = F$PARSE(F$PARSE("A.;",F$ENVIRONMENT("PROCEDURE"))-"A.;","[]A.;") - "A.;"
+$ __TOP = __HERE - "TEST]"
+$ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
+$!
+$! Set up the logical name OPENSSL to point at the include directory
+$!
+$ DEFINE OPENSSL/NOLOG '__INCLUDE'
+$!
+$! Done
+$!
+$ RETURN
+$!
+$ CLEANUP:
+$!
+$! Restore the logical name OPENSSL if it had a value
+$!
+$ IF __SAVE_OPENSSL .EQS. ""
+$ THEN
+$ DEASSIGN OPENSSL
+$ ELSE
+$ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'
+$ ENDIF
+$!
+$! Done
+$!
+$ RETURN
diff --git a/test/tcrl.com b/test/tcrl.com
new file mode 100644
index 0000000000..cef21467bb
--- /dev/null
+++ b/test/tcrl.com
@@ -0,0 +1,78 @@
+$! TCRL.COM -- Tests crl keys
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ cmd := mcr 'exe_dir'openssl crl
+$
+$ t := testcrl.pem
+$ if p1 .nes. "" then t = p1
+$
+$ write sys$output "testing CRL conversions"
+$ copy 't' fff.p
+$
+$ write sys$output "p -> d"
+$ 'cmd' -in fff.p -inform p -outform d -out f.d
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "p -> t"
+$! 'cmd' -in fff.p -inform p -outform t -out f.t
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in fff.p -inform p -outform p -out f.p
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> d"
+$ 'cmd' -in f.d -inform d -outform d -out ff.d1
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "t -> d"
+$! 'cmd' -in f.t -inform t -outform d -out ff.d2
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> d"
+$ 'cmd' -in f.p -inform p -outform d -out ff.d3
+$ if $severity .ne. 1 then exit 3
+$
+$! write sys$output "d -> t"
+$! 'cmd' -in f.d -inform d -outform t -out ff.t1
+$! if $severity .ne. 1 then exit 3
+$! write sys$output "t -> t"
+$! 'cmd' -in f.t -inform t -outform t -out ff.t2
+$! if $severity .ne. 1 then exit 3
+$! write sys$output "p -> t"
+$! 'cmd' -in f.p -inform p -outform t -out ff.t3
+$! if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> p"
+$ 'cmd' -in f.d -inform d -outform p -out ff.p1
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "t -> p"
+$! 'cmd' -in f.t -inform t -outform p -out ff.p2
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in f.p -inform p -outform p -out ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: fff.p f.p
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$! difference/output=nl: fff.p ff.p2
+$! if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$! difference/output=nl: f.t ff.t1
+$! if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.t ff.t2
+$! if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.t ff.t3
+$! if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: f.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.p ff.p2
+$! if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/test/testca.com b/test/testca.com
new file mode 100644
index 0000000000..ea75479cd5
--- /dev/null
+++ b/test/testca.com
@@ -0,0 +1,76 @@
+$! TESTCA.COM
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ openssl := mcr 'exe_dir'openssl
+$
+$ SSLEAY_CONFIG="-config ""CAss.cnf"""
+$
+$ set noon
+$ if f$search("demoCA.dir") .nes. ""
+$ then
+$ call deltree [.demoCA]*.*
+$ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) demoCA.dir;*
+$ delete demoCA.dir;*
+$ endif
+$ set on
+$ open/read sys$ca_input VMSca-response.1
+$ @[-.apps]CA.com -input sys$ca_input -newca
+$ close sys$ca_input
+$ if $severity .ne. 1 then exit 3
+$
+$
+$ SSLEAY_CONFIG="-config ""Uss.cnf"""
+$ @[-.apps]CA.com -newreq
+$ if $severity .ne. 1 then exit 3
+$
+$
+$ SSLEAY_CONFIG="-config [-.apps]openssl-vms.cnf"
+$ open/read sys$ca_input VMSca-response.2
+$ @[-.apps]CA.com -input sys$ca_input -sign
+$ close sys$ca_input
+$ if $severity .ne. 1 then exit 3
+$
+$
+$ @[-.apps]CA.com -verify newcert.pem
+$ if $severity .ne. 1 then exit 3
+$
+$ set noon
+$ call deltree [.demoCA]*.*
+$ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) demoCA.dir;*
+$ delete demoCA.dir;*,newcert.pem;*,newreq.pem;*
+$ set on
+$! #usage: CA -newcert|-newreq|-newca|-sign|-verify
+$
+$ exit
+$
+$ deltree: subroutine ! P1 is a name of a directory
+$ on control_y then goto dt_STOP
+$ on warning then goto dt_exit
+$ _dt_def = f$trnlnm("SYS$DISK")+f$directory()
+$ if f$parse(p1) .eqs. "" then exit
+$ set default 'f$parse(p1,,,"DEVICE")''f$parse(p1,,,"DIRECTORY")'
+$ p1 = f$parse(p1,,,"NAME") + f$parse(p1,,,"TYPE")
+$ _fp = f$parse(".DIR",p1)
+$ dt_loop:
+$ _f = f$search(_fp)
+$ if _f .eqs. "" then goto dt_loopend
+$ call deltree [.'f$parse(_f,,,"NAME")']*.*
+$ goto dt_loop
+$ dt_loopend:
+$ _fp = f$parse(p1,".;*")
+$ if f$search(_fp) .eqs. "" then goto dt_exit
+$ set noon
+$ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) '_fp'
+$ set on
+$ delete/nolog '_fp'
+$ dt_exit:
+$ set default '_dt_def'
+$ exit
+$ dt_STOP:
+$ set default '_dt_def'
+$ stop/id=""
+$ exit
+$ endsubroutine
diff --git a/test/testenc.com b/test/testenc.com
new file mode 100644
index 0000000000..0756e8bada
--- /dev/null
+++ b/test/testenc.com
@@ -0,0 +1,50 @@
+$! TESTENC.COM -- Test encoding and decoding
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ testsrc := makefile.ssl
+$ test := p.txt
+$ cmd := mcr 'exe_dir'openssl
+$
+$ copy 'testsrc' 'test'
+$
+$ write sys$output "cat"
+$ 'cmd' enc -in 'test' -out 'test'-cipher
+$ 'cmd' enc -in 'test'-cipher -out 'test'-clear
+$ difference/output=nl: 'test' 'test'-clear
+$ if $severity .ne. 1 then exit 3
+$ delete 'test'-cipher;*,'test'-clear;*
+$
+$ write sys$output "base64"
+$ 'cmd' enc -a -e -in 'test' -out 'test'-cipher
+$ 'cmd' enc -a -d -in 'test'-cipher -out 'test'-clear
+$ difference/output=nl: 'test' 'test'-clear
+$ if $severity .ne. 1 then exit 3
+$ delete 'test'-cipher;*,'test'-clear;*
+$
+$ define/user sys$output 'test'-cipher-commands
+$ 'cmd' list-cipher-commands
+$ open/read f 'test'-cipher-commands
+$ loop_cipher_commands:
+$ read/end=loop_cipher_commands_end f i
+$ write sys$output i
+$ 'cmd' 'i' -bufsize 113 -e -k test -in 'test' -out 'test'-'i'-cipher
+$ 'cmd' 'i' -bufsize 157 -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear
+$ difference/output=nl: 'test' 'test'-'i'-clear
+$ if $severity .ne. 1 then exit 3
+$ delete 'test'-'i'-cipher;*,'test'-'i'-clear;*
+$
+$ write sys$output i," base64"
+$ 'cmd' 'i' -bufsize 113 -a -e -k test -in 'test' -out 'test'-'i'-cipher
+$ 'cmd' 'i' -bufsize 157 -a -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear
+$ difference/output=nl: 'test' 'test'-'i'-clear
+$ if $severity .ne. 1 then exit 3
+$ delete 'test'-'i'-cipher;*,'test'-'i'-clear;*
+$
+$ goto loop_cipher_commands
+$ loop_cipher_commands_end:
+$ close f
+$ delete 'test'-cipher-commands;*
+$ delete 'test';*
diff --git a/test/testgen.com b/test/testgen.com
new file mode 100644
index 0000000000..c7a78f7637
--- /dev/null
+++ b/test/testgen.com
@@ -0,0 +1,33 @@
+$! TETSGEN.COM
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ T := testcert
+$ KEY = 512
+$ CA := [-.certs]testca.pem
+$
+$ set noon
+$ delete 'T'.1;*,'T'.2;*,'T'.key;*
+$ set on
+$
+$ write sys$output "generating certificate request"
+$
+$ write sys$output "There should be a 2 sequences of .'s and some +'s."
+$ write sys$output "There should not be more that at most 80 per line"
+$ write sys$output "This could take some time."
+$
+$ mcr 'exe_dir'openssl req -config test.cnf -new -out testreq.pem
+$ if $severity .ne. 1
+$ then
+$ write sys$output "problems creating request"
+$ exit 3
+$ endif
+$
+$ mcr 'exe_dir'openssl req -verify -in testreq.pem -noout
+$ if $severity .ne. 1
+$ then
+$ write sys$output "signature on req is wrong"
+$ exit 3
+$ endif
diff --git a/test/tests.com b/test/tests.com
new file mode 100644
index 0000000000..147b8aa838
--- /dev/null
+++ b/test/tests.com
@@ -0,0 +1,203 @@
+$! TESTS.COM -- Performs the necessary tests
+$!
+$! P1 tests to be performed. Empty means all.
+$
+$ __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
+$ texe_dir := sys$disk:[-.'__arch'.exe.test]
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ set default '__here'
+$ on control_y then goto exit
+$ on error then goto exit
+$
+$ if p1 .nes. ""
+$ then
+$ tests = p1
+$ else
+$ tests := -
+ test_des,test_idea,test_sha,test_md5,test_hmac,test_md2,test_mdc2,-
+ test_rc2,test_rc4,test_rc5,test_bf,test_cast,-
+ test_rand,test_bn,test_enc,test_x509,test_rsa,test_crl,test_sid,-
+ test_reqgen,test_req,test_pkcs7,test_verify,test_dh,test_dsa,-
+ test_ss,test_ssl,test_ca
+$ endif
+$ tests = f$edit(tests,"COLLAPSE")
+$
+$ BNTEST := bntest
+$ EXPTEST := exptest
+$ IDEATEST := ideatest
+$ SHATEST := shatest
+$ SHA1TEST := sha1test
+$ MDC2TEST := mdc2test
+$ RMDTEST := rmdtest
+$ MD2TEST := md2test
+$ MD5TEST := md5test
+$ HMACTEST := hmactest
+$ RC2TEST := rc2test
+$ RC4TEST := rc4test
+$ RC5TEST := rc5test
+$ BFTEST := bftest
+$ CASTTEST := casttest
+$ DESTEST := destest
+$ RANDTEST := randtest
+$ DHTEST := dhtest
+$ DSATEST := dsatest
+$ METHTEST := methtest
+$ SSLTEST := ssltest
+$ RSATEST := rsa_oaep_test
+$
+$ tests_i = 0
+$ loop_tests:
+$ tests_e = f$element(tests_i,",",tests)
+$ tests_i = tests_i + 1
+$ if tests_e .eqs. "," then goto exit
+$ goto 'tests_e'
+$
+$ test_des:
+$ mcr 'texe_dir''destest'
+$ goto loop_tests
+$ test_idea:
+$ mcr 'texe_dir''ideatest'
+$ goto loop_tests
+$ test_sha:
+$ mcr 'texe_dir''shatest'
+$ mcr 'texe_dir''sha1test'
+$ goto loop_tests
+$ test_mdc2:
+$ mcr 'texe_dir''mdc2test'
+$ goto loop_tests
+$ test_md5:
+$ mcr 'texe_dir''md5test'
+$ goto loop_tests
+$ test_hmac:
+$ mcr 'texe_dir''hmactest'
+$ goto loop_tests
+$ test_md2:
+$ mcr 'texe_dir''md2test'
+$ goto loop_tests
+$ test_rmd:
+$ mcr 'texe_dir''rmdtest'
+$ goto loop_tests
+$ test_bf:
+$ mcr 'texe_dir''bftest'
+$ goto loop_tests
+$ test_cast:
+$ mcr 'texe_dir''casttest'
+$ goto loop_tests
+$ test_rc2:
+$ mcr 'texe_dir''rc2test'
+$ goto loop_tests
+$ test_rc4:
+$ mcr 'texe_dir''rc4test'
+$ goto loop_tests
+$ test_rc5:
+$ mcr 'texe_dir''rc5test'
+$ goto loop_tests
+$ test_rand:
+$ mcr 'texe_dir''randtest'
+$ goto loop_tests
+$ test_enc:
+$ @testenc.com
+$ goto loop_tests
+$ test_x509:
+$ define sys$error nla0:
+$ write sys$output "test normal x509v1 certificate"
+$ @tx509.com
+$ write sys$output "test first x509v3 certificate"
+$ @tx509.com v3-cert1.pem
+$ write sys$output "test second x509v3 certificate"
+$ @tx509.com v3-cert2.pem
+$ deassign sys$error
+$ goto loop_tests
+$ test_rsa:
+$ define sys$error nla0:
+$ @trsa.com
+$ deassign sys$error
+$ mcr 'texe_dir''rsatest'
+$ goto loop_tests
+$ test_crl:
+$ define sys$error nla0:
+$ @tcrl.com
+$ deassign sys$error
+$ goto loop_tests
+$ test_sid:
+$ define sys$error nla0:
+$ @tsid.com
+$ deassign sys$error
+$ goto loop_tests
+$ test_req:
+$ define sys$error nla0:
+$ @treq.com
+$ @treq.com testreq2.pem
+$ deassign sys$error
+$ goto loop_tests
+$ test_pkcs7:
+$ define sys$error nla0:
+$ @tpkcs7.com
+$ @tpkcs7d.com
+$ deassign sys$error
+$ goto loop_tests
+$ test_bn:
+$ write sys$output "starting big number library test, could take a while..."
+$ create bntest-vms.fdl
+FILE
+ ORGANIZATION sequential
+RECORD
+ FORMAT stream_lf
+$ create/fdl=bntest-vms.fdl bntest-vms.sh
+$ open/append foo bntest-vms.sh
+$ type/output=foo: sys$input:
+<< __FOO__ bc | awk '{ \
+if ($$0 != "0") {print "error"; exit(1); } \
+if (((NR+1)%64) == 0) print NR+1," tests done"; }'
+$ define/user sys$output bntest-vms.tmp
+$ mcr 'texe_dir''bntest'
+$ copy bntest-vms.tmp foo:
+$ delete bntest-vms.tmp;*
+$ type/output=foo: sys$input:
+__FOO__
+$ close foo
+$ write sys$output "-- copy the [.test]bntest-vms.sh file to a Unix system and run it"
+$ write sys$output "-- through sh or bash to verify that the bignum operations went well."
+$ write sys$output ""
+$ write sys$output "test a^b%c implementations"
+$ mcr 'texe_dir''exptest'
+$ goto loop_tests
+$ test_verify:
+$ write sys$output "The following command should have some OK's and some failures"
+$ write sys$output "There are definitly a few expired certificates"
+$ @tverify.com
+$ goto loop_tests
+$ test_dh:
+$ write sys$output "Generate as set of DH parameters"
+$ mcr 'texe_dir''dhtest'
+$ goto loop_tests
+$ test_dsa:
+$ write sys$output "Generate as set of DSA parameters"
+$ mcr 'texe_dir''dsatest'
+$ goto loop_tests
+$ test_reqgen:
+$ write sys$output "Generate and verify a certificate request"
+$ @testgen.com
+$ goto loop_tests
+$ test_ss:
+$ write sys$output "Generate and certify a test certificate"
+$ @testss.com
+$ goto loop_tests
+$ test_ssl:
+$ write sys$output "test SSL protocol"
+$ @testssl.com
+$ goto loop_tests
+$ test_ca:
+$ write sys$output "Generate and certify a test certificate via the 'ca' program"
+$ @testca.com
+$ goto loop_tests
+$
+$
+$ exit:
+$ set default '__save_default'
+$ exit
diff --git a/test/testss.com b/test/testss.com
new file mode 100644
index 0000000000..34eaa7b7ad
--- /dev/null
+++ b/test/testss.com
@@ -0,0 +1,104 @@
+$! TESTSS.COM
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ digest="-mdc2"
+$ reqcmd := mcr 'exe_dir'openssl req
+$ x509cmd := mcr 'exe_dir'openssl x509 'digest'
+$ verifycmd := mcr 'exe_dir'openssl verify
+$
+$ CAkey="""keyCA.ss"""
+$ CAcert="""certCA.ss"""
+$ CAreq="""reqCA.ss"""
+$ CAconf="""CAss.cnf"""
+$ CAreq2="""req2CA.ss""" ! temp
+$
+$ Uconf="""Uss.cnf"""
+$ Ukey="""keyU.ss"""
+$ Ureq="""reqU.ss"""
+$ Ucert="""certU.ss"""
+$
+$ write sys$output ""
+$ write sys$output "make a certificate request using 'req'"
+$ 'reqcmd' -config 'CAconf' -out 'CAreq' -keyout 'CAkey' -new ! -out err.ss
+$ if $severity .ne. 1
+$ then
+$ write sys$output "error using 'req' to generate a certificate request"
+$ exit 3
+$ endif
+$ write sys$output ""
+$ write sys$output "convert the certificate request into a self signed certificate using 'x509'"
+$ define /user sys$output err.ss
+$ 'x509cmd' "-CAcreateserial" -in 'CAreq' -days 30 -req -out 'CAcert' -signkey 'CAkey'
+$ if $severity .ne. 1
+$ then
+$ write sys$output "error using 'x509' to self sign a certificate request"
+$ exit 3
+$ endif
+$
+$ write sys$output ""
+$ write sys$output "convert a certificate into a certificate request using 'x509'"
+$ define /user sys$output err.ss
+$ 'x509cmd' -in 'CAcert' -x509toreq -signkey 'CAkey' -out 'CAreq2'
+$ if $severity .ne. 1
+$ then
+$ write sys$output "error using 'x509' convert a certificate to a certificate request"
+$ exit 3
+$ endif
+$
+$ 'reqcmd' -verify -in 'CAreq' -noout
+$ if $severity .ne. 1
+$ then
+$ write sys$output "first generated request is invalid"
+$ exit 3
+$ endif
+$
+$ 'reqcmd' -verify -in 'CAreq2' -noout
+$ if $severity .ne. 1
+$ then
+$ write sys$output "second generated request is invalid"
+$ exit 3
+$ endif
+$
+$ 'verifycmd' "-CAfile" 'CAcert' 'CAcert'
+$ if $severity .ne. 1
+$ then
+$ write sys$output "first generated cert is invalid"
+$ exit 3
+$ endif
+$
+$ write sys$output ""
+$ write sys$output "make another certificate request using 'req'"
+$ define /user sys$output err.ss
+$ 'reqcmd' -config 'Uconf' -out 'Ureq' -keyout 'Ukey' -new
+$ if $severity .ne. 1
+$ then
+$ write sys$output "error using 'req' to generate a certificate request"
+$ exit 3
+$ endif
+$
+$ write sys$output ""
+$ write sys$output "sign certificate request with the just created CA via 'x509'"
+$ define /user sys$output err.ss
+$ 'x509cmd' "-CAcreateserial" -in 'Ureq' -days 30 -req -out 'Ucert' "-CA" 'CAcert' "-CAkey" 'CAkey'
+$ if $severity .ne. 1
+$ then
+$ write sys$output "error using 'x509' to sign a certificate request"
+$ exit 3
+$ endif
+$
+$ 'verifycmd' "-CAfile" 'CAcert' 'Ucert'
+$ write sys$output ""
+$ write sys$output "Certificate details"
+$ 'x509cmd' -subject -issuer -startdate -enddate -noout -in 'Ucert'
+$
+$ write sys$output ""
+$ write sys$output "The generated CA certificate is ",CAcert
+$ write sys$output "The generated CA private key is ",CAkey
+$
+$ write sys$output "The generated user certificate is ",Ucert
+$ write sys$output "The generated user private key is ",Ukey
+$
+$ delete err.ss;*
diff --git a/test/testssl.com b/test/testssl.com
new file mode 100644
index 0000000000..06c9f657a7
--- /dev/null
+++ b/test/testssl.com
@@ -0,0 +1,63 @@
+$! TESTSSL.COM
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.test]
+$
+$ copy/concatenate [-.certs]*.pem certs.tmp
+$
+$ write sys$output "test sslv2"
+$ mcr 'exe_dir'ssltest -ssl2
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv2 with server authentication"
+$ mcr 'exe_dir'ssltest -ssl2 -server_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv2 with client authentication"
+$ mcr 'exe_dir'ssltest -ssl2 -client_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv2 with both client and server authentication"
+$ mcr 'exe_dir'ssltest -ssl2 -server_auth -client_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv3"
+$ mcr 'exe_dir'ssltest -ssl3
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv3 with server authentication"
+$ mcr 'exe_dir'ssltest -ssl3 -server_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv3 with client authentication"
+$ mcr 'exe_dir'ssltest -ssl3 -client_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv3 with both client and server authentication"
+$ mcr 'exe_dir'ssltest -ssl3 -server_auth -client_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv2/sslv3"
+$ mcr 'exe_dir'ssltest
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv2/sslv3 with server authentication"
+$ mcr 'exe_dir'ssltest -server_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv2/sslv3 with client authentication"
+$ mcr 'exe_dir'ssltest -client_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ write sys$output "test sslv2/sslv3 with both client and server authentication"
+$ mcr 'exe_dir'ssltest -server_auth -client_auth "-CAfile" certs.tmp
+$ if $severity .ne. 1 then goto exit3
+$
+$ RET = 1
+$ goto exit
+$ exit3:
+$ RET = 3
+$ exit:
+$ delete certs.tmp;*
+$ exit 'RET'
diff --git a/test/tpkcs7.com b/test/tpkcs7.com
new file mode 100644
index 0000000000..5ed920ac34
--- /dev/null
+++ b/test/tpkcs7.com
@@ -0,0 +1,49 @@
+$! TPKCS7.COM -- Tests pkcs7 keys
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ cmd := mcr 'exe_dir'openssl pkcs7
+$
+$ t := testp7.pem
+$ if p1 .nes. "" then t = p1
+$
+$ write sys$output "testing PKCS7 conversions"
+$ copy 't' fff.p
+$
+$ write sys$output "p -> d"
+$ 'cmd' -in fff.p -inform p -outform d -out f.d
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in fff.p -inform p -outform p -out f.p
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> d"
+$ 'cmd' -in f.d -inform d -outform d -out ff.d1
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> d"
+$ 'cmd' -in f.p -inform p -outform d -out ff.d3
+$ if $severity .ne. 1 then exit 3
+$
+$
+$ write sys$output "d -> p"
+$ 'cmd' -in f.d -inform d -outform p -out ff.p1
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in f.p -inform p -outform p -out ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: fff.p f.p
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: f.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/test/tpkcs7d.com b/test/tpkcs7d.com
new file mode 100644
index 0000000000..08d33eaa69
--- /dev/null
+++ b/test/tpkcs7d.com
@@ -0,0 +1,42 @@
+$! TPKCS7.COM -- Tests pkcs7 keys
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ cmd := mcr 'exe_dir'openssl pkcs7
+$
+$ t := pkcs7-1.pem
+$ if p1 .nes. "" then t = p1
+$
+$ write sys$output "testing PKCS7 conversions (2)"
+$ copy 't' fff.p
+$
+$ write sys$output "p -> d"
+$ 'cmd' -in fff.p -inform p -outform d -out f.d
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in fff.p -inform p -outform p -out f.p
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> d"
+$ 'cmd' -in f.d -inform d -outform d -out ff.d1
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> d"
+$ 'cmd' -in f.p -inform p -outform d -out ff.d3
+$ if $severity .ne. 1 then exit 3
+$
+$
+$ write sys$output "d -> p"
+$ 'cmd' -in f.d -inform d -outform p -out ff.p1
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in f.p -inform p -outform p -out ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: f.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/test/treq.com b/test/treq.com
new file mode 100644
index 0000000000..6483fa0672
--- /dev/null
+++ b/test/treq.com
@@ -0,0 +1,78 @@
+$! TREQ.COM -- Tests req keys
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ cmd := mcr 'exe_dir'openssl req
+$
+$ t := testreq.pem
+$ if p1 .nes. "" then t = p1
+$
+$ write sys$output "testing req conversions"
+$ copy 't' fff.p
+$
+$ write sys$output "p -> d"
+$ 'cmd' -in fff.p -inform p -outform d -out f.d
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "p -> t"
+$! 'cmd' -in fff.p -inform p -outform t -out f.t
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in fff.p -inform p -outform p -out f.p
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> d"
+$ 'cmd' -verify -in f.d -inform d -outform d -out ff.d1
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "t -> d"
+$! 'cmd' -verify -in f.t -inform t -outform d -out ff.d2
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> d"
+$ 'cmd' -verify -in f.p -inform p -outform d -out ff.d3
+$ if $severity .ne. 1 then exit 3
+$
+$! write sys$output "d -> t"
+$! 'cmd' -in f.d -inform d -outform t -out ff.t1
+$! if $severity .ne. 1 then exit 3
+$! write sys$output "t -> t"
+$! 'cmd' -in f.t -inform t -outform t -out ff.t2
+$! if $severity .ne. 1 then exit 3
+$! write sys$output "p -> t"
+$! 'cmd' -in f.p -inform p -outform t -out ff.t3
+$! if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> p"
+$ 'cmd' -in f.d -inform d -outform p -out ff.p1
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "t -> p"
+$! 'cmd' -in f.t -inform t -outform p -out ff.p2
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in f.p -inform p -outform p -out ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: fff.p f.p
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$! difference/output=nl: fff.p ff.p2
+$! if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$! difference/output=nl: f.t ff.t1
+$! if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.t ff.t2
+$! if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.t ff.t3
+$! if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: f.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.p ff.p2
+$! if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/test/trsa.com b/test/trsa.com
new file mode 100644
index 0000000000..9c9083d02b
--- /dev/null
+++ b/test/trsa.com
@@ -0,0 +1,78 @@
+$! TRSA.COM -- Tests rsa keys
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ cmd := mcr 'exe_dir'openssl rsa
+$
+$ t := testrsa.pem
+$ if p1 .nes. "" then t = p1
+$
+$ write sys$output "testing RSA conversions"
+$ copy 't' fff.p
+$
+$ write sys$output "p -> d"
+$ 'cmd' -in fff.p -inform p -outform d -out f.d
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "p -> t"
+$! 'cmd' -in fff.p -inform p -outform t -out f.t
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in fff.p -inform p -outform p -out f.p
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> d"
+$ 'cmd' -in f.d -inform d -outform d -out ff.d1
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "t -> d"
+$! 'cmd' -in f.t -inform t -outform d -out ff.d2
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> d"
+$ 'cmd' -in f.p -inform p -outform d -out ff.d3
+$ if $severity .ne. 1 then exit 3
+$
+$! write sys$output "d -> t"
+$! 'cmd' -in f.d -inform d -outform t -out ff.t1
+$! if $severity .ne. 1 then exit 3
+$! write sys$output "t -> t"
+$! 'cmd' -in f.t -inform t -outform t -out ff.t2
+$! if $severity .ne. 1 then exit 3
+$! write sys$output "p -> t"
+$! 'cmd' -in f.p -inform p -outform t -out ff.t3
+$! if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> p"
+$ 'cmd' -in f.d -inform d -outform p -out ff.p1
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "t -> p"
+$! 'cmd' -in f.t -inform t -outform p -out ff.p2
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in f.p -inform p -outform p -out ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: fff.p f.p
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$! difference/output=nl: fff.p ff.p2
+$! if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$! difference/output=nl: f.t ff.t1
+$! if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.t ff.t2
+$! if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.t ff.t3
+$! if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: f.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.p ff.p2
+$! if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/test/tsid.com b/test/tsid.com
new file mode 100644
index 0000000000..28d83e5c4e
--- /dev/null
+++ b/test/tsid.com
@@ -0,0 +1,78 @@
+$! TSID.COM -- Tests sid keys
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ cmd := mcr 'exe_dir'openssl sess_id
+$
+$ t := testsid.pem
+$ if p1 .nes. "" then t = p1
+$
+$ write sys$output "testing session-id conversions"
+$ copy 't' fff.p
+$
+$ write sys$output "p -> d"
+$ 'cmd' -in fff.p -inform p -outform d -out f.d
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "p -> t"
+$! 'cmd' -in fff.p -inform p -outform t -out f.t
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in fff.p -inform p -outform p -out f.p
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> d"
+$ 'cmd' -in f.d -inform d -outform d -out ff.d1
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "t -> d"
+$! 'cmd' -in f.t -inform t -outform d -out ff.d2
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> d"
+$ 'cmd' -in f.p -inform p -outform d -out ff.d3
+$ if $severity .ne. 1 then exit 3
+$
+$! write sys$output "d -> t"
+$! 'cmd' -in f.d -inform d -outform t -out ff.t1
+$! if $severity .ne. 1 then exit 3
+$! write sys$output "t -> t"
+$! 'cmd' -in f.t -inform t -outform t -out ff.t2
+$! if $severity .ne. 1 then exit 3
+$! write sys$output "p -> t"
+$! 'cmd' -in f.p -inform p -outform t -out ff.t3
+$! if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> p"
+$ 'cmd' -in f.d -inform d -outform p -out ff.p1
+$ if $severity .ne. 1 then exit 3
+$! write sys$output "t -> p"
+$! 'cmd' -in f.t -inform t -outform p -out ff.p2
+$! if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in f.p -inform p -outform p -out ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: fff.p f.p
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$! difference/output=nl: fff.p ff.p2
+$! if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$! difference/output=nl: f.t ff.t1
+$! if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.t ff.t2
+$! if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.t ff.t3
+$! if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: f.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$! difference/output=nl: f.p ff.p2
+$! if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ delete f.*;*,ff.*;*,fff.*;*
diff --git a/test/tverify.com b/test/tverify.com
new file mode 100644
index 0000000000..f97e71478f
--- /dev/null
+++ b/test/tverify.com
@@ -0,0 +1,26 @@
+$! TVERIFY.COM
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ copy/concatenate [-.certs]*.pem certs.tmp
+$
+$ old_f :=
+$ loop_certs:
+$ c := NO
+$ certs :=
+$ loop_certs2:
+$ f = f$search("[-.certs]*.pem")
+$ if f .nes. "" .and. f .nes. old_f
+$ then
+$ certs = certs + " [-.certs]" + f$parse(f,,,"NAME") + ".pem"
+$ if f$length(certs) .lt. 180 then goto loop_certs2
+$ c := YES
+$ endif
+$ certs = certs - " "
+$
+$ mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs'
+$ if c then goto loop_certs
+$
+$ delete certs.tmp;*
diff --git a/test/tx509.com b/test/tx509.com
new file mode 100644
index 0000000000..bbcf0a384b
--- /dev/null
+++ b/test/tx509.com
@@ -0,0 +1,78 @@
+$! TX509.COM -- Tests x509 certificates
+$
+$ __arch := VAX
+$ if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$ exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$
+$ cmd := mcr 'exe_dir'openssl x509
+$
+$ t := testx509.pem
+$ if p1 .nes. "" then t = p1
+$
+$ write sys$output "testing X509 conversions"
+$ copy 't' fff.p
+$
+$ write sys$output "p -> d"
+$ 'cmd' -in fff.p -inform p -outform d -out f.d
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> n"
+$ 'cmd' -in fff.p -inform p -outform n -out f.n
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in fff.p -inform p -outform p -out f.p
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> d"
+$ 'cmd' -in f.d -inform d -outform d -out ff.d1
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "n -> d"
+$ 'cmd' -in f.n -inform n -outform d -out ff.d2
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> d"
+$ 'cmd' -in f.p -inform p -outform d -out ff.d3
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> n"
+$ 'cmd' -in f.d -inform d -outform n -out ff.n1
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "n -> n"
+$ 'cmd' -in f.n -inform n -outform n -out ff.n2
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> n"
+$ 'cmd' -in f.p -inform p -outform n -out ff.n3
+$ if $severity .ne. 1 then exit 3
+$
+$ write sys$output "d -> p"
+$ 'cmd' -in f.d -inform d -outform p -out ff.p1
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "n -> p"
+$ 'cmd' -in f.n -inform n -outform p -out ff.p2
+$ if $severity .ne. 1 then exit 3
+$ write sys$output "p -> p"
+$ 'cmd' -in f.p -inform p -outform p -out ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: fff.p f.p
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p2
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: fff.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: f.n ff.n1
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.n ff.n2
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.n ff.n3
+$ if $severity .ne. 1 then exit 3
+$
+$ difference/output=nl: f.p ff.p1
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.p ff.p2
+$ if $severity .ne. 1 then exit 3
+$ difference/output=nl: f.p ff.p3
+$ if $severity .ne. 1 then exit 3
+$
+$ delete f.*;*,ff.*;*,fff.*;*