On Sun, Oct 20, 2013 at 09:29:53PM +0100, Dave Mitchell wrote:
> The man page for SSL_get_error() lists the SSL_* functions it can be used
> with, and it doesn't mention SSL_shutdown().
>
> On the other hand, the man page for SSL_shutdown() says that for
> non-blocking I/O, you should call SSL_get_error().
>
> So which is right?
>
> I ask, because in the following code:
>
> ret = SSL_shutdown(ssl);
> ssl_err = SSL_get_error(ssl, ret);
>
> I'm getting ret = 0, ssl_err = 5 (SSL_ERROR_SYSCALL).
> This is using a bio_pair, where my own code handles the underlying reads
> and writes (all single threaded), so SSL_shutdown() shouldn't be doing any
> system calls (and indeed strace shows that it isn't). So I'm confused.
No takers?
To rephrase slightly. Is the following valid code:
ret = SSL_shutdown(ssl);
switch(SSL_get_error(ssl, ret)) {
case SSL_ERROR_NONE:
...
case ...:
...
}
And if so, what does a return of SSL_ERROR_SYSCALL from SSL_get_error()
signify in the above, when the underlying BIO is a bio_pair that is doing
no system calls of its own (as confirmed with strace())?
Thanks.
--
Fire extinguisher (n) a device for holding open fire doors.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]