summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-10-25 03:58:49 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-10-25 03:58:49 +0200
commit680e9e0809d8569c8268122e3fecd2b6b62b2e65 (patch)
tree706c35ce73e092c9e3b032d3cf037f5d2da1900c /src
parent0035820e13a915a3bf1a440fcedf8ce25fe37a22 (diff)
parenta49fd4cba6a44334eb5a39c6fbe8f6cebd55d0c7 (diff)
Merge pull request #944 from SaberUK/insp20+gnutls-rnd
[2.0] Use gnutls_rnd instead of gcry_randomize on newer GnuTLS versions.
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 228ceb994..3b67a6180 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -22,9 +22,6 @@
#include "inspircd.h"
-#ifndef _WIN32
-#include <gcrypt.h>
-#endif
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
#include "ssl.h"
@@ -35,8 +32,8 @@
#endif
/* $ModDesc: Provides SSL support for clients */
-/* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") exec("libgcrypt-config --cflags") */
-/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") exec("libgcrypt-config --libs") */
+/* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") iflt("pkg-config --modversion gnutls","2.12") exec("libgcrypt-config --cflags") */
+/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") iflt("pkg-config --modversion gnutls","2.12") exec("libgcrypt-config --libs") */
/* $NoPedantic */
#ifndef GNUTLS_VERSION_MAJOR
@@ -55,7 +52,7 @@ typedef gnutls_certificate_credentials_t gnutls_certificate_credentials;
typedef gnutls_dh_params_t gnutls_dh_params;
#endif
-#if (defined(_WIN32) && (GNUTLS_VERSION_MAJOR > 2 || (GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR >= 12)))
+#if (GNUTLS_VERSION_MAJOR > 2 || (GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR >= 12))
# define GNUTLS_HAS_RND
# include <gnutls/crypto.h>
#else