From be2be317de8059c135bea0ec698045f0f7475d6e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 29 Jun 2016 00:37:09 +0300 Subject: [PATCH] configure: Detect SSL_COMP_free_compression_methods() by linking Fixes using libressl. --- configure.ac | 3 +++ src/lib-ssl-iostream/dovecot-openssl-common.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 39b0c86abe..e3283d0ee3 100644 --- a/configure.ac +++ b/configure.ac @@ -1692,6 +1692,9 @@ if test $want_openssl != no && test $have_ssl = no; then AC_CHECK_LIB(ssl, SSL_get_servername, [ AC_DEFINE(HAVE_SSL_GET_SERVERNAME,, [Build with TLS hostname support]) ],, $SSL_LIBS) + AC_CHECK_LIB(ssl, SSL_COMP_free_compression_methods, [ + AC_DEFINE(HAVE_SSL_COMP_FREE_COMPRESSION_METHODS,, [Build with SSL_COMP_free_compression_methods() support]) + ],, $SSL_LIBS) fi fi AM_CONDITIONAL(BUILD_OPENSSL, test "$have_openssl" = "yes") diff --git a/src/lib-ssl-iostream/dovecot-openssl-common.c b/src/lib-ssl-iostream/dovecot-openssl-common.c index 2e1b8a03c3..8e54ec7445 100644 --- a/src/lib-ssl-iostream/dovecot-openssl-common.c +++ b/src/lib-ssl-iostream/dovecot-openssl-common.c @@ -71,7 +71,7 @@ bool dovecot_openssl_common_global_unref(void) #if OPENSSL_VERSION_NUMBER < 0x10001000L OBJ_cleanup(); #endif -#if OPENSSL_VERSION_NUMBER >= 0x10002000L +#ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS SSL_COMP_free_compression_methods(); #endif ENGINE_cleanup(); -- 2.47.3