From: Jeremy Harris Date: Sun, 12 Apr 2020 15:48:10 +0000 (+0100) Subject: OpenSSL: More info on accept "unsupported protocol" X-Git-Tag: exim-4_94_RC0~22 X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=commitdiff_plain;h=b50e778f1011c618e6f7fd73ac544a5903a29e1a OpenSSL: More info on accept "unsupported protocol" --- diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c index 146ed695d..3f3fd8aa8 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;