1e1051a39Sopenharmony_ciNOTES FOR THE HPE NONSTOP PLATFORM 2e1051a39Sopenharmony_ci============================== 3e1051a39Sopenharmony_ci 4e1051a39Sopenharmony_ciRequirement details 5e1051a39Sopenharmony_ci------------------- 6e1051a39Sopenharmony_ci 7e1051a39Sopenharmony_ciIn addition to the requirements and instructions listed 8e1051a39Sopenharmony_ciin [INSTALL.md](INSTALL.md), the following are required as well: 9e1051a39Sopenharmony_ci 10e1051a39Sopenharmony_ci * The TNS/X platform supports hardware randomization. 11e1051a39Sopenharmony_ci Specify the `--with-rand-seed=rdcpu` option to the `./Configure` script. 12e1051a39Sopenharmony_ci This is recommended but not required. `egd` is supported at 3.0 but cannot 13e1051a39Sopenharmony_ci be used if FIPS is selected. 14e1051a39Sopenharmony_ci * The TNS/E platform does not support hardware randomization, so 15e1051a39Sopenharmony_ci specify the `--with-rand-seed=egd` option to the `./Configure` script. 16e1051a39Sopenharmony_ci 17e1051a39Sopenharmony_ciAbout c99 compiler 18e1051a39Sopenharmony_ci------------------ 19e1051a39Sopenharmony_ci 20e1051a39Sopenharmony_ciThe c99 compiler is required for building OpenSSL from source. While c11 21e1051a39Sopenharmony_cimay work, it has not been broadly tested. c99 is the only compiler 22e1051a39Sopenharmony_ciprerequisite needed to build OpenSSL 3.0 on this platform. You should also 23e1051a39Sopenharmony_cihave the FLOSS package installed on your system. The ITUGLIB FLOSS package 24e1051a39Sopenharmony_ciis the only FLOSS variant that has been broadly tested. 25e1051a39Sopenharmony_ci 26e1051a39Sopenharmony_ciThreading Models 27e1051a39Sopenharmony_ci---------------- 28e1051a39Sopenharmony_ci 29e1051a39Sopenharmony_ciOpenSSL can be built using unthreaded, POSIX User Threads (PUT), or Standard 30e1051a39Sopenharmony_ciPOSIX Threads (SPT). Select the following build configuration for each on 31e1051a39Sopenharmony_cithe TNS/X (L-Series) platform: 32e1051a39Sopenharmony_ci 33e1051a39Sopenharmony_ci * `nonstop-nsx` or default will select an unthreaded build. 34e1051a39Sopenharmony_ci * `nonstop-nsx_put` selects the PUT build. 35e1051a39Sopenharmony_ci * `nonstop-nsx_64_put` selects the 64 bit file length PUT build. 36e1051a39Sopenharmony_ci * `nonstop-nsx_spt_floss` selects the SPT build with FLOSS. FLOSS is 37e1051a39Sopenharmony_ci required for SPT builds because of a known hang when using SPT on its own. 38e1051a39Sopenharmony_ci 39e1051a39Sopenharmony_ci### TNS/E Considerations 40e1051a39Sopenharmony_ci 41e1051a39Sopenharmony_ciThe TNS/E platform is build using the same set of builds specifying `nse` 42e1051a39Sopenharmony_ciinstead of `nsx` in the set above. 43e1051a39Sopenharmony_ci 44e1051a39Sopenharmony_ciYou cannot build for TNS/E for FIPS, so you must specify the `no-fips` 45e1051a39Sopenharmony_cioption to `./Configure`. 46e1051a39Sopenharmony_ci 47e1051a39Sopenharmony_ciLinking and Loading Considerations 48e1051a39Sopenharmony_ci---------------------------------- 49e1051a39Sopenharmony_ci 50e1051a39Sopenharmony_ciBecause of how the NonStop Common Runtime Environment (CRE) works, there are 51e1051a39Sopenharmony_cirestrictions on how programs can link and load with OpenSSL libraries. 52e1051a39Sopenharmony_ciOn current NonStop platforms, programs cannot both statically link OpenSSL 53e1051a39Sopenharmony_cilibraries and dynamically load OpenSSL shared libraries concurrently. If this 54e1051a39Sopenharmony_ciis done, there is a high probability of encountering a SIGSEGV condition 55e1051a39Sopenharmony_cirelating to `atexit()` processing when a shared library is unloaded and when 56e1051a39Sopenharmony_cithe program terminates. This limitation applies to all OpenSSL shared library 57e1051a39Sopenharmony_cicomponents. 58e1051a39Sopenharmony_ci 59e1051a39Sopenharmony_ciA resolution to this situation is under investigation. 60e1051a39Sopenharmony_ci 61e1051a39Sopenharmony_ciAbout Prefix and OpenSSLDir 62e1051a39Sopenharmony_ci--------------------------- 63e1051a39Sopenharmony_ci 64e1051a39Sopenharmony_ciBecause there are many potential builds that must co-exist on any given 65e1051a39Sopenharmony_ciNonStop node, managing the location of your build distribution is crucial. 66e1051a39Sopenharmony_ciKeep each destination separate and distinct. Mixing any mode described in 67e1051a39Sopenharmony_cithis document can cause application instability. The recommended approach 68e1051a39Sopenharmony_ciis to specify the OpenSSL version and threading model in your configuration 69e1051a39Sopenharmony_cioptions, and keeping your memory and float options consistent, for example: 70e1051a39Sopenharmony_ci 71e1051a39Sopenharmony_ci * For 1.1 `--prefix=/usr/local-ssl1.1 --openssldir=/usr/local-ssl1.1/ssl` 72e1051a39Sopenharmony_ci * For 1.1 PUT `--prefix=/usr/local-ssl1.1_put --openssldir=/usr/local-ssl1.1_put/ssl` 73e1051a39Sopenharmony_ci 74e1051a39Sopenharmony_ciAs of 3.0, the NonStop configurations use the multilib attribute to distinguish 75e1051a39Sopenharmony_cibetween different models: 76e1051a39Sopenharmony_ci 77e1051a39Sopenharmony_ci * For 3.0 `--prefix=/usr/local-ssl3.0 --openssldir=/usr/local-ssl3.0/ssl` 78e1051a39Sopenharmony_ci 79e1051a39Sopenharmony_ciThe PUT model is placed in `${prefix}/lib-put` for 32-bit models and 80e1051a39Sopenharmony_ci`${prefix}/lib64-put` for 64-bit models. 81e1051a39Sopenharmony_ci 82e1051a39Sopenharmony_ciUse the `_RLD_LIB_PATH` environment variable in OSS to select the appropriate 83e1051a39Sopenharmony_cidirectory containing `libcrypto.so` and `libssl.so`. In GUARDIAN, use the 84e1051a39Sopenharmony_ci`=_RLD_LIB_PATH` search define to locate the GUARDIAN subvolume where OpenSSL 85e1051a39Sopenharmony_ciis installed. 86e1051a39Sopenharmony_ci 87e1051a39Sopenharmony_ciFloat Considerations 88e1051a39Sopenharmony_ci-------------------- 89e1051a39Sopenharmony_ci 90e1051a39Sopenharmony_ciOpenSSL is built using IEEE Float mode by default. If you need a different 91e1051a39Sopenharmony_ciIEEE mode, create a new configuration specifying `tfloat-x86-64` (for Tandem 92e1051a39Sopenharmony_ciFloat) or `nfloat-x86-64` (for Neutral Float). 93e1051a39Sopenharmony_ci 94e1051a39Sopenharmony_ciMemory Models 95e1051a39Sopenharmony_ci------------- 96e1051a39Sopenharmony_ci 97e1051a39Sopenharmony_ciThe current OpenSSL default memory model uses the default platform address 98e1051a39Sopenharmony_cimodel. If you need a different address model, you must specify the appropriate 99e1051a39Sopenharmony_cic99 options for compile (`CFLAGS`) and linkers (`LDFLAGS`). 100e1051a39Sopenharmony_ci 101e1051a39Sopenharmony_ciCross Compiling on Windows 102e1051a39Sopenharmony_ci-------------------------- 103e1051a39Sopenharmony_ci 104e1051a39Sopenharmony_ciTo configure and compile OpenSSL, you will need to set up a Cygwin environment. 105e1051a39Sopenharmony_ciThe Cygwin tools should include bash, make, and any other normal tools required 106e1051a39Sopenharmony_cifor building programs. 107e1051a39Sopenharmony_ci 108e1051a39Sopenharmony_ciYour `PATH` must include the bin directory for the c99 cross-compiler, as in: 109e1051a39Sopenharmony_ci 110e1051a39Sopenharmony_ci export PATH=/cygdrive/c/Program\ Files\ \(x86\)/HPE\ NonStop/L16.05/usr/bin:$PATH 111e1051a39Sopenharmony_ci 112e1051a39Sopenharmony_ciThis should be set before Configure is run. For the c99 cross-compiler to work 113e1051a39Sopenharmony_cicorrectly, you also need the `COMP_ROOT` set, as in: 114e1051a39Sopenharmony_ci 115e1051a39Sopenharmony_ci export COMP_ROOT="C:\Program Files (x86)\HPE NonStop\L16.05" 116e1051a39Sopenharmony_ci 117e1051a39Sopenharmony_ci`COMP_ROOT` needs to be in Windows form. 118e1051a39Sopenharmony_ci 119e1051a39Sopenharmony_ci`Configure` must specify the `no-makedepend` option otherwise errors will 120e1051a39Sopenharmony_ciresult when running the build because the c99 cross-compiler does not support 121e1051a39Sopenharmony_cithe `gcc -MT` option. An example of a `Configure` command to be run from the 122e1051a39Sopenharmony_ciOpenSSL directory is: 123e1051a39Sopenharmony_ci 124e1051a39Sopenharmony_ci ./Configure nonstop-nsx_64 no-makedepend --with-rand-seed=rdcpu 125e1051a39Sopenharmony_ci 126e1051a39Sopenharmony_ciDo not forget to include any OpenSSL cross-compiling prefix and certificate 127e1051a39Sopenharmony_cioptions when creating your libraries. 128e1051a39Sopenharmony_ci 129e1051a39Sopenharmony_ciThe OpenSSL test suite will not run on your workstation. In order to verify the 130e1051a39Sopenharmony_cibuild, you will need to perform the build and test steps in OSS in your NonStop 131e1051a39Sopenharmony_ciserver. You can also build under gcc and run the test suite for Windows but that 132e1051a39Sopenharmony_ciis not equivalent. 133e1051a39Sopenharmony_ci 134e1051a39Sopenharmony_ci**Note:** In the event that you are attempting a FIPS-compliant cross-compile, 135e1051a39Sopenharmony_cibe aware that signatures may not match between builds done under OSS and under 136e1051a39Sopenharmony_cicross-compiles as the compilers do not necessarily generate identical objects. 137e1051a39Sopenharmony_ciAnything and everything to do with FIPS is outside the scope of this document. 138e1051a39Sopenharmony_ciRefer to the FIPS security policy for more information. 139e1051a39Sopenharmony_ci 140e1051a39Sopenharmony_ciThe following build configurations have been successfully attempted at one 141e1051a39Sopenharmony_cipoint or another. If you are successful in your cross-compile efforts, please 142e1051a39Sopenharmony_ciupdate this list: 143e1051a39Sopenharmony_ci 144e1051a39Sopenharmony_ci- nonstop-nsx_64 145e1051a39Sopenharmony_ci- nonstop-nsx_64_put 146e1051a39Sopenharmony_ci 147e1051a39Sopenharmony_ci**Note:** Cross-compile builds for TNS/E have not been attempted, but should 148e1051a39Sopenharmony_cifollow the same considerations as for TNS/X above. SPT builds generally require 149e1051a39Sopenharmony_ciFLOSS, which is not available for workstation builds. As a result, SPT builds 150e1051a39Sopenharmony_ciof OpenSSL cannot be cross-compiled. 151e1051a39Sopenharmony_ci 152e1051a39Sopenharmony_ciAlso see the NSDEE discussion below for more historical information. 153e1051a39Sopenharmony_ci 154e1051a39Sopenharmony_ciCross Compiling with NSDEE 155e1051a39Sopenharmony_ci-------------------------- 156e1051a39Sopenharmony_ci 157e1051a39Sopenharmony_ci**Note:** None of these builds have been tested by the platform maintainer and 158e1051a39Sopenharmony_ciare supplied for historical value. Please submit a Pull Request to OpenSSL 159e1051a39Sopenharmony_cishould these need to be adjusted. 160e1051a39Sopenharmony_ci 161e1051a39Sopenharmony_ciIf you are attempting to build OpenSSL with NSDEE, you will need to specify 162e1051a39Sopenharmony_cithe following variables. The following set of compiler defines are required: 163e1051a39Sopenharmony_ci 164e1051a39Sopenharmony_ci # COMP_ROOT must be a full path for the build system (e.g. windows) 165e1051a39Sopenharmony_ci COMP_ROOT=$(cygpath -w /path/to/comp_root) 166e1051a39Sopenharmony_ci # CC must be executable by your shell 167e1051a39Sopenharmony_ci CC=/path/to/c99 168e1051a39Sopenharmony_ci 169e1051a39Sopenharmony_ci### Optional Build Variables 170e1051a39Sopenharmony_ci 171e1051a39Sopenharmony_ci DBGFLAG="--debug" 172e1051a39Sopenharmony_ci CIPHENABLES="enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-rc4" 173e1051a39Sopenharmony_ci 174e1051a39Sopenharmony_ci### Internal Known TNS/X to TNS/E Cross Compile Variables 175e1051a39Sopenharmony_ci 176e1051a39Sopenharmony_ciThe following definition is required if you are building on TNS/X for TNS/E 177e1051a39Sopenharmony_ciand have access to a TNS/E machine on your EXPAND network - with an example 178e1051a39Sopenharmony_cinode named `\CS3`: 179e1051a39Sopenharmony_ci 180e1051a39Sopenharmony_ci SYSTEMLIBS="-L/E/cs3/usr/local/lib" 181e1051a39Sopenharmony_ci 182e1051a39Sopenharmony_ciVersion Procedure (VPROC) Considerations 183e1051a39Sopenharmony_ci---------------------------------------- 184e1051a39Sopenharmony_ci 185e1051a39Sopenharmony_ciIf you require a VPROC entry for platform version identification, use the 186e1051a39Sopenharmony_cifollowing variables: 187e1051a39Sopenharmony_ci 188e1051a39Sopenharmony_ci### For Itanium 189e1051a39Sopenharmony_ci 190e1051a39Sopenharmony_ci OPENSSL_VPROC_PREFIX=T0085H06 191e1051a39Sopenharmony_ci 192e1051a39Sopenharmony_ci### For x86 193e1051a39Sopenharmony_ci 194e1051a39Sopenharmony_ci OPENSSL_VPROC_PREFIX=T0085L01 195e1051a39Sopenharmony_ci 196e1051a39Sopenharmony_ci### Common Definition 197e1051a39Sopenharmony_ci 198e1051a39Sopenharmony_ci export OPENSSL_VPROC=${OPENSSL_VPROC_PREFIX}_$( 199e1051a39Sopenharmony_ci . VERSION.dat 200e1051a39Sopenharmony_ci if [ -n "$PRE_RELEASE_TAG" ]; then 201e1051a39Sopenharmony_ci PRE_RELEASE_TAG="-$PRE_RELEASE_TAG" 202e1051a39Sopenharmony_ci fi 203e1051a39Sopenharmony_ci if [ -n "$BUILD_METADATA" ]; then 204e1051a39Sopenharmony_ci BUILD_METADATA="+$BUILD_METADATA" 205e1051a39Sopenharmony_ci fi 206e1051a39Sopenharmony_ci echo "$MAJOR.$MINOR.$PATCH$PRE_RELEASE_TAG$BUILD_METADATA" |\ 207e1051a39Sopenharmony_ci sed -e 's/[-.+]/_/g' 208e1051a39Sopenharmony_ci ) 209e1051a39Sopenharmony_ci 210e1051a39Sopenharmony_ciExample Configure Targets 211e1051a39Sopenharmony_ci------------------------- 212e1051a39Sopenharmony_ci 213e1051a39Sopenharmony_ciFor OSS targets, the main DLL names will be `libssl.so` and `libcrypto.so`. 214e1051a39Sopenharmony_ciFor GUARDIAN targets, DLL names will be `ssl` and `crypto`. The following 215e1051a39Sopenharmony_ciassumes that your PWD is set according to your installation standards. 216e1051a39Sopenharmony_ci 217e1051a39Sopenharmony_ci ./Configure nonstop-nsx --prefix=${PWD} \ 218e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl no-threads \ 219e1051a39Sopenharmony_ci --with-rand-seed=rdcpu ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 220e1051a39Sopenharmony_ci ./Configure nonstop-nsx_g --prefix=${PWD} \ 221e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl no-threads \ 222e1051a39Sopenharmony_ci --with-rand-seed=rdcpu ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 223e1051a39Sopenharmony_ci ./Configure nonstop-nsx_put --prefix=${PWD} \ 224e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl threads "-D_REENTRANT" \ 225e1051a39Sopenharmony_ci --with-rand-seed=rdcpu ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 226e1051a39Sopenharmony_ci ./Configure nonstop-nsx_spt_floss --prefix=${PWD} \ 227e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl threads "-D_REENTRANT" \ 228e1051a39Sopenharmony_ci --with-rand-seed=rdcpu ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 229e1051a39Sopenharmony_ci ./Configure nonstop-nsx_64 --prefix=${PWD} \ 230e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl no-threads \ 231e1051a39Sopenharmony_ci --with-rand-seed=rdcpu ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 232e1051a39Sopenharmony_ci ./Configure nonstop-nsx_64_put --prefix=${PWD} \ 233e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl threads "-D_REENTRANT" \ 234e1051a39Sopenharmony_ci --with-rand-seed=rdcpu ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 235e1051a39Sopenharmony_ci ./Configure nonstop-nsx_g_tandem --prefix=${PWD} \ 236e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl no-threads \ 237e1051a39Sopenharmony_ci --with-rand-seed=rdcpu ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 238e1051a39Sopenharmony_ci 239e1051a39Sopenharmony_ci ./Configure nonstop-nse --prefix=${PWD} \ 240e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl no-threads \ 241e1051a39Sopenharmony_ci --with-rand-seed=egd ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 242e1051a39Sopenharmony_ci ./Configure nonstop-nse_g --prefix=${PWD} \ 243e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl no-threads \ 244e1051a39Sopenharmony_ci --with-rand-seed=egd ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 245e1051a39Sopenharmony_ci ./Configure nonstop-nse_put --prefix=${PWD} \ 246e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl threads "-D_REENTRANT" \ 247e1051a39Sopenharmony_ci --with-rand-seed=egd ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 248e1051a39Sopenharmony_ci ./Configure nonstop-nse_spt_floss --prefix=${PWD} \ 249e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl threads "-D_REENTRANT" \ 250e1051a39Sopenharmony_ci --with-rand-seed=egd ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 251e1051a39Sopenharmony_ci ./Configure nonstop-nse_64 --prefix=${PWD} \ 252e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl no-threads \ 253e1051a39Sopenharmony_ci --with-rand-seed=egd ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 254e1051a39Sopenharmony_ci ./Configure nonstop-nse_64_put --prefix=${PWD} \ 255e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl threads "-D_REENTRANT" 256e1051a39Sopenharmony_ci --with-rand-seed=egd ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 257e1051a39Sopenharmony_ci ./Configure nonstop-nse_g_tandem --prefix=${PWD} \ 258e1051a39Sopenharmony_ci --openssldir=${PWD}/ssl no-threads \ 259e1051a39Sopenharmony_ci --with-rand-seed=egd ${CIPHENABLES} ${DBGFLAG} ${SYSTEMLIBS} 260