diff options
| author | Heikki Linnakangas | 2016-09-15 19:29:39 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2016-09-15 19:52:51 +0000 |
| commit | 5c6df67e0c961f68e73e7c1e6312211ed59da00a (patch) | |
| tree | 83959fc3c32e01bbdb2f4610efff86c0ab5c4c42 /configure.in | |
| parent | ffccee473682ed18a27d667b7a4f45d802dd61c4 (diff) | |
Fix building with LibreSSL.
LibreSSL defines OPENSSL_VERSION_NUMBER to claim that it is version 2.0.0,
but it doesn't have the functions added in OpenSSL 1.1.0. Add autoconf
checks for the individual functions we need, and stop relying on
OPENSSL_VERSION_NUMBER.
Backport to 9.5 and 9.6, like the patch that broke this. In the
back-branches, there are still a few OPENSSL_VERSION_NUMBER checks left,
to check for OpenSSL 0.9.8 or 0.9.7. I left them as they were - LibreSSL
has all those functions, so they work as intended.
Per buildfarm member curculio.
Discussion: <2442.1473957669@sss.pgh.pa.us>
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.in b/configure.in index c42680607a..96d865de9f 100644 --- a/configure.in +++ b/configure.in @@ -1118,6 +1118,16 @@ if test "$with_openssl" = yes ; then AC_SEARCH_LIBS(SSL_new, ssleay32 ssl, [], [AC_MSG_ERROR([library 'ssleay32' or 'ssl' is required for OpenSSL])]) fi AC_CHECK_FUNCS([SSL_get_current_compression]) + # Functions introduced in OpenSSL 1.1.0. We used to check for + # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL + # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it + # doesn't have these OpenSSL 1.1.0 functions. So check for individual + # functions. + AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL]) + # OpenSSL versions before 1.1.0 required setting callback functions, for + # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock() + # function was removed. + AC_CHECK_FUNCS([CRYPTO_lock]) fi if test "$with_pam" = yes ; then |
