-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support OpenSSL 1.1.1 #6738
Support OpenSSL 1.1.1 #6738
Conversation
OpenSSL 1.1.0 introduced a public API to create and populate BIO_METHOD. We now use it when available. This fixes an internal ABI breaking change introduced in OpenSSL 1.1.1 that causes a compiled program to segfault.
OpenSSL 1.1.0 introduced a public API to get/set BIO struct values. We now use it them when available. Fixes compatibility issues with OpenSSL 1.1.1
{% if LibCrypto::OPENSSL_110 %} | ||
LibCrypto.BIO_set_shutdown(bio, 1) | ||
LibCrypto.BIO_set_init(bio, 1) | ||
# bio.value.num = -1 |
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 have no idea what BIO#num
means and what we should do here. Anybody knows?
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.
It seems to come originally from 4995fb0#diff-65c7a3575f24669104f83007f62e90c6R109 if the documentation of 1.1.x says nothing about it it's fine as it is I guess.
This kind of issues makes me want to enforce more infrastructure to test compatibility with different libraries. Otherwise we in lack of sight. |
@bcardiff we'd have had to keep track of the openssl release and add it to the test infastructure. It's honestly better to be reactionary about these things to avoid wasting effort. Maybe once there's far more manpower in the project. |
tested locally |
What's really needed is a manual review of the OpenSSL integration which dates back to the old OpenSSL 0.9.8. See what public API they provide now, but was kinda internal/private. For example the changes here were already present in OpenSSL 1.1.0, and would have avoided the reported segfault. But that requires having an active maintainer... |
* OpenSSL: use public API to create BIO_METHOD when available OpenSSL 1.1.0 introduced a public API to create and populate BIO_METHOD. We now use it when available. This fixes an internal ABI breaking change introduced in OpenSSL 1.1.1 that causes a compiled program to segfault. * OpenSSL: use public API to init BIO when available OpenSSL 1.1.0 introduced a public API to get/set BIO struct values. We now use it them when available. Fixes compatibility issues with OpenSSL 1.1.1 * Fix: broken OpenSSL::SSL::Context specs with OpenSSL 1.1.1 * Implement BIO read/write methods for OpenSSL 1.1.1
OpenSSL 1.1.0 introduced a public API to create and populate the BIO and BIO_METHOD structs. We now use it when available. We still keep the manual creation for OpenSSL 1.0.2 (and below) which is still supported.
This fixes an internal ABI breaking change introduced in OpenSSL 1.1.1 that causes a compiled program to segfault. See #6737.
This also implements the new BIO read/write methods that take
size_t
lengths instead ofint
. This skips the compatibility methods provided by OpenSSL.NOTE: the patch also starts to use uppercased external symbols, such as
BIO_set_init
, to avoidbio_set_init = BIO_set_init
aliases. This is limited to theBIO_
andBIO_meth_*
used in this patch.