]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_ssl_gnutls.cpp
Export the GetCiphersuite() method from the SSL modules
[user/henk/code/inspircd.git] / src / modules / extra / m_ssl_gnutls.cpp
index 6a653ddedd60f6f2dbb94e95be4097d4be8f7f94..69aedf03d5704e58bf1afdcfb2d1fa6307f68a13 100644 (file)
@@ -1164,8 +1164,10 @@ info_done_dealloc:
                }
        }
 
-       void GetCiphersuite(std::string& out) const
+       void GetCiphersuite(std::string& out) const CXX11_OVERRIDE
        {
+               if (!IsHandshakeDone())
+                       return;
                out.append(UnknownIfNULL(gnutls_protocol_get_name(gnutls_protocol_get_version(sess)))).push_back('-');
                out.append(UnknownIfNULL(gnutls_kx_get_name(gnutls_kx_get(sess)))).push_back('-');
                out.append(UnknownIfNULL(gnutls_cipher_get_name(gnutls_cipher_get(sess)))).push_back('-');