From: Kyle Fuller Date: Tue, 11 Aug 2015 00:01:07 +0000 (+0100) Subject: wip X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=14b5115d6e7faa66e52edfdfb5c3c6a65d93bc50;p=znc-palaver.git wip --- diff --git a/palaver.cpp b/palaver.cpp index c48e2ce..b78e31c 100644 --- a/palaver.cpp +++ b/palaver.cpp @@ -28,7 +28,11 @@ #define CSOCKET_DOES_NOT_HAVE_SNI_CONFIGURATION static int PalaverSNICallBack(SSL *pSSL, int *piAD, void *pData) { + if (!pSSL || !pData) { + return SSL_TLSEXT_ERR_NOACK; + } + PLVHTTPSocket *pSock = static_cast(pData); } #endif @@ -180,8 +184,14 @@ public: } #ifdef CSOCKET_DOES_NOT_HAVE_SNI_CONFIGURATION - bool AcceptSSL() { - return CSocket::AcceptSSL(); + bool SSLClientSetup() { + bool result = CSocket::SSLClientSetup(); + + if (result) { + SSL_set_tlsext_host_name(GetSSLObject(), m_pHostname.c_str()); + } + + return result; } #endif