From afd0b387062b26fcd770b20696e34d4174d10c3e Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Mon, 23 Dec 2024 17:11:56 -0800 Subject: [PATCH] Add more logging for SSL_ERROR_SYSCALL errors in bssl_shim.cc --- ssl/test/bssl_shim.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ssl/test/bssl_shim.cc b/ssl/test/bssl_shim.cc index 4e9956ad22..22259dbf97 100644 --- a/ssl/test/bssl_shim.cc +++ b/ssl/test/bssl_shim.cc @@ -31,6 +31,7 @@ OPENSSL_MSVC_PRAGMA(warning(pop)) #endif #include +#include #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS @@ -986,6 +987,11 @@ static bool DoConnection(bssl::UniquePtr *out_session, int ssl_err = SSL_get_error(ssl.get(), -1); if (ssl_err != SSL_ERROR_NONE) { fprintf(stderr, "SSL error: %s\n", SSL_error_description(ssl_err)); + if (ssl_err == SSL_ERROR_SYSCALL) { + int err = errno; + fprintf(stderr, "Error occurred: errno = %d, description = %s\n", err, std::strerror(err)); + + } } return false; }