diff options
author | Richard Levitte <levitte@openssl.org> | 2016-01-30 07:14:58 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-02-10 14:36:32 +0100 |
commit | e84193e43dbd3da23845ef9fcfcb5e364049a396 (patch) | |
tree | 05cd92323c3ac2a5ceea773e5a432c41d07c2513 /VMS | |
parent | unified build scheme: add instructions for travis to build with --unified (diff) | |
download | openssl-e84193e43dbd3da23845ef9fcfcb5e364049a396.tar.xz openssl-e84193e43dbd3da23845ef9fcfcb5e364049a396.zip |
unified build scheme: add a "unified" template for VMS descrip.mms
As part of this, change util/mkdef.pl to stop adding libraries to
depend on in its output. mkdef.pl should ONLY output a symbol
vector.
Because symbol names can't be longer than 31 characters, we use the
compiler to shorten those that are longer down to 23 characters plus
an 8 character CRC. To make sure users of our header files will pick
up on that automatically, add the DEC C supported extra headers files
__decc_include_prologue.h and __decc_include_epilogue.h.
Furthermore, we add a config.com, so VMS people can configure just as
comfortably as any Unix folks, thusly:
@config
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'VMS')
-rw-r--r-- | VMS/engine.opt | 2 | ||||
-rw-r--r-- | VMS/openssl_shutdown.com.in | 59 | ||||
-rw-r--r-- | VMS/openssl_startup.com.in | 115 | ||||
-rw-r--r-- | VMS/openssl_utils.com | 56 | ||||
-rw-r--r-- | VMS/translatesyms.pl | 55 |
5 files changed, 242 insertions, 45 deletions
diff --git a/VMS/engine.opt b/VMS/engine.opt new file mode 100644 index 0000000000..1c73c8005a --- /dev/null +++ b/VMS/engine.opt @@ -0,0 +1,2 @@ +CASE_SENSITIVE=YES +SYMBOL_VECTOR=(bind_engine=PROCEDURE,v_check=PROCEDURE) diff --git a/VMS/openssl_shutdown.com.in b/VMS/openssl_shutdown.com.in new file mode 100644 index 0000000000..85cc26da3b --- /dev/null +++ b/VMS/openssl_shutdown.com.in @@ -0,0 +1,59 @@ +$ ! OpenSSL shutdown script +$ ! +$ ! This script deassigns the logical names used by the installation +$ ! of OpenSSL. It can do so at any level, defined by P1. +$ ! +$ ! P1 Qualifier(s) for DEASSIGN. +$ ! Default: /PROCESS +$ ! +$ ! P2 If the value is "NOALIASES", no alias logical names are +$ ! deassigned. +$ +$ status = %x10000001 ! Generic success +$ +$ ! In case there's a problem +$ ON CONTROL_Y THEN GOTO bailout +$ ON ERROR THEN GOTO bailout +$ +$ ! Find the architecture +$ IF F$GETSYI("CPU") .LT. 128 +$ THEN +$ arch := VAX +$ ELSE +$ arch := F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE") +$ IF arch .EQS. "" THEN GOTO unknown_arch +$ ENDIF +$ +$ ! Generated information +$ VERSION := {- $config{version} -} +$ INSTALLTOP := {- $config{INSTALLTOP} -} +$ POINTER_SIZE = {- $config{pointersize} -} +$ +$ ! Abbrevs +$ DEAS := DEASSIGN /NOLOG 'P1' +$ v = VERSION - "." - "." +$ +$ DEAS OSSL$ROOT'v' +$ DEAS OSSL$INCLUDE'v' +$ DEAS OSSL$LIB'v' +$ DEAS OSSL$SHARE'v' +$ DEAS OSSL$ENGINES'v' +$ DEAS OSSL$EXE'v' +$ {- output_off() if $config{no_shared} -} +$ {- join("\n\$ ", map { "DEAS $_'v'" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -} +$ {- output_on() -} +$ IF P2 .NES. "NOALIASES" +$ THEN +$ DEAS OSSL$ROOT +$ DEAS OSSL$INCLUDE +$ DEAS OSSL$LIB +$ DEAS OSSL$SHARE +$ DEAS OSSL$ENGINES +$ DEAS OSSL$EXE +$ DEAS OPENSSL +$ {- output_off() if $config{no_shared} -} +$ {- join("\n\$ ", map { "DEAS $_" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -} +$ {- output_on() -} +$ ENDIF +$ +$ EXIT 'status' diff --git a/VMS/openssl_startup.com.in b/VMS/openssl_startup.com.in new file mode 100644 index 0000000000..a968b44d6c --- /dev/null +++ b/VMS/openssl_startup.com.in @@ -0,0 +1,115 @@ +$ ! OpenSSL startup script +$ ! +$ ! This script defines the logical names used by the installation +$ ! of OpenSSL. It can provide those logical names at any level, +$ ! defined by P1. +$ ! +$ ! The logical names created are: +$ ! +$ ! OSSL$ROOTnnn Installation root +$ ! OSSL$EXEnnn Where the executables are located +$ ! OSSL$LIBnnn Where the library files are located +$ ! OSSL$SHAREnnn Where the sahreable images are located +$ ! OSSL$INCLUDEnnn Include directory root +$ ! OSSL$ENGINESnnn Where the sahreable images are located +$ ! +$ ! In all these, nnn is the OpenSSL version number. This allows +$ ! several OpenSSL versions to be installed simultaneously. +$ ! +$ ! In addition, unless P2 is "NOALIASES", these logical names are +$ ! created: +$ ! +$ ! OSSL$ROOT Alias for OSSL$ROOTnnn +$ ! OSSL$EXE Alias for OSSL$EXEnnn +$ ! OSSL$LIB Alias for OSSL$LIBnnn +$ ! OSSL$SHARE Alias for OSSL$SHAREnnn +$ ! OSSL$INCLUDE Alias for OSSL$INCLUDEnnn +$ ! OPENSSL is OSSL$INCLUDE:[OPENSSL] +$ ! OSSL$ENGINES Alias for OSSL$ENGINESnnn +$ ! +$ ! P1 Qualifier(s) for DEFINE. "/SYSTEM" would be typical when +$ ! calling this script from SYS$STARTUP:SYSTARTUP_VMS.COM, +$ ! while "/PROCESS" would be typical for a personal install. +$ ! Default: /PROCESS +$ ! +$ ! P2 If the value is "NOALIASES", no alias logical names are +$ ! created. +$ +$ status = %x10000001 ! Generic success +$ +$ ! In case there's a problem +$ ON CONTROL_Y THEN GOTO bailout +$ ON ERROR THEN GOTO bailout +$ +$ ! Find the architecture +$ IF F$GETSYI("CPU") .LT. 128 +$ THEN +$ arch := VAX +$ ELSE +$ arch := F$EDIT(F$GETSYI("ARCH_NAME"),"UPCASE") +$ IF arch .EQS. "" THEN GOTO unknown_arch +$ ENDIF +$ +$ ! Generated information +$ VERSION := {- $config{version} -} +$ INSTALLTOP := {- $config{INSTALLTOP} -} +$ OPENSSLDIR := {- $config{OPENSSLDIR} -} +$ POINTER_SIZE = {- $config{pointersize} -} +$ +$ ! Make sure that INSTALLTOP and OPENSSLDIR become something one +$ ! can build concealed logical names on +$ INSTALLTOP_ = F$PARSE("A.;",INSTALLTOP,,,"NO_CONCEAL") - "A.;" - + - ".][000000" - "[000000." - "][" - "]" + ".]" +$ OPENSSLDIR_ = F$PARSE("A.;",OPENSSLDIR,,,"NO_CONCEAL") - "A.;" - + - ".][000000" - "[000000." - "][" - "]" + ".]" +$ DEFINE /TRANSLATION=CONCEALED /NOLOG WRK_INSTALLTOP 'INSTALLTOP_' +$ +$ ! Check that things are in place, and specifically, the stuff +$ ! belonging to this architecture +$ IF F$SEARCH("WRK_INSTALLTOP:[000000]INCLUDE.DIR;1") .EQS. "" - + .OR. F$SEARCH("WRK_INSTALLTOP:[000000]''arch'.DIR;1") .EQS. "" - + .OR. F$SEARCH("WRK_INSTALLTOP:[''arch']LIB.DIR;1") .EQS. "" - + .OR. F$SEARCH("WRK_INSTALLTOP:[''arch']EXE.DIR;1") .EQS. "" - + .OR. F$SEARCH("WRK_INSTALLTOP:[000000]openssl.cnf;1") .EQS. "" +$ THEN +$ WRITE SYS$ERROR "''INSTALLTOP' doesn't look like an OpenSSL installation for ''arch'" +$ status = %x00018292 ! RMS$_FNF, file not found +$ GOTO bailout +$ ENDIF +$ +$ ! Abbrevs +$ DEFT := DEFINE /TRANSLATION=CONCEALED /NOLOG 'P1' +$ DEF := DEFINE /NOLOG 'P1' +$ v = VERSION - "." - "." +$ +$ DEFT OSSL$INSTROOT'v' 'INSTALLTOP_' +$ DEFT OSSL$INCLUDE'v' OSSL$INSTROOT:[INCLUDE.] +$ DEF OSSL$LIB'v' OSSL$INSTROOT:['arch'.LIB] +$ DEF OSSL$SHARE'v' OSSL$INSTROOT:['arch'.LIB] +$ DEF OSSL$ENGINES'v' OSSL$INSTROOT:['arch'.ENGINES] +$ DEF OSSL$EXE'v' OSSL$INSTROOT:['arch'.EXE] +$ {- output_off() if $config{no_shared} -} +$ {- join("\n\$ ", map { "DEF $_'v' OSSL\$SHARE:$_" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -} +$ {- output_on() -} +$ IF P2 .NES. "NOALIASES" +$ THEN +$ DEF OSSL$INSTROOT OSSL$INSTROOT'v' +$ DEF OSSL$INCLUDE OSSL$INCLUDE'v' +$ DEF OSSL$LIB OSSL$LIB'v' +$ DEF OSSL$SHARE OSSL$SHARE'v' +$ DEF OSSL$ENGINES OSSL$ENGINES'v' +$ DEF OSSL$EXE OSSL$EXE'v' +$ DEF OPENSSL OSSL$INCLUDE:[OPENSSL] +$ {- output_off() if $config{no_shared} -} +$ {- join("\n\$ ", map { "DEF $_ $_'v'" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -} +$ {- output_on() -} +$ ENDIF +$ +$ DEFT OSSL$DATAROOT 'OPENSSLDIR_' +$ DEF OSSL$CERTS OSSL$DATAROOT:[CERTS] +$ DEF OSSL$PRIVATE OSSL$DATAROOT:[PRIVATE] +$ +$ bailout: +$ DEASSIGN WRK_INSTALLTOP +$ +$ EXIT 'status' diff --git a/VMS/openssl_utils.com b/VMS/openssl_utils.com index 64f4915104..b9dea722f3 100644 --- a/VMS/openssl_utils.com +++ b/VMS/openssl_utils.com @@ -1,46 +1,12 @@ -$! -$! APPS.COM -$! Written By: Robert Byer -$! Vice-President -$! A-Com Computing, Inc. -$! byer@mail.all-net.net -$! -$! -$! Slightly modified by Richard Levitte <richard@levitte.org> -$! -$! -$! Always define OPENSSL. Others are optional (non-null P1). -$! -$ OPENSSL :== $SSLEXE:OPENSSL +$ ! OpenSSL utilities +$ ! $ -$ 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 +$ OPENSSL :== $OSSL$EXE:OPENSSL +$ +$ IF F$SYMBOL(PERL) .EQS. "STRING" +$ THEN +$ OSSLCA :== 'PERL' OSSL$EXE:CA.pl +$ OSSLREHASH :== 'PERL' OSSL$EXE:c_rehash.pl +$ ELSE +$ WRITE SYS$ERROR "NOTE: no perl => no OSSLCA or OSSLREHASH" +$ ENDIF diff --git a/VMS/translatesyms.pl b/VMS/translatesyms.pl new file mode 100644 index 0000000000..8ffdbd8aa8 --- /dev/null +++ b/VMS/translatesyms.pl @@ -0,0 +1,55 @@ +#! /usr/bin/perl + +# This script will translate any SYMBOL_VECTOR item that has a translation +# in CXX$DEMANGLER_DB. The latter is generated by and CC/DECC command that +# uses the qualifier /REPOSITORY with the build directory as value. When +# /NAMES=SHORTENED has been used, this file will hold the translations from +# the original symbols to the shortened variants. +# +# CXX$DEMAGLER_DB. is an ISAM file, but with the magic of RMS, it can be +# read as a text file, with each record as one line. +# +# The lines will have the following syntax for any symbol found that's longer +# than 31 characters: +# +# LONG_symbol_34567890123{cksum}$LONG_symbol_34567890123_more_than_31_chars +# +# $ is present at the end of the shortened symbol name, and is preceded by a +# 7 character checksum. The $ makes it easy to separate the shortened name +# from the original one. + +use strict; +use warnings; + +usage() if scalar @ARGV < 1; + +my %translations = (); + +open DEMANGLER_DATA, $ARGV[0] + or die "Couldn't open $ARGV[0]: $!\n"; +while(<DEMANGLER_DATA>) { + chomp; + (my $translated, my $original) = split /\$/; + $translations{$original} = $translated.'$'; +} +close DEMANGLER_DATA; + +$| = 1; # Autoflush +while(<STDIN>) { + s@ + ((?:[A-Za-z0-9_]+)\/)?([A-Za-z0-9_]+)=(PROCEDURE|DATA) + @ + if (defined($translations{$2})) { + my $trans = $translations{$2}; + my $trans_uc = uc $trans; + if (defined($1) && $trans ne $trans_uc) { + "$trans_uc/$trans=$3" + } else { + "$trans=$3" + } + } else { + $& + } + @gxe; + print $_; +} |