<div dir="auto">This is a very helpful post. Thank you.<div dir="auto"><br></div><div dir="auto">We lacked Perl and had no clear path to getting it. Can't say this deficiency caused our project to miss generous targets, but it certainly contributed.</div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020, 6:07 AM Patrick Steuer <<a href="mailto:psteuer9@gmail.com">psteuer9@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> I stumbled across this mails when looking for information regarding OpenSSL<br>
> on zOS. Currently, I am working on getting OpenSSL 1.1.1c running on zOS. So<br>
> far I created my own config "target" inside 10-main.conf based on the old<br>
> configuration that was used pre OpenSSL 1.1.0.<br>
<br>
> Still, I was not able to get that far yet and was wondering how you<br>
> proceeded regarding this issue? Apart from some github issues and the likes<br>
> regarding EBCDIC patches I was unable to find much advice on how to<br>
> configure the build and how to tackle common issues. One config target for<br>
> zOS OS390 was created a while back but then removed again from OpenSSL<br>
> 1.1.1. With my config target I made it to the compile step but still face<br>
> build issues. Reaching a complete build like Wendell Nichols would already<br>
> by a great step.<br>
<br>
Regarding z/OS, the build environment is usually the hard part:<br>
We build from EBCDIC sources (gunzip the tar file, use pax to extract<br>
from tar) using xplink linkage, 64 bit and a perl version that works<br>
with EBCDIC.<br>
<br>
Relevant parts from the config files that we are using:<br>
<br>
10-main.conf<br>
--------<br>
      "OS390-Unix" => {<br>
          inherit_from     => [ "BASE_unix", asm("zos_asm") ],<br>
          cc               => "./tools/c99.sh",<br>
          cflags           => "-O -Wc,dll,XPLINK,exportall,hgpr,lp64 <br>
-Wa,'GOFF,SYSPARM(USE_XPLINK)' -qlongname -qlanglvl=extc99 -DB_ENDIAN <br>
-DCHARSET_EBCDIC -DNO_SYS_PARAM_H -D_ALL_SOURCE -D_OPEN_THREADS=2 <br>
-D_POSIX_SOURCE  -D_OPEN_MSGQ_EXT",<br>
          module_ldflags   => "-Wl,XPLINK,LP64",<br>
          shared_ldflags   => "-Wl,dll,XPLINK,LP64",<br>
          bn_ops           => "THIRTY_TWO_BIT RC4_CHAR",<br>
          thread_scheme    => "(unknown)",<br>
          perlasm_scheme   => "zOS64",<br>
      },<br>
--------<br>
<br>
00-base-templates.conf<br>
--------<br>
# Either comment out all the asm below, or use a no-asm build.<br>
     zos_asm => {<br>
         template        => 1,<br>
         cpuid_asm_src   => "s390xcap.c s390xcpuid.s",<br>
         bn_asm_src      => "bn_asm.c", # s390x-gf2m.s",<br>
         ec_asm_src      => "ecp_s390x_nistp.c",<br>
         aes_asm_src     => "aes-s390x.s aes-ctr.fake aes-xts.fake",<br>
         sha1_asm_src    => "sha1-s390x.s sha256-s390x.s sha512-s390x.s",<br>
         rc4_asm_src     => "rc4-s390x.s",<br>
         modes_asm_src   => "ghash-s390x.s",<br>
#       chacha_asm_src  => "chacha-s390x.s",<br>
#       poly1305_asm_src => "poly1305-s390x.s",<br>
         keccak1600_asm_src      => "keccak1600-s390x.s",<br>
--------<br>
<br>
tools/c99.sh<br>
--------<br>
#!/bin/sh -k<br>
#<br>
# Re-order arguments so that -L comes first<br>
#<br>
opts=""<br>
lopts=""<br>
<br>
for arg in $* ; do<br>
   case $arg in<br>
     -L*) lopts="$lopts $arg" ;;<br>
     *) opts="$opts $arg" ;;<br>
   esac<br>
done<br>
<br>
c99 -Wl,dll $lopts $opts<br>
--------<br>
<br>
<br>
> Are any of you aware of zOS specific OpenSSL development branches that I<br>
> have yet to find? Or is this mainly done in private repositories/branches<br>
> and not offered for PRs to the OpenSSL repository?<br>
<br>
We are working on porting OpenSSL for z/OS internally right now and will<br>
share the work in progress (via a PR to the OpenSSL repo) as soon as it<br>
makes sense, probably in the near future.<br>
<br>
Best,<br>
Patrick<br>
</blockquote></div>