Skip to content

Conversation

@SeverinLeonhardt
Copy link
Contributor

Despite what the documentation[1] says the code is not fully compatible
with OpenSSL 1.1 because it relies on compatibility wrappers behind
OPENSSL_API_COMPAT.

The OpenSSL documentation on library initialization[2] explains that
none of the startup fucntions are necessary starting with 1.1. The
changelog for "changes between 1.0.2h and 1.1.0 [25 Aug 2016]"[3]
mentions several removed shutdown functions. The removal of
CRYPTO_set_locking_callback is mentioned in a GitHub comment[4].

[1] https://docs.datastax.com/en/developer/cpp-driver/2.15/topics/building/
[2] https://wiki.openssl.org/index.php/Library_Initialization
[3] https://www.openssl.org/news/changelog.html
[4] openssl/openssl#1260 (comment)

Despite what the documentation[1] says the code is not fully compatible
with OpenSSL 1.1 because it relies on compatibility wrappers behind
OPENSSL_API_COMPAT.

The OpenSSL documentation on library initialization[2] explains that
none of the startup fucntions are necessary starting with 1.1. The
changelog for "changes between 1.0.2h and 1.1.0 [25 Aug 2016]"[3]
mentions several removed shutdown functions. The removal of
`CRYPTO_set_locking_callback` is mentioned in a GitHub comment[4].

[1] https://docs.datastax.com/en/developer/cpp-driver/2.15/topics/building/
[2] https://wiki.openssl.org/index.php/Library_Initialization
[3] https://www.openssl.org/news/changelog.html
[4] openssl/openssl#1260 (comment)
void OpenSslContextFactory::internal_init() {
CRYPTO_set_mem_functions(openssl::malloc, openssl::realloc, openssl::free);

#if OPENSSL_VERSION_NUMBER < 0x10100000L
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move these init. functions into the #ifdef block below (starting at line 629)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not. I don't think this will work for libressl.

@mpenick
Copy link
Contributor

mpenick commented Apr 2, 2020

Thanks for explanation and for fixing the issue.

@mpenick mpenick merged commit e918c7d into datastax:master Apr 2, 2020
@SeverinLeonhardt SeverinLeonhardt deleted the openssl_1.1_compat branch April 3, 2020 05:53
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.

2 participants