$!
$! CRYPTO-LIB.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 the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
$! library for OpenSSL. The "xxx" denotes the machine architecture of AXP
$! 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.
$!
$! 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
$!
$! Specify RSAREF as P2 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 as P3 to compile with or without debugger
$! information.
$!
$! Specify which compiler at P4 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.
$!
$! P5, if defined, sets a TCP/IP library to use, through one of the following
$! keywords:
$!
$! UCX for UCX
$! SOCKETSHR for SOCKETSHR+NETLIB
$!
$! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
$!
$! P7, if defined, sets a choice of crypto methods to compile.
$! WARNING: this should only be done to recompile some part of an already
$! fully compiled library.
$!
$!
$! Define A TCP/IP Library That We Will Need To Link To.
$! (That Is, If We 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
$!
$! Define The Different Encryption Types.
$!
$ ENCRYPT_TYPES = "Basic,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ -
"DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ -
"BN,EC,RSA,DSA,DH,DSO,ENGINE,RIJNDAEL,"+ -
"BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ -
"EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
"CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI"
$ ENCRYPT_PROGRAMS = "DES,PKCS7"
$!
$! 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 OBJ Directory.
$!
$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.CRYPTO]
$!
$! Check To See If The Architecture Specific OBJ Directory Exists.
$!
$ IF (F$PARSE(OBJ_DIR).EQS."")
$