aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 94baab642..e09098825 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -198,9 +198,12 @@ namespace GnuTLS
{
// As older versions of gnutls can't do this, let's disable it where needed.
#ifdef GNUTLS_HAS_MAC_GET_ID
+# if INSPIRCD_GNUTLS_HAS_VERSION(3, 2, 2)
+ hash = gnutls_digest_get_id(hashname.c_str());
+# else
// As gnutls_digest_algorithm_t and gnutls_mac_algorithm_t are mapped 1:1, we can do this
- // There is no gnutls_dig_get_id() at the moment, but it may come later
hash = (gnutls_digest_algorithm_t)gnutls_mac_get_id(hashname.c_str());
+# endif
if (hash == GNUTLS_DIG_UNKNOWN)
throw Exception("Unknown hash type " + hashname);