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

fix: Changed OpenSSL check inside configure.am #234

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

vimishor
Copy link
Contributor

In OpenSSL 1.1.0 the EVP_MD_CTX_create() and EVP_MD_CTX_destroy()
functions were renamed to EVP_MD_CTX_new() and EVP_MD_CTX_free().
Because a check for EVP_MD_CTX_create() was in place inside
configure.am, building with newer OpenSSL versions could not be done.

Checking for EVP_MD_CTX_create function from configure.am was
replaced with a check for CRYPTO_new_ex_data() function.

Because a compatibility layer was introduced in OpenSSL 1.1.0,
no code changes are necessary.

Fixes: #203

In OpenSSL 1.1.0 the `EVP_MD_CTX_create()` and `EVP_MD_CTX_destroy()`
functions were renamed to `EVP_MD_CTX_new()` and `EVP_MD_CTX_free()`.
Because a check for `EVP_MD_CTX_create()` was in place inside
configure.am, building with newer OpenSSL versions could not be done.

Checking for `EVP_MD_CTX_create` function from configure.am was
replaced with a check for `CRYPTO_new_ex_data()` function.

Because a [compatibility layer][1] was introduced in OpenSSL 1.1.0,
no code changes are necessary.

Fixes: vstakhov#203

[1]: https://github.com/openssl/openssl/blob/OpenSSL_1_1_0/include/openssl/evp.h#L500-L502
@vstakhov
Copy link
Owner

Won't this break old SSL libraries, such as 1.0? CRYPTO_new_ex_data seems to be added merely in 1.1.

@vimishor
Copy link
Contributor Author

@vstakhov Looking through git logs, CRYPTO_new_ex_data exists since SSLeay 0.9.0b, which was imported in 58964a492275ca9a59a0cd9c8155cb2491b4b909 and in 3a0799977bcb154d044828e96a25a01eb478de51 its signature was changed.

If we take into consideration only the new signature, git says that it exist starting with OpenSSL 0.9.6c:

$ git tag --contains 3a0799977bcb154d044828e96a25a01eb478de51 | grep 'OpenSSL_0_' | head -n 1  
OpenSSL_0_9_6c

Did I missed something ?

@vstakhov
Copy link
Owner

In this case I have no objections, merging. Thank you!

@vstakhov vstakhov merged commit 5241e9d into vstakhov:master Sep 18, 2020
@jpotier
Copy link

jpotier commented Sep 19, 2020

hey @vstakhov does this mean there will be a new tag soon :) I'm a packager for libucl in NixOS and I would like to know when would be a good time to include these changes.

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.

Signatures support is broken with OpenSSL 1.1.1
3 participants