From f0d8951cd200b9abeca00eb92b07ec309bca5739 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 17 Jul 2014 19:48:55 +0000 Subject: - m_server.c: fixed build with LibreSSL which hasn't compression support - ax_check_openssl.m4: 0.9.8m is now the minimum requirement git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@4248 82007160-df01-0410-b94d-b575c5fd34c7 --- configure | 8 ++++---- m4/ax_check_openssl.m4 | 4 ++-- modules/core/m_server.c | 19 ++++++++++++++++--- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/configure b/configure index af434c8..853ce14 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Id: configure.ac 3920 2014-06-09 11:56:33Z michael . +# From configure.ac Id: configure.ac 4177 2014-07-05 19:47:15Z michael . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for ircd-hybrid 8.1.19. # @@ -13998,8 +13998,8 @@ $as_echo "disabled" >&6; } fi if test "$cf_enable_openssl" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL 0.9.8 or above" >&5 -$as_echo_n "checking for OpenSSL 0.9.8 or above... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL 0.9.8m or above" >&5 +$as_echo_n "checking for OpenSSL 0.9.8m or above... " >&6; } if test "$cross_compiling" = yes; then : cf_openssl_version_ok=no else @@ -14012,7 +14012,7 @@ else int main () { - exit(!(OPENSSL_VERSION_NUMBER >= 0x00908000)); + exit(!(OPENSSL_VERSION_NUMBER >= 0x009080dfL)); ; return 0; } diff --git a/m4/ax_check_openssl.m4 b/m4/ax_check_openssl.m4 index cef7493..510b53d 100644 --- a/m4/ax_check_openssl.m4 +++ b/m4/ax_check_openssl.m4 @@ -61,12 +61,12 @@ else fi AS_IF([test "$cf_enable_openssl" != "no"], - [AC_MSG_CHECKING(for OpenSSL 0.9.8 or above) + [AC_MSG_CHECKING(for OpenSSL 0.9.8m or above) AC_RUN_IFELSE([ AC_LANG_PROGRAM([ #include #include ], - [[ exit(!(OPENSSL_VERSION_NUMBER >= 0x00908000)); ]])], + [[ exit(!(OPENSSL_VERSION_NUMBER >= 0x009080dfL)); ]])], [cf_openssl_version_ok=yes], [cf_openssl_version_ok=no], [cf_openssl_version_ok=no]) diff --git a/modules/core/m_server.c b/modules/core/m_server.c index c8cefe7..2e0ed8d 100644 --- a/modules/core/m_server.c +++ b/modules/core/m_server.c @@ -260,7 +260,7 @@ server_estab(struct Client *client_p) const char *inpath; static char inpath_ip[HOSTLEN * 2 + USERLEN + 6]; dlink_node *ptr; -#ifdef HAVE_LIBCRYPTO +#if defined(HAVE_LIBCRYPTO) && !defined(OPENSSL_NO_COMP) const COMP_METHOD *compression = NULL, *expansion = NULL; #endif @@ -369,30 +369,43 @@ server_estab(struct Client *client_p) #ifdef HAVE_LIBCRYPTO if (client_p->localClient->fd.ssl) { +#ifndef OPENSSL_NO_COMP compression = SSL_get_current_compression(client_p->localClient->fd.ssl); expansion = SSL_get_current_expansion(client_p->localClient->fd.ssl); - +#endif sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, "Link with %s established: [SSL: %s, Compression/Expansion method: %s/%s] (Capabilities: %s)", inpath_ip, ssl_get_cipher(client_p->localClient->fd.ssl), +#ifndef OPENSSL_NO_COMP compression ? SSL_COMP_get_name(compression) : "NONE", expansion ? SSL_COMP_get_name(expansion) : "NONE", +#else + "NONE", "NONE", +#endif show_capabilities(client_p)); /* Now show the masked hostname/IP to opers */ sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE, "Link with %s established: [SSL: %s, Compression/Expansion method: %s/%s] (Capabilities: %s)", inpath, ssl_get_cipher(client_p->localClient->fd.ssl), +#ifndef OPENSSL_NO_COMP compression ? SSL_COMP_get_name(compression) : "NONE", expansion ? SSL_COMP_get_name(expansion) : "NONE", +#else + "NONE", "NONE", +#endif show_capabilities(client_p)); ilog(LOG_TYPE_IRCD, "Link with %s established: [SSL: %s, Compression/Expansion method: %s/%s] (Capabilities: %s)", inpath_ip, ssl_get_cipher(client_p->localClient->fd.ssl), +#ifndef OPENSSL_NO_COMP compression ? SSL_COMP_get_name(compression) : "NONE", expansion ? SSL_COMP_get_name(expansion) : "NONE", +#else + "NONE", "NONE", +#endif show_capabilities(client_p)); } else -#endif +#endif { sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, "Link with %s established: (Capabilities: %s)", -- cgit