Compiling fix for OpenSSL 0.9.7 and older.
1.1 --- a/configure.in Mon Oct 05 19:52:13 2009 -0400
1.2 +++ b/configure.in Tue Oct 06 10:53:34 2009 -0400
1.3 @@ -1582,6 +1582,10 @@
1.4 if test "$have_openssl" = "yes"; then
1.5 AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support)
1.6 have_ssl="yes (OpenSSL)"
1.7 +
1.8 + AC_CHECK_LIB(ssl, SSL_get_current_compression, [
1.9 + AC_DEFINE(HAVE_SSL_COMPRESSION,, Build with OpenSSL compression)
1.10 + ],, $SSL_LIBS)
1.11 fi
1.12 fi
1.13
2.1 --- a/src/login-common/ssl-proxy-openssl.c Mon Oct 05 19:52:13 2009 -0400
2.2 +++ b/src/login-common/ssl-proxy-openssl.c Tue Oct 06 10:53:34 2009 -0400
2.3 @@ -635,7 +635,9 @@
2.4 const char *ssl_proxy_get_security_string(struct ssl_proxy *proxy)
2.5 {
2.6 SSL_CIPHER *cipher;
2.7 +#ifdef HAVE_SSL_COMPRESSION
2.8 const COMP_METHOD *comp;
2.9 +#endif
2.10 int bits, alg_bits;
2.11 const char *comp_str;
2.12
2.13 @@ -644,9 +646,13 @@
2.14
2.15 cipher = SSL_get_current_cipher(proxy->ssl);
2.16 bits = SSL_CIPHER_get_bits(cipher, &alg_bits);
2.17 +#ifdef HAVE_SSL_COMPRESSION
2.18 comp = SSL_get_current_compression(proxy->ssl);
2.19 comp_str = comp == NULL ? "" :
2.20 t_strconcat(" ", SSL_COMP_get_name(comp), NULL);
2.21 +#else
2.22 + comp_str = NULL;
2.23 +#endif
2.24 return t_strdup_printf("%s with cipher %s (%d/%d bits)%s",
2.25 SSL_get_version(proxy->ssl),
2.26 SSL_CIPHER_get_name(cipher),