Description
Describe the bug
We build aws using our own openssl version compiled from source. In 1.9.x we pass the path to our openssl using these cmake variables and all is well: -DLibCrypto_INCLUDE_DIR, -DLibCrypto_LIBRARY, -DOPENSSL_ROOT_DIR
In 1.11.x this no longer works and cmake complains some of these variables are unused:
CMake Warning:
Manually-specified variables were not used by the project:
LibCrypto_INCLUDE_DIR
LibCrypto_LIBRARY
Then at runtime we get this abort():
s2n_init() failed: 402653268 (The libcrypto major version number seen at compile-time is different from the major version number seen at run-time)
Fatal error condition occurred in /export/moop1/users/normg/gs371/externals/aws/crt/aws-crt-cpp/crt/aws-c-io/source/s2n/s2n_tls_channel_handler.c:203: 0 && "s2n_init() failed"```
Expected Behavior
aws-sdk-cpp should fully support specifying a custom path to the openssl directory and not rely on the version installed on the host.
Current Behavior
cmake arguments specifying openssl/crypto directory are ignored. This is a regression and worked correctly in 1.9.x
LibCrypto_INCLUDE_DIR
LibCrypto_LIBRARY
Reproduction Steps
- build a version of openssl from source that has a different major version from the openssl installed on the host.
- build aws-sdk-cpp
- load the openssl /crypto libraries from CodeDeploy generated client capitilization inconsistency breaks builds for case-sensitive operating systems. #1 before loading the aws shared lib.
- call Aws::InitAPI()
Possible Solution
Restore cmake behavior in 1.9.x that allowed custom openssl/crypto library to be specified.
Additional Information/Context
Possibly related to these issues:
AWS CPP SDK version used
1.11.237
Compiler and Version used
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Operating System and version
Unbuntu 20.04