On 12/2/2010 2:36 AM, Aarno Syvänen wrote:
Hi List,
I have problem with SSL_shutdown. Advice seems to be to call it again, if the
return value is 0.
However, this means that shutdown can hang forever. Can I just call
SSL_shutdown and go on ?
You can go do other things and try to shut the connection down again later.
Here is the relevant documentation (assuming a non-blocking socket BIO):
If the underlying BIO is non-blocking, SSL_shutdown() will also
return when the underlying BIO could not satisfy the needs of
SSL_shutdown() to continue the handshake. In this case a call to
SSL_get_error() with the return value of SSL_shutdown() will yield
SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. The calling process then
must repeat the call after taking appropriate action to satisfy the
needs of SSL_shutdown().
DS
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org