From 049954083c6beefa282ea8ea5a444070aab15076 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 30 Jun 2010 18:16:35 +0000 Subject: Use libgcrypt calls only if gnutls is older than 2.11.0 --- diff --git a/include/mod_gnutls.h.in b/include/mod_gnutls.h.in index 58eed1b..6d5e5ba 100644 --- a/include/mod_gnutls.h.in +++ b/include/mod_gnutls.h.in @@ -27,7 +27,6 @@ #include "apr_tables.h" #include "ap_release.h" -#include #include #include #include diff --git a/src/gnutls_hooks.c b/src/gnutls_hooks.c index 0718e20..8bb0059 100644 --- a/src/gnutls_hooks.c +++ b/src/gnutls_hooks.c @@ -20,6 +20,10 @@ #include "http_vhost.h" #include "ap_mpm.h" +#if GNUTLS_VERSION_MAJOR <= 2 && GNUTLS_VERSION_MINOR < 11 +#include +#endif + #if !USING_2_1_RECENT extern server_rec *ap_server_conf; #endif @@ -83,13 +87,16 @@ int ret; #if APR_HAS_THREADS ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_is_threaded); +#if (GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR < 11) || GNUTLS_VERSION_MAJOR < 2 if (mpm_is_threaded) { gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); } +#endif #else mpm_is_threaded = 0; #endif + if (gnutls_check_version(LIBGNUTLS_VERSION)==NULL) { _gnutls_log(debug_log_fp, "gnutls_check_version() failed. Required: gnutls-%s Found: gnutls-%s\n", LIBGNUTLS_VERSION, gnutls_check_version(NULL)); -- cgit v0.9.2