From: <ima...@us...> - 2010-02-10 23:33:28
|
Revision: 1750 http://znc.svn.sourceforge.net/znc/?rev=1750&view=rev Author: imaginos Date: 2010-02-10 23:33:22 +0000 (Wed, 10 Feb 2010) Log Message: ----------- added workaround for v23 undefined const function before handshake is finished type bug thing Modified Paths: -------------- trunk/Csocket.cpp Modified: trunk/Csocket.cpp =================================================================== --- trunk/Csocket.cpp 2010-02-08 22:55:26 UTC (rev 1749) +++ trunk/Csocket.cpp 2010-02-10 23:33:22 UTC (rev 1750) @@ -2109,7 +2109,18 @@ { #ifdef HAVE_LIBSSL if( m_ssl ) - return( SSL_pending( m_ssl ) ); + { + // in v23 method, the pending function is initialized to ssl_undefined_const_function + // which throws SSL_UNDEFINED_CONST_FUNCTION on to the error stack + // this is one of the more stupid things in openssl, it seems bizarre that even though SSL_pending + // returns an int, they don't bother returning in error to notify us, so basically + // we have to always clear errors here generated by SSL_pending, otherwise the stack could + // have a lame error on it causing SSL_write to fail in certain instances. + ERR_set_mark(); + int iBytes = SSL_pending( m_ssl ); + ERR_pop_to_mark(); + return( iBytes ); + } else return( 0 ); #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |