OpenSSL: fix bulid on older library versions
authorJeremy Harris <jgh146exb@wizmail.org>
Mon, 20 Apr 2020 10:30:28 +0000 (11:30 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Mon, 20 Apr 2020 10:30:28 +0000 (11:30 +0100)
Broken-by: a89b6bd32a
src/src/tls-openssl.c

index 26cc986..f7ff459 100644 (file)
@@ -2765,7 +2765,10 @@ if (rc <= 0)
       {
       uschar * s = US"SSL_accept";
       int r = ERR_GET_REASON(ERR_peek_error());
       {
       uschar * s = US"SSL_accept";
       int r = ERR_GET_REASON(ERR_peek_error());
-      if (  r == SSL_R_WRONG_VERSION_NUMBER || r == SSL_R_VERSION_TOO_LOW
+      if (  r == SSL_R_WRONG_VERSION_NUMBER
+#ifdef SSL_R_VERSION_TOO_LOW
+         || r == SSL_R_VERSION_TOO_LOW
+#endif
          || 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);
          || 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);