Skip to content

Custom OpenSSL location no longer respected in aws 1.11.x #2809

Closed
@nrgiii

Description

@nrgiii

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

  1. build a version of openssl from source that has a different major version from the openssl installed on the host.
  2. build aws-sdk-cpp
  3. 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.
  4. 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:

#2735
#1888

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

Metadata

Metadata

Assignees

Labels

CmakeCmake related submissionsbugThis issue is a bug.closing-soonThis issue will automatically close in 4 days unless further comments are made.p2This is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions