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

Issues with configure option --with-openssl=PATH #741

Open
bjosv opened this issue Mar 11, 2024 · 0 comments
Open

Issues with configure option --with-openssl=PATH #741

bjosv opened this issue Mar 11, 2024 · 0 comments

Comments

@bjosv
Copy link

bjosv commented Mar 11, 2024

When building with a specific OpenSSL installation using
./configure --with-crypto-backend=openssl --with-openssl=<path>
the given path will not be verified if it is a valid OpenSSL installation.

If the path is not valid configure will instead search and possibly find the system installed OpenSSL instead, without notifying the user.

checking what are the OpenSSL includes... -I/home/bjorn/tmp/invalid-openssl-dir/include
checking what are the OpenSSL libs... -L/home/bjorn/tmp/invalid-openssl-dir/lib -lcrypto
checking for openssl/ssl.h... yes

An additional problem exist when running configure with a correctly installed OpenSSL in an alternative path.
When the tests are built the linker is not given the RPATH to the expected OpenSSL path,
which means that the system installed OpenSSL libraries are used when the tests are run.

A CMake build does this correctly though, as in following example:

cmake -DBUILD_TESTS=ON -DOPENSSL_ROOT_DIR=/home/bjorn/tmp/openssl-1.1.1w ..

ldd ./src/lib/slot_mgr/test/slotmgrtest
	linux-vdso.so.1 (0x00007fff651d5000)
	libcrypto.so.1.1 => /home/bjorn/tmp/openssl-1.1.1w/lib/libcrypto.so.1.1 (0x00007f61cec00000)
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

No branches or pull requests

1 participant