On Fri, Jan 15, 2010 at 5:43 AM, Joachim Bauch <[email protected]> wrote: > Nick Mathewson wrote: > [...] >> >> There _is_ a mechanism to distinguish OpenSSL errors from one another >> from eventcb: bufferevent_get_openssl_error(). The only problem is >> that a closed connection is not necessarily reported by openssl as an >> openssl error. I wonder if we can find some unused part of the >> openssl error space to reserve for libevent. > > Unfortunately I can't use this method as the event is not triggered by > OpenSSL, but by my underlying bufferevent (through be_openssl_eventcb), > so the OpenSSL error is always "0" for me.
Right, but my point was that be_openssl_eventcb could be modified to queue an error that you _could_ get through calling bufferevent_get_openssl_error(). All it would need to do is call put_error() with an appropriate error code. The tricky bit would be picking a good error code that OpenSSL would be guaranteed not to be using. I'm pretty sure (based on reading code and conversations with an openssl developer) that any error value chosen with its "l" value equal to SSL_ERR_USER or greater is reserved for extension use. -- Nick *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
