# HG changeset patch # User Timo Sirainen # Date 1254840814 14400 # Node ID 4add5c3f13ea717e2a17f2876bcff05a92a75601 # Parent 2a48aa6e2bceb82d476392d79db8b46621adc545 Compiling fix for OpenSSL 0.9.7 and older. diff -r 2a48aa6e2bce -r 4add5c3f13ea configure.in --- 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 diff -r 2a48aa6e2bce -r 4add5c3f13ea src/login-common/ssl-proxy-openssl.c --- 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),