Dan Kegel <[EMAIL PROTECTED]>:
>>> The symptom was, SSL_write returned -1. SSL_get_error returned 1 (SSL_ERROR_SSL).
>>> ERR_error_string returned "error:FFFFFFFF:lib(255):func(4095):reason(4095)".
>> Use ERR_error_string() on the return value of ERR_get_error(), not on the
>> return value of SSL_write(). See the ERR_get_error() manpage.
> Thanks. OK, I've done that; now I get
> error:00000001:lib(0):func(0):reason(1)
>
> Here's how I'm calling it:
>
> int err = 0;
> *nread = SSL_peek(m_ssl, buf, len); /* or read, or write, ... */
> if (*nread <= 0) {
> int sslerr = SSL_get_error(m_ssl, *nread);
[...]
> LOG_ERROR(("peek: SSL unhandled error %d, *nread %d, '%s', returning
>EPIPE\n",
> sslerr, *nread, ERR_error_string(sslerr, NULL)));
Don't confuse SSL_get_error and ERR_get_error! Those are entirely
different functions (with entirely different manpages :-).
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]