]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_ssl_gnutls Add compile time option for allowing sha256 certificate fingerprints
authorAttila Molnar <attilamolnar@hush.com>
Mon, 20 Oct 2014 18:48:23 +0000 (20:48 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Mon, 20 Oct 2014 18:48:23 +0000 (20:48 +0200)
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);