Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically link to local OpenSSL version #500

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

QAQJ
Copy link
Contributor

@QAQJ QAQJ commented May 4, 2023

Description of changes: This is an example code for dynamically linking to the OpenSSL in your OS, instead of statically link it with the downloaded version. This can be helpful if you want to make sure the KPL is FIPS compliant.

Steps to build it (using a RHEL docker image as an example):

  1. docker run -ti redhat/ubi8 /bin/bash
  2. yum install -y git make wget gcc gcc-c++ perl cmake libstdc++-static.x86_64 libuuid-devel.x86_64 maven java-11-openjdk-devel.x86_64
  3. [Optional] For my docker image, there was no pre-installed OpenSSL, so I have to download one to reproduce the customer scenario: yum install openssl-devel
    1. In my case, the paths are
$ whereis openssl
openssl: /usr/bin/openssl /usr/include/openssl /usr/share/man/man1/openssl.1ssl.gz
  1. git clone https://github.com/awslabs/amazon-kinesis-producer.git
  2. make the code change in this PR
  3. Copy and pasted your AWS credential, since a unit test will use it
  4. build it by running ./bootstrap.sh
    1. In the output you can find an output message
-- OpenSSL include dir: /usr/include
-- OpenSSL libraries: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so
-- OpenSSL version: 1.1.1k

Which is outputted by CMAKE file, which shows that the we are using the OpenSSL version pre-installed in your OS.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant