I am calling SSL_connect()
, checking the return value and printing any error:
const int res = SSL_connect(ssl);
ASSERT(1 == res, "SSL_connect() failed. error code (" << res << ") details: " << OpenSSLError(res));
the function printing details:
static inline std::string OpenSSLError()
{
BIO *bio = BIO_new(BIO_s_mem());
ERR_print_errors(bio);
char *buf;
size_t len = BIO_get_mem_data(bio, &buf);
std::string ret(buf, len);
BIO_free(bio);
return ret;
}
is based on: /a/56752841/1107474
The assert just triggered with:
Assert failed. Msg: SSL_connect() failed. error code (-1) details:
but no details were provided.
Can anyone help with the error was?
Advise what I can change to ensure I catch the error details?
The code is surrounded with a mutex, so the issue wasn’t multithreading/corruption.