Bodo wrote: > > 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); switch (sslerr) { case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: err = EAGAIN; break; case SSL_ERROR_NONE: break; case SSL_ERROR_SYSCALL: err = EPIPE; break; default: LOG_ERROR(("peek: SSL unhandled error %d, *nread %d, '%s', returning EPIPE\n", sslerr, *nread, ERR_error_string(sslerr, NULL))); err = EPIPE; break; } } If I substitute ERR_print_errors_fp(stdout); for my call to ERR_error_string, I get the correct error message. What gives? I must be misreading the man pages still... Thanks, Dan ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]