2
$! Startup file for OpenSSL 1.x.
6
$! This procedure must reside in the OpenSSL installation directory.
7
$! It will fail if it is copied to a different location.
9
$! P1 qualifier(s) for DEFINE. For example, "/SYSTEM" to get the
10
$! logical names defined in the system logical name table.
12
$! P2 "64", to use executables which were built with 64-bit pointers.
14
$! Good (default) and bad status values.
16
$ status = %x00010001 ! RMS$_NORMAL, normal successful completion.
17
$ rms_e_fnf = %x00018292 ! RMS$_FNF, file not found.
19
$! Prepare for problems.
21
$ orig_dev_dir = f$environment( "DEFAULT")
22
$ on control_y then goto clean_up
23
$ on error then goto clean_up
25
$! Determine hardware architecture.
27
$ if (f$getsyi( "cpu") .lt. 128)
31
$ arch_name = f$edit( f$getsyi( "arch_name"), "upcase")
32
$ if (arch_name .eqs. "") then arch_name = "UNK"
37
$ arch_name_exe = arch_name+ "_64"
39
$ arch_name_exe = arch_name
42
$! Derive the OpenSSL installation device:[directory] from the location
43
$! of this command procedure.
45
$ proc = f$environment( "procedure")
46
$ proc_dev_dir = f$parse( "A.;", proc, , , "no_conceal") - "A.;"
47
$ proc_dev = f$parse( proc_dev_dir, , , "device", "syntax_only")
48
$ proc_dir = f$parse( proc_dev_dir, , , "directory", "syntax_only") - -
49
".][000000"- "[000000."- "]["- "["- "]"
50
$ proc_dev_dir = proc_dev+ "["+ proc_dir+ "]"
51
$ set default 'proc_dev_dir'
53
$ ossl_dev_dir = f$environment( "default")
55
$! Check existence of expected directories (to see if this procedure has
56
$! been moved away from its proper place).
58
$ if ((f$search( "certs.dir;1") .eqs. "") .or. -
59
(f$search( "include.dir;1") .eqs. "") .or. -
60
(f$search( "private.dir;1") .eqs. "") .or. -
61
(f$search( "vms.dir;1") .eqs. ""))
64
" Can't find expected common OpenSSL directories in:"
65
$ write sys$output " ''ossl_dev_dir'"
70
$ if ((f$search( "''arch_name_exe'_exe.dir;1") .eqs. "") .or. -
71
(f$search( "''arch_name'_lib.dir;1") .eqs. ""))
74
" Can't find expected architecture-specific OpenSSL directories in:"
75
$ write sys$output " ''ossl_dev_dir'"
80
$! All seems well (enough). Define the OpenSSL logical names.
82
$ ossl_root = ossl_dev_dir- "]"+ ".]"
83
$ define /translation_attributes = concealed /nolog'p1 SSLROOT 'ossl_root'
84
$ define /nolog 'p1' SSLCERTS sslroot:[certs]
85
$ define /nolog 'p1' SSLINCLUDE sslroot:[include]
86
$ define /nolog 'p1' SSLPRIVATE sslroot:[private]
87
$ define /nolog 'p1' SSLEXE sslroot:['arch_name_exe'_exe]
88
$ define /nolog 'p1' SSLLIB sslroot:['arch_name'_lib]
90
$! Defining OPENSSL lets a C program use "#include <openssl/{foo}.h>":
91
$ define /nolog 'p1' OPENSSL SSLINCLUDE:
93
$! Run a site-specific procedure, if it exists.
95
$ if f$search( "sslroot:[vms]openssl_systartup.com") .nes."" then -
96
@ sslroot:[vms]openssl_systartup.com
98
$! Restore the original default dev:[dir] (if known).
102
$ if (f$type( orig_dev_dir) .nes. "")
104
$ set default 'orig_dev_dir'