aboutsummaryrefslogtreecommitdiffstats
path: root/src/gnutls_hooks.c
diff options
context:
space:
mode:
authorGravatar Nikos Mavrogiannopoulos 2010-06-30 20:16:35 +0200
committerGravatar Nikos Mavrogiannopoulos 2010-06-30 20:16:35 +0200
commit55cf9a71cc35b40cf64d21f786035935a10eb226 (patch)
treed39e7b4570f21e125fc7974963cd25452b0c8d11 /src/gnutls_hooks.c
parenta1a148b9cd4b20e31cab80f779442fde24f6d528 (diff)
Use libgcrypt calls only if gnutls is older than 2.11.0
Diffstat (limited to 'src/gnutls_hooks.c')
-rw-r--r--src/gnutls_hooks.c7
1 files changed, 7 insertions, 0 deletions
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 @@
20#include "http_vhost.h" 20#include "http_vhost.h"
21#include "ap_mpm.h" 21#include "ap_mpm.h"
22 22
23#if GNUTLS_VERSION_MAJOR <= 2 && GNUTLS_VERSION_MINOR < 11
24#include <gcrypt.h>
25#endif
26
23#if !USING_2_1_RECENT 27#if !USING_2_1_RECENT
24extern server_rec *ap_server_conf; 28extern server_rec *ap_server_conf;
25#endif 29#endif
@@ -83,13 +87,16 @@ int ret;
83 87
84#if APR_HAS_THREADS 88#if APR_HAS_THREADS
85 ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_is_threaded); 89 ap_mpm_query(AP_MPMQ_IS_THREADED, &mpm_is_threaded);
90#if (GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR < 11) || GNUTLS_VERSION_MAJOR < 2
86 if (mpm_is_threaded) { 91 if (mpm_is_threaded) {
87 gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); 92 gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
88 } 93 }
94#endif
89#else 95#else
90 mpm_is_threaded = 0; 96 mpm_is_threaded = 0;
91#endif 97#endif
92 98
99
93 if (gnutls_check_version(LIBGNUTLS_VERSION)==NULL) { 100 if (gnutls_check_version(LIBGNUTLS_VERSION)==NULL) {
94 _gnutls_log(debug_log_fp, "gnutls_check_version() failed. Required: gnutls-%s Found: gnutls-%s\n", 101 _gnutls_log(debug_log_fp, "gnutls_check_version() failed. Required: gnutls-%s Found: gnutls-%s\n",
95 LIBGNUTLS_VERSION, gnutls_check_version(NULL)); 102 LIBGNUTLS_VERSION, gnutls_check_version(NULL));