dovecot-1.2: Compiling fix for OpenSSL 0.9.7 and older.

dovecot at dovecot.org dovecot at dovecot.org
Tue Oct 6 17:53:43 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/4add5c3f13ea
changeset: 9416:4add5c3f13ea
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Oct 06 10:53:34 2009 -0400
description:
Compiling fix for OpenSSL 0.9.7 and older.

diffstat:

2 files changed, 10 insertions(+)
configure.in                         |    4 ++++
src/login-common/ssl-proxy-openssl.c |    6 ++++++

diffs (41 lines):

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 $want_openssl != no && test $hav
   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_strin
 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 @@ const char *ssl_proxy_get_security_strin
 
 	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),


More information about the dovecot-cvs mailing list