reference<ssl_cert> cert;
reference<SSLConfig> config;
- issl_session() : socket(NULL), sess(NULL) {}
+ issl_session() : socket(NULL), sess(NULL), status(ISSL_NONE) {}
};
static SSLConfig* GetSessionConfig(gnutls_session_t sess)
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);
req.cert = session->cert;
}
+ else if (!strcmp("GET_RAW_SSL_SESSION", request.id))
+ {
+ SSLRawSessionRequest& req = static_cast<SSLRawSessionRequest&>(request);
+ if ((req.fd >= 0) && (req.fd < ServerInstance->SE->GetMaxFds()))
+ req.data = reinterpret_cast<void*>(sessions[req.fd].sess);
+ }
}
void InitSession(StreamSocket* user, bool me_server)