The standard Stratus VOS build ("vos-gcc" in Configure) uses the
--with-zlib-lib and --with-zlib-include control arguments to Configure.
We link openssl with a static copy of zlib which we have just built a
few seconds earlier.
Sadly, the existing build process does not pass the ZLIB_INCLUDE
makefile variable down to the Makefile that needs it
(openssl/crypto/Makefile), which leads to compilation errors when
crypto/comp/c_zlib.c is built. Nor does it set up the linker flags so
that the directory in which libz.a resides is searched.
I believe this is a generic problem for any platform that wishes to
statically link against libz.a. I don't see how the --with-zlib-include
or --with-zlib-lib control arguments could possibly work without this
patch. Perhaps I'm the only person still using these arguments.
Perhaps everyone else is building against a dynamically-linked copy of
zlib (or not bothering to use zlib at all...).
This patch also contains a VOS-specific addition to
crypto/rand/rand_unix.c; I have added a section of code that initializes
the PRNG on VOS using a method somewhat similar to the one used by
OpenBSD. I have added code to explicitly re-seed the random function if
this is its first use in the process. Unfortunately, VOS does not have a
/dev/random device, and the typical EGD script is too Unix-specific to
be of any use. I welcome comments or suggestions on ways to improve this
code.
I have tested this patch on a Stratus VOS system running OpenVOS Release
17.0.1, and on a SuSE Linux system. I have been using these changes for
quite some time to get the OpenSSL build to work properly for us. This
seems like an opportune moment to submit it. I apologize for not
submitting it sooner.
The patch applies cleanly against openssl-1.0.0-beta1.
Files changed:
./Configure -- Search for libz.a in the directory specified by
--with-zlib-lib, if given.
./Makefile.org -- Pass the value of ZLIB_INCLUDE and LIBZLIB to
sub-make files. This is needed to implement --with-zlib-include. LIBZLIB
isn't presently used by any sub-make files, but it just seemed sensible
to pass it along.
crypto/Makefile -- Search for headers in the ZLIB_INCLUDE
directory. Needed to implement --with-zlib-include.
crypto/rand/rand_unix.c -- VOS-specific code to initialize
OpenSSL's PRNG.
<<openssl-100b1.vos.diff>>
Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610; Mobile: +1 (978) 235-2451;
AIM: PaulGreen
Title: Patch for OpenSSL 1.0.0-beta1 to fix --with-zlib-include and --with-zlib-lib and init the PRNG on VOS.
The standard Stratus VOS build ("vos-gcc" in Configure) uses the --with-zlib-lib and --with-zlib-include control arguments to Configure. We link openssl with a static copy of zlib which we have just built a few seconds earlier.
Sadly, the existing build process does not pass the ZLIB_INCLUDE makefile variable down to the Makefile that needs it (openssl/crypto/Makefile), which leads to compilation errors when crypto/comp/c_zlib.c is built. Nor does it set up the linker flags so that the directory in which libz.a resides is searched.
I believe this is a generic problem for any platform that wishes to statically link against libz.a. I don't see how the --with-zlib-include or --with-zlib-lib control arguments could possibly work without this patch. Perhaps I'm the only person still using these arguments. Perhaps everyone else is building against a dynamically-linked copy of zlib (or not bothering to use zlib at all…).
This patch also contains a VOS-specific addition to crypto/rand/rand_unix.c; I have added a section of code that initializes the PRNG on VOS using a method somewhat similar to the one used by OpenBSD. I have added code to explicitly re-seed the random function if this is its first use in the process. Unfortunately, VOS does not have a /dev/random device, and the typical EGD script is too Unix-specific to be of any use. I welcome comments or suggestions on ways to improve this code.
I have tested this patch on a Stratus VOS system running OpenVOS Release 17.0.1, and on a SuSE Linux system. I have been using these changes for quite some time to get the OpenSSL build to work properly for us. This seems like an opportune moment to submit it. I apologize for not submitting it sooner.
The patch applies cleanly against openssl-1.0.0-beta1.
Files changed:
./Configure -- Search for libz.a in the directory specified by --with-zlib-lib, if given.
./Makefile.org -- Pass the value of ZLIB_INCLUDE and LIBZLIB to sub-make files. This is needed to implement --with-zlib-include. LIBZLIB isn't presently used by any sub-make files, but it just seemed sensible to pass it along.
crypto/Makefile -- Search for headers in the ZLIB_INCLUDE directory. Needed to implement --with-zlib-include.
crypto/rand/rand_unix.c -- VOS-specific code to initialize OpenSSL's PRNG.
<<openssl-100b1.vos.diff>>
Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610; Mobile: +1 (978) 235-2451; AIM: PaulGreen
openssl-100b1.vos.diff
Description: Binary data
