]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Compile fix for some OpenSSL version.
authorTimo Sirainen <tss@iki.fi>
Fri, 13 Aug 2010 13:00:46 +0000 (14:00 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 13 Aug 2010 13:00:46 +0000 (14:00 +0100)
configure.in
src/login-common/ssl-proxy-openssl.c

index 8560b8add7f96abcb561a6a6ff87433cb39ec981..ff1dda72cd7a11c53595d3a103fbb4084b993b87 100644 (file)
@@ -1696,6 +1696,9 @@ if test $want_openssl != no && test $have_ssl = no; then
     AC_CHECK_LIB(ssl, SSL_get_current_compression, [
       AC_DEFINE(HAVE_SSL_COMPRESSION,, Build with OpenSSL compression)
     ],, $SSL_LIBS)
+    AC_CHECK_LIB(ssl, SSL_get_servername, [
+      AC_DEFINE(HAVE_SSL_GET_SERVERNAME,, Build with TLS hostname support)
+    ],, $SSL_LIBS)
   fi
 fi
 
index c9a531a66de2116fa95f45758f2908c2d4f9c266..45313e9588986b423922654b9e6bde61b45bc1e3 100644 (file)
 
 #define SSL_PARAMETERS_PATH "ssl-params"
 
+#ifndef SSL_CTRL_SET_TLSEXT_HOSTNAME /* FIXME: this may be unnecessary.. */
+#  undef HAVE_SSL_GET_SERVERNAME
+#endif
+
 enum ssl_io_action {
        SSL_ADD_INPUT,
        SSL_REMOVE_INPUT,
@@ -1062,7 +1066,7 @@ end:
        return ret;
 }
 
-#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+#ifdef HAVE_SSL_GET_SERVERNAME
 static void ssl_servername_callback(SSL *ssl, int *al ATTR_UNUSED,
                                    void *context ATTR_UNUSED)
 {
@@ -1116,7 +1120,7 @@ ssl_server_context_init(const struct login_settings *set)
                        ssl_proxy_get_use_certificate_error(ctx->cert));
        }
 
-#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
+#ifdef HAVE_SSL_GET_SERVERNAME
        if (SSL_CTX_set_tlsext_servername_callback(ctx->ctx,
                                                   ssl_servername_callback) != 1) {
                if (set->verbose_ssl)