From 7fc918c2e69f2e892d09caf1d14f07ba4efb06fc Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 14 Dec 2014 16:40:46 +0000 Subject: [PATCH] Update Csocket to 60a71941eac8e4b5728abd82deb95db4668345be It fixes crash on SSL renegotiation if Csock object was swapped with another one --- src/Csocket.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Csocket.cpp b/src/Csocket.cpp index 776f88f3..655f3797 100644 --- a/src/Csocket.cpp +++ b/src/Csocket.cpp @@ -1051,6 +1051,11 @@ void Csock::Copy( const Csock & cCopy ) m_pCerVerifyCB = cCopy.m_pCerVerifyCB; + if( m_ssl ) + { + SSL_set_ex_data( m_ssl, GetCsockSSLIdx(), this ); + } + #endif /* HAVE_LIBSSL */ CleanupCrons();