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