[exim-cvs] OpenSSL: More info on accept "unsupported protoco…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] OpenSSL: More info on accept "unsupported protocol"
Gitweb: https://git.exim.org/exim.git/commitdiff/b50e778f1011c618e6f7fd73ac544a5903a29e1a
Commit:     b50e778f1011c618e6f7fd73ac544a5903a29e1a
Parent:     0d7a24c68f30ce73df5f0859b2de6a39e74b92bc
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Apr 12 16:48:10 2020 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Apr 12 20:22:44 2020 +0100


    OpenSSL: More info on accept "unsupported protocol"
---
 src/src/tls-openssl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 146ed69..3f3fd8a 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -2764,8 +2764,9 @@ if (rc <= 0)
     case SSL_ERROR_SSL:
       {
       uschar * s = US"SSL_accept";
-      unsigned long e = ERR_peek_error();
-      if (ERR_GET_REASON(e) == SSL_R_WRONG_VERSION_NUMBER)
+      int r = ERR_GET_REASON(ERR_peek_error());
+      if (  r == SSL_R_WRONG_VERSION_NUMBER
+         || r == SSL_R_UNKNOWN_PROTOCOL || r == SSL_R_UNSUPPORTED_PROTOCOL)
     s = string_sprintf("%s (%s)", s, SSL_get_version(server_ssl));
       (void) tls_error(s, NULL, sigalrm_seen ? US"timed out" : NULL, errstr);
       return FAIL;