Skip to content

Commit

Permalink
Add more logging for SSL_ERROR_SYSCALL errors in bssl_shim.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhop committed Dec 24, 2024
1 parent acf5220 commit afd0b38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ssl/test/bssl_shim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ OPENSSL_MSVC_PRAGMA(warning(pop))
#endif

#include <assert.h>
#include <errno.h>

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
Expand Down Expand Up @@ -986,6 +987,11 @@ static bool DoConnection(bssl::UniquePtr<SSL_SESSION> *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;
}
Expand Down

0 comments on commit afd0b38

Please sign in to comment.