I have tested the situations out in brought up in my previous thread and
this patch seems to do the correct thing when using non-blocking BIO
layer for all situations I tried.
The correct thing as I see it is:
* Return -1 WANT_WRITE if the send notify alert has not been committed
into the BIO layer.
* Return 0, the first time the SSL_shutdown() call returns and the
send notify alert just got fully committed into the BIO layer.
* Return -1 WANT_READ while we are still waiting for the inbound recv
notify alert to be received.
* Return 1, when both outbound and inbound notify alert operations is
complete.
This make the SSL_shutdown() function for non-blocking sockets fall into
line with what I would call more user friendly behavior.
Previously it would not have been possible at all to know when the send
notify alert was truly committed into the BIO layer. This means the
application would not be able to call shutdown(fd, SHUT_WR) on the
underlying socket (to perform a TCP level send shutdown).
Regards,
Darryl L. Miles
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager [EMAIL PROTECTED]