From 0eea1cf72fde6668c1addc8e9e685083db9cf3d6 Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Tue, 7 Oct 2025 00:02:42 +0100 Subject: [PATCH] Fixes for NonStop builds on 3.5 to handle OS platform header file changes. This changes handles the introduction of _POSIX_VERSION into the NonStop x86 header files that tricks OpenSSL into thinking that ucontext.h is available. Fixes #28498 Signed-off-by: Randall S. Becker --- Configurations/50-nonstop.conf | 2 ++ NOTES-NONSTOP.md | 12 ++++++++++-- crypto/async/arch/async_posix.h | 9 +++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Configurations/50-nonstop.conf b/Configurations/50-nonstop.conf index a68f200856..24ab6009fc 100644 --- a/Configurations/50-nonstop.conf +++ b/Configurations/50-nonstop.conf @@ -168,6 +168,7 @@ # Build models 'nonstop-model-put' => { template => 1, + disable => ['secure-memory'], defines => ['_PUT_MODEL_', '_REENTRANT', '_THREAD_SUPPORT_FUNCTIONS'], ex_libs => '-lput', @@ -177,6 +178,7 @@ # Build models 'nonstop-model-klt' => { template => 1, + disable => ['secure-memory'], defines => ['_KLT_MODEL_', '_REENTRANT', '_THREAD_SUPPORT_FUNCTIONS'], ex_libs => '-lklt', diff --git a/NOTES-NONSTOP.md b/NOTES-NONSTOP.md index 30deed20b8..a2d485132d 100644 --- a/NOTES-NONSTOP.md +++ b/NOTES-NONSTOP.md @@ -37,8 +37,7 @@ for each on the TNS/X (L-Series) platform: The KLT threading model is a newly released model on NonStop. It implements kernel-level threading. KLT provides much closer threading to what OpenSSL uses for Linux-like threading models. KLT continues to use the pthread library -API. There is no supported 32-bit or Guardian builds for KLT. Note: KLT is -not currently available but is planned for post-2024. +API. There is no supported 32-bit or Guardian builds for KLT. The SPT threading model is no longer supported as of OpenSSL 3.2. @@ -53,6 +52,9 @@ instead of `nsx` in the set above. You cannot build for TNS/E for FIPS, so you must specify the `no-fips` option to `./Configure`. +TNS/E has moved to a limited support state, so fixes for this platform will not +be guaranteed in future. + Linking and Loading Considerations ---------------------------------- @@ -73,6 +75,12 @@ for NonStop builds. If you need to have `atexit()` functionality, set register `OPENSSL_cleanup()` automatically. Preferably, you can explicitly call `OPENSSL_cleanup()` from your application. +Secure Memory +------------- + +The mechanism used by OpenSSL for secure memory is not supported on NonStop. +Use the `no-secure-memory` option when running `Configure`. + About Prefix and OpenSSLDir --------------------------- diff --git a/crypto/async/arch/async_posix.h b/crypto/async/arch/async_posix.h index ceb86e24bf..6dec71d6ec 100644 --- a/crypto/async/arch/async_posix.h +++ b/crypto/async/arch/async_posix.h @@ -13,7 +13,8 @@ #if defined(OPENSSL_SYS_UNIX) \ && defined(OPENSSL_THREADS) && !defined(OPENSSL_NO_ASYNC) \ - && !defined(__ANDROID__) && !defined(__OpenBSD__) + && !defined(__ANDROID__) && !defined(__OpenBSD__) \ + && !defined(OPENSSL_SYS_TANDEM) # include @@ -48,7 +49,11 @@ */ # define USE_SWAPCONTEXT # endif -# include +# if defined (OPENSSL_SYS_TANDEM) +# include +# else +# include +# endif # ifndef USE_SWAPCONTEXT # include # endif