-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
ssl: support libssls with no ENGINE implementation #3535
Conversation
Please rebase this on latest master, and verify that it builds correctly with LibreSSL. Thanks! |
acc2e6a
to
654a614
Compare
While rebasing on master, I also refactored the changes to The following table lists the result of the
SKIPPED indicates that the test was skipped with the reason Note that the test isn't skipped on LibreSSL any more - LibreSSL 3.3 does contain an ENGINE component, and it should probably be used if enabled (e.g. so it can make use of AES-NI). |
Some style-fixes still needed (run |
db52fdd
to
7e52104
Compare
Unfortunately it seems that clang-format bounces between
and
as recommendations - using one always causes it to suggest the other. There's no way that's not a bug in clang-format, but I'll just reword that string so it fits on a single line. |
63f072d
to
f1be66d
Compare
Tried to get clever by using a string that was unambiguously over the 80-column limit, but clang-format wasn't having any of that either. Reverted to a shorter, single-line message and it looks like we're there now. Sorry for all the noise! |
Thanks for all your work on this @chrisnovakovic! We're a bit too close to the 1.9.0 release to merge this, but we'll make sure to include it in a 1.9.1 release (scheduled for June). |
f1be66d
to
06d67ca
Compare
Rebased on master and edited to account for the changes made to accommodate OpenSSL 3.0 - #4026 defines |
We need this change as well in order to build librdkafka. |
@emasab this seems like a small change that was intended to land a while back based on the comment in - #3535 (comment) Not having this is causing some compile failures when trying to use https://github.com/Blizzard/node-rdkafka on some newer Linux distros that define OPENSSL_NO_ENGINE |
@chrisnovakovic , the changelog should be updated to the latest release. Could you help update it? |
I've created #4852 to not include the change log. We should add it when making sure it will be merged. |
I'll rebase this shortly. Sorry for the delay. |
06d67ca
to
4ebb15a
Compare
🎉 All Contributor License Agreements have been signed. Ready to merge. |
Rebased on master. Based on f55f3ec, I'm assuming v2.6.0 is the next release, so that's the version I credited the changes to in the changelog - happy to modify it again if that's incorrect. |
any update? |
@emasab I've seen you landing PR's recently so I thought I'd see if you thought there was any chance this one would make it to the top of the priority list any time soon? |
Hey everyone thanks for the input and the PR, we will take a look and aim to have it in our upcoming 2.7.0 release |
@chrisnovakovic Thanks a lot for the PR and sorry for the long wait. It looks good, could you just add |
Good call. I'll rebase and update in a moment. |
327de39
to
2070604
Compare
Also updated the commit message and the changelog line in the latest commit. |
/sem-approve |
2070604
to
5f4ff59
Compare
An incorrect assumption is made that libssl is built with support for the (now-deprecated) ENGINE API if it is provided by OpenSSL >= 1.1.0 or LibreSSL. OPENSSL_NO_ENGINE is defined by OpenSSL and all of its forks if the ENGINE API was disabled at compile-time - ensure that the definition of OPENSSL_NO_ENGINE is taken into account when using ENGINE features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks @chrisnovakovic @remicollet ! As our policy expects a second review for external contributors, I'm asking for it from my team.
How to test: # 1) in mklove/modules/configure.libssl add "no-deprecated no-engine" at line 98
# mklove has a problem as inherits CFLAGS for building the dependencies too
# but OpenSSL has a warning about floating point comparison so cannot be built with -Werror
# so we need to unset CFLAGS if they include some flag that is not compatible
# with the dependencies.
unset CFLAGS
make distclean
./configure --install-deps --source-deps-only --enable-static --disable-lz4-ext --enable-strip
# run make with -Werror
export CFLAGS="-Werror"
# make will work with OPENSSL_NO_ENGINE
make
. tests/_venv/bin/activate
# run SSL tests
(cd tests && python3 -m trivup.clusters.KafkaCluster --version 3.4.0 --ssl --cmd 'TESTS=0133,0097 make')
# now checkout current version
git checkout master
# make will fail with OPENSSL_NO_ENGINE
make |
/sem-approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!. Thanks.
OpenSSL can be built without ENGINE support, and some libssl-compatible forks (e.g. BoringSSL) don't contain any ENGINE implementation at all - guard all references to the ENGINE API using
OPENSSL_NO_ENGINE
so these libssls can be used with librdkafka.