Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9416:4add5c3f13ea HEAD
Compiling fix for OpenSSL 0.9.7 and older.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 06 Oct 2009 10:53:34 -0400 |
parents | 2a48aa6e2bce |
children | 84e04d84d2b5 |
files | configure.in src/login-common/ssl-proxy-openssl.c |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Mon Oct 05 19:52:13 2009 -0400 +++ b/configure.in Tue Oct 06 10:53:34 2009 -0400 @@ -1582,6 +1582,10 @@ if test "$have_openssl" = "yes"; then AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support) have_ssl="yes (OpenSSL)" + + AC_CHECK_LIB(ssl, SSL_get_current_compression, [ + AC_DEFINE(HAVE_SSL_COMPRESSION,, Build with OpenSSL compression) + ],, $SSL_LIBS) fi fi
--- a/src/login-common/ssl-proxy-openssl.c Mon Oct 05 19:52:13 2009 -0400 +++ b/src/login-common/ssl-proxy-openssl.c Tue Oct 06 10:53:34 2009 -0400 @@ -635,7 +635,9 @@ const char *ssl_proxy_get_security_string(struct ssl_proxy *proxy) { SSL_CIPHER *cipher; +#ifdef HAVE_SSL_COMPRESSION const COMP_METHOD *comp; +#endif int bits, alg_bits; const char *comp_str; @@ -644,9 +646,13 @@ cipher = SSL_get_current_cipher(proxy->ssl); bits = SSL_CIPHER_get_bits(cipher, &alg_bits); +#ifdef HAVE_SSL_COMPRESSION comp = SSL_get_current_compression(proxy->ssl); comp_str = comp == NULL ? "" : t_strconcat(" ", SSL_COMP_get_name(comp), NULL); +#else + comp_str = NULL; +#endif return t_strdup_printf("%s with cipher %s (%d/%d bits)%s", SSL_get_version(proxy->ssl), SSL_CIPHER_get_name(cipher),