If a connection fails it is useful during debugging to have any errors
that are on the OpenSSL error stack at the time of the failure.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/11406)
if (!clienterr && retc <= 0 && err != SSL_ERROR_WANT_READ) {
TEST_info("SSL_connect() failed %d, %d", retc, err);
+ if (want != SSL_ERROR_SSL)
+ TEST_openssl_errors();
clienterr = 1;
}
if (want != SSL_ERROR_NONE && err == want)
&& err != SSL_ERROR_WANT_READ
&& err != SSL_ERROR_WANT_X509_LOOKUP) {
TEST_info("SSL_accept() failed %d, %d", rets, err);
+ if (want != SSL_ERROR_SSL)
+ TEST_openssl_errors();
servererr = 1;
}
if (want != SSL_ERROR_NONE && err == want)