-
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
OpenSSL 1.1.0 compatibility #2000
Conversation
src/rdkafka_transport.c
Outdated
@@ -503,6 +507,13 @@ void rd_kafka_transport_ssl_init (void) { | |||
SSL_load_error_strings(); | |||
SSL_library_init(); | |||
OpenSSL_add_all_algorithms(); | |||
#else | |||
#ifdef HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK | |||
CRYPTO_THREADID_set_callback(rd_kafka_transport_ssl_threadid_cb); |
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.
Can't find if this is actually needed on OpenSSL >=1.1.0, but other projects seem to not use it on that version, so maybe it should be moved to the < 1.1.0 block?
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.
True. I moved it to the < 1.1.0 block.
src/rdkafka_transport.c
Outdated
#ifdef HAVE_OPENSSL_CRYPTO_THREADID_SET_CALLBACK | ||
CRYPTO_THREADID_set_callback(rd_kafka_transport_ssl_threadid_cb); | ||
#endif | ||
OPENSSL_init_ssl(0, NULL); |
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.
This isn't needed according to docs:
https://www.openssl.org/docs/man1.1.0/ssl/OPENSSL_init_ssl.html
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.
I removed it.
Changes to be able to build librdkafka with OpenSSL 1.1.0