On Fri, Mar 12, 2010, Darryl Miles wrote:

> int rc = SSL_shutdown(ssl);
> /***** BEGIN - INSERT THIS CODE AFTER EVERY SSL_shutdown()
> INVOCATION IN YOUR CODE *****/
> if(rc == -1) {
>       int ssl_errno;
>       SSL_get_error(ssl, ssl_errno);
>       if(ssl_errno == SSL_ERROR_WANT_READ || ssl_errno == 
> SSL_ERROR_WANT_WRITE)
>               rc = 0;
> }
> /***** END - INSERT THIS CODE AFTER EVERY SSL_shutdown() INVOCATION
> IN YOUR CODE *****/

> With this the observable behavior that you got before should be consistent.

It should probably be

        ssl_errno = SSL_get_error(ssl, rc);

but even then I get SSL_ERROR_SYSCALL and errno=EBADF using sendmail
8, while previously it didn't complain about errors.

So where is the error? In the application (if so: what is the correct
handling of the new code?) or in OpenSSL 0.9.8m?
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to