This is an automated email from the ASF dual-hosted git repository.

dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 0e274361b4 SSL Diags - Use boringssl API to fetch the proper error 
description. (#11176)
0e274361b4 is described below

commit 0e274361b46c00de7c867800c1f45bc28bbaa996
Author: Damian Meden <[email protected]>
AuthorDate: Fri Mar 22 11:49:07 2024 +0100

    SSL Diags - Use boringssl API to fetch the proper error description. 
(#11176)
---
 src/iocore/net/SSLDiags.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/iocore/net/SSLDiags.cc b/src/iocore/net/SSLDiags.cc
index dae89530fb..6e12d32046 100644
--- a/src/iocore/net/SSLDiags.cc
+++ b/src/iocore/net/SSLDiags.cc
@@ -184,6 +184,11 @@ SSLDiagnostic(const SourceLocation &loc, bool debug, 
SSLNetVConnection *vc, cons
 const char *
 SSLErrorName(int ssl_error)
 {
+#ifdef OPENSSL_IS_BORINGSSL
+  const char *err_descr = SSL_error_description(ssl_error);
+  return err_descr != nullptr ? err_descr : "unknown SSL error";
+#else
+  // Note: This needs some updates as well for quictls.
   static const char *names[] = {
     "SSL_ERROR_NONE",    "SSL_ERROR_SSL",         "SSL_ERROR_WANT_READ",    
"SSL_ERROR_WANT_WRITE", "SSL_ERROR_WANT_X509_LOOKUP",
     "SSL_ERROR_SYSCALL", "SSL_ERROR_ZERO_RETURN", "SSL_ERROR_WANT_CONNECT", 
"SSL_ERROR_WANT_ACCEPT"};
@@ -193,6 +198,7 @@ SSLErrorName(int ssl_error)
   }
 
   return names[ssl_error];
+#endif
 }
 
 void

Reply via email to