From 28bee5aff3fca60e50e9e9eae4f32fc091078e80 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Wed, 26 Nov 2014 22:28:10 +0000 Subject: [PATCH] Honor SSL ciphers in ZNC->Server connections --- src/Socket.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Socket.cpp b/src/Socket.cpp index c31f51d9..3190c007 100644 --- a/src/Socket.cpp +++ b/src/Socket.cpp @@ -34,10 +34,6 @@ CZNCSock::CZNCSock(const CString& sHost, u_short port, int timeout) : Csock(sHos #ifdef HAVE_LIBSSL DisableSSLCompression(); DisableSSLProtocols(CZNC::Get().GetDisabledSSLProtocols()); - CString sCipher = CZNC::Get().GetSSLCiphers(); - if (!sCipher.empty()) { - SetCipher(sCipher); - } #endif } @@ -253,6 +249,12 @@ void CSockManager::FinishConnect(const CString& sHostname, u_short iPort, const C.SetSockName(sSockName); C.SetIsSSL(bSSL); C.SetBindHost(sBindHost); +#ifdef HAVE_LIBSSL + CString sCipher = CZNC::Get().GetSSLCiphers(); + if (!sCipher.empty()) { + C.SetCipher(sCipher); + } +#endif TSocketManager::Connect(C, pcSock); }