[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
$!-----------------------------------------------------------------------------
$! BUILD_PROXYMUNGE.COM
$!
$! P1 == LINK or BUILD or empty (builds)
$!
$! 30-JUL-2020  MGD  broaden to include VSI SSL111 (what a munge!)
$! 23-FEB-2020  MGD  adapt to OpenSSL 1.1.n and later (WASD OpenSSL only)
$! 22-SEP-2007  MGD  initial
$!-----------------------------------------------------------------------------
$!
$ on controly then exit 44
$ on error then goto ssl_detect_remove
$!
$ @wasd_root:[src]archer.com "PROXYMUNGE"
$!
$ p1 = f$edit(p1,"upcase")
$!
$ ssl_root = ""
$ ssl_detect = 0
$ if f$type(BUILD_HTTPD_SSL) .eqs. ""
$ then
$    write sys$output ""
$    @wasd_root:[install]ssl_detect
$    ssl_detect = 1
$ endif
$ if f$type(BUILD_HTTPD_WASD_SSL) .nes. ""
$ then
$    ssl_root = BUILD_HTTPD_SSL_ROOT
$ endif
$ if f$type(BUILD_HTTPD_VMS_SSL111) .nes. ""
$ then
$    ssl_root = f$trnlnm("SSL111$ROOT")
$ endif
$ if f$type(BUILD_HTTPD_SSL) .nes. ""
$ then
$    if ssl_root .eqs. ""
$    then
$       write sys$output "ERROR: do not recognise the OpenSSL 1.1.1"
$       goto ssl_detect_remove
$    endif
$ endif
$!
$ dpeno = "define /process /exec /nolog"
$ wasd_arch_name2 = f$edit(f$getsyi("arch_name"),"upcase")
$ if f$type(BUILD_HTTPD_WASD_SSL) .nes. ""
$ then
$    ssl_root = ssl_root - "]"
$    dpeno openssl "''ssl_root'.include.openssl]"
$    dpeno libssl "''ssl_root'.wasd.''wasd_arch_name2']ossl$libssl32.olb"
$    dpeno libcrypto "''ssl_root'.wasd.''wasd_arch_name2']ossl$libcrypto32.olb"
$    say "Using WASD OpenSSL 1.1.1 package"
$ endif
$ if f$type(BUILD_HTTPD_VMS_SSL111) .nes. ""
$ then
$    dpeno openssl 'ssl_root'[include]
$    say "Using VSI SSL111 package"
$ endif
$!
$ datetime = f$edit(f$time(),"trim")
$ munge_via_ssl = ""
$ if ssl_root .nes. "" then munge_via_ssl = ",munge_via_ssl=1"
$ defines = " /define=(__VMS_VER=70000000," +-
                       "__CRTL_VER=70000000,CGILIB_OBJECT_MODULE," +-
                       "BUILD_DATETIME=""""""''DATETIME'""""""''MUNGE_VIA_SSL')"
$!
$ includes = " /include=[src.misc]"
$ warnings=  " /warning=(disable=(preoptw,implicitfunc," +-
                         "needconstext,addrconstext))"
$!
$ cc_options = "/decc /optimize /stand=relaxed /prefix=all /names=upper" +-
               includes + defines + warnings
$!
$ if f$search("OBJ_''wasd_arch_name'.DIR") .eqs. "" -
     then create /dir [.obj_'wasd_arch_name']
$ object_dir = "[.obj_''wasd_arch_name']"
$!
$ if p1 .eqs. "" .or. p1 .eqs. "BUILD" .or. p1 .eqs. "COMPILE"
$ then
$    set verify
$    cc 'cc_options' /object='object_dir' proxymunge
$!   'f$verify(0)
$    set on
$ endif
$!
$ if p1 .eqs. "" .or. p1 .eqs. "BUILD" .or. p1 .eqs. "LINK"
$ then
$    cgilib_olb = "[src.misc.obj_''wasd_arch_name']cgilib.olb"
$    if f$type(BUILD_HTTPD_WASD_SSL) .nes. ""
$    then
$       show log /process openssl,libssl,libcrypto
$       set verify
$       link /executable=wasd_exe:proxymunge.exe -
           [.obj_'wasd_arch_name']proxymunge,'cgilib_olb'/library,-
           sys$input/options
libssl/library
libcrypto/library
$!      'f$verify(0)
$       deassign /process /exec openssl
$       deassign /process /exec libssl
$       deassign /process /exec libcrypto
$    endif
$    if f$type(BUILD_HTTPD_VMS_SSL111) .nes. ""
$    then
$       set verify
$       link /executable=wasd_exe:proxymunge.exe -
           [.obj_'wasd_arch_name']proxymunge,'cgilib_olb'/library,-
           sys$input/options
sys$library:ssl111$libssl_shr32.exe/share
sys$library:ssl111$libcrypto_shr32.exe/share
$!      'f$verify(0)
$    endif
$    if munge_via_ssl .eqs. ""
$    then
$       set verify
$       link /executable=wasd_exe:proxymunge.exe -
           [.obj_'wasd_arch_name']proxymunge,'cgilib_olb'/library
$!      'f$verify(0)
$    endif
$ endif
$ purge /nolog 'object_dir'
$!
$ ssl_detect_remove:
$ if ssl_detect
$ then
$    delsymg = "delete/symbol/global"
$    if f$type(BUILD_HTTPD_SSL) .nes. "" then delsymg BUILD_HTTPD_SSL
$    if f$type(BUILD_HTTPD_WASD_SSL) .nes. "" then delsymg BUILD_HTTPD_WASD_SSL
$    if f$type(BUILD_HTTPD_SSL_ROOT) .nes. "" then delsymg BUILD_HTTPD_SSL_ROOT
$    if f$type(BUILD_HTTPD_VMS_SSL1) .nes. "" then delsymg BUILD_HTTPD_VMS_SSL1 
$    if f$type(BUILD_HTTPD_VMS_SSL111) .nes. "" then delsymg BUILD_HTTPD_VMS_SSL111 
$ endif
$!
$!-----------------------------------------------------------------------------