> I'm using openssl-0.9.7d in a multithreaded application and want > to do some > special processing in the case of a client mistakenly trying to > connect without > SSL to a port which is expecting SSL (i.e. someone types > "http://foo.com:10000" > into their browser instead of "https://foo.com:10000"). Looking > at s23_srvr.c > there is even an error code for this called SSL_R_HTTP_REQUEST. The > complication is that my application uses a "worker thread" model > for handling > connections, there is not one thread per SSL connection. > Therefore the error > stack, which is stored per thread, doesn't really help me since I > don't know > which connection the error information applies to since a given > thread may do > work for multiple connections. Does anyone know if there is > another way to get > error information which is per connection and not tied to the thread? I > haven't found anything in the SSL or SSL_CTX objects which seem right.
The error stack being per thread should not cause you a problem. When you call an SSL function, you do some in some thread. When you call the function, the error stack should be empty. If you get an error from that SSL function, you check the error stack. You know any errors you find must be from that SSL function because you just called it with an empty error stack. Errors don't appear asynchronously. The SSL code only gets control when you call an SSL function, and it generates the error then and there. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]