void CSockManager::FinishConnect(const CString& sHostname, u_short iPort, const CString& sSockName, int iTimeout, bool bSSL, const CString& sBindHost, CZNCSock* pcSock) { auto it = m_InFlightDnsSockets.find(pcSock); if (it != m_InFlightDnsSockets.end()) { bool bSocketDeletedAlready = it->second; m_InFlightDnsSockets.erase(it); if (bSocketDeletedAlready) { DEBUG("TDNS: Socket [" << sSockName << "] is deleted already, not proceeding with connection"); return; } } else { // impossible } CSConnection C(sHostname, iPort, iTimeout); C.SetSockName(sSockName); C.SetIsSSL(bSSL); C.SetBindHost(sBindHost); #ifdef HAVE_LIBSSL CString sCipher = CZNC::Get().GetSSLCiphers(); if (sCipher.empty()) { sCipher = ZNC_DefaultCipher(); } C.SetCipher(sCipher); #endif TSocketManager<CZNCSock>::Connect(C, pcSock); }
CZNCSock::CZNCSock(int timeout) : Csock(timeout), m_HostToVerifySSL(""), m_ssTrustedFingerprints(), m_ssCertVerificationErrors() { #ifdef HAVE_LIBSSL DisableSSLCompression(); FollowSSLCipherServerPreference(); DisableSSLProtocols(CZNC::Get().GetDisabledSSLProtocols()); CString sCipher = CZNC::Get().GetSSLCiphers(); if (sCipher.empty()) { sCipher = ZNC_DefaultCipher(); } SetCipher(sCipher); #endif }
CZNCSock::CZNCSock(int timeout) : Csock(timeout) { #ifdef HAVE_LIBSSL DisableSSLCompression(); FollowSSLCipherServerPreference(); DisableSSLProtocols(CZNC::Get().GetDisabledSSLProtocols()); CString sCipher = CZNC::Get().GetSSLCiphers(); if (sCipher.empty()) { sCipher = ZNC_DefaultCipher(); } SetCipher(sCipher); #endif }
void CSockManager::FinishConnect(const CString& sHostname, u_short iPort, const CString& sSockName, int iTimeout, bool bSSL, const CString& sBindHost, CZNCSock *pcSock) { CSConnection C(sHostname, iPort, iTimeout); C.SetSockName(sSockName); C.SetIsSSL(bSSL); C.SetBindHost(sBindHost); #ifdef HAVE_LIBSSL CString sCipher = CZNC::Get().GetSSLCiphers(); if (sCipher.empty()) { sCipher = ZNC_DefaultCipher(); } C.SetCipher(sCipher); #endif TSocketManager<CZNCSock>::Connect(C, pcSock); }