]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_gnutls.cpp
m_ssl_gnutls Add compile time option for allowing sha256 certificate fingerprints
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_gnutls.cpp
index 21b58f2800a17a323f1d1a2dd70466536012a14c..228ceb99470264d7f163836f2e18b4bbf5607b6a 100644 (file)
@@ -419,6 +419,10 @@ class ModuleSSLGnuTLS : public Module
                        hash = GNUTLS_DIG_MD5;
                else if (hashname == "sha1")
                        hash = GNUTLS_DIG_SHA1;
+#ifdef INSPIRCD_GNUTLS_ENABLE_SHA256_FINGERPRINT
+               else if (hashname == "sha256")
+                       hash = GNUTLS_DIG_SHA256;
+#endif
                else
                        throw ModuleException("Unknown hash type " + hashname);