Hi, More information.
Before the server put: (SSL_get_shutdown() & SSL_RECEIVED_SHUTDOWN) returns 0. ... so that's of no use. After the server get: errno returns 0. WSAGetLastError() returns WSAECONNABORTED. That's one step forward, maybe. But my code must work for all supported platforms, so I need to find a solution that will work on UNIX as well. I guess I should make a test on UNIX to see if the same problem occurs, or if this is a Windows-specific problem. G. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jimmy bahuleyan Sent: 15 August 2007 14:01 To: openssl-users@openssl.org Subject: Re: Problem handling unexpected SSL shutdown jimmy bahuleyan wrote: > Shaw Graham George wrote: >> Hi, >> >> We have an application that provides HTTPS, either as client or >> server, for our customers. At the moment I am doing some testing >> between our client and our server, as a result of a problem with one >> of our customers, and there is a particular sequence of events, that >> involves an unexpected SSL shutdown, that is giving an unexpected >> behaviour (at least to me). >> >> The sequence of events goes like this: >> >> 1. The SSL handshake proceeds as normal. >> 2. The client puts an HTTP request >> 3. The server gets the HTTP request >> 4. The client then executes an (unexpected) SSL shutdown > > Is this only a SSL_shutdown() or is SSL_shutdown() followed by a > socket close by the client? > > Well if you had been listening for a read, both the SSL_shutdown and > the socket close are capable of generating read events in select() > > If it was only a SSL_shutdown, i suppose you should be getting > SSL_ERROR_ZERO_RETURN. In the other case SSL_ERROR_SYSCALL with > errno=EPIPE seems possible. > > >> 5. The server puts the HTTP response >> >> Here I might expect the put to fail, but all appears normal. >> >> 6. As an HTTP Keep-Alive request has been made, the server enters a >> wait for the next read event. >> 7. The read event occurs (presumably due to the SSL shutdown), and >> now the get fails. >> >> SSL_get_error() returns SSL_ERROR_SYSCALL (I would expect > > Did you check errno here? i mean WSAGetLastError() or whatever. -jb -- Tact is the art of making a point without making an enemy. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]