Skip to content

Commit e1cc25f

Browse files
committed
Fix list of SSL error codes for older OpenSSL versions.
Apparently 1.0.1 lacks SSL_R_VERSION_TOO_HIGH and SSL_R_VERSION_TOO_LOW. Per buildfarm.
1 parent b63dd3d commit e1cc25f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/backend/libpq/be-secure-openssl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,13 @@ be_tls_open_server(Port *port)
474474
case SSL_R_UNKNOWN_PROTOCOL:
475475
case SSL_R_UNKNOWN_SSL_VERSION:
476476
case SSL_R_UNSUPPORTED_SSL_VERSION:
477-
case SSL_R_VERSION_TOO_HIGH:
478-
case SSL_R_VERSION_TOO_LOW:
479477
case SSL_R_WRONG_SSL_VERSION:
480478
case SSL_R_WRONG_VERSION_NUMBER:
481479
case SSL_R_TLSV1_ALERT_PROTOCOL_VERSION:
480+
#ifdef SSL_R_VERSION_TOO_HIGH
481+
case SSL_R_VERSION_TOO_HIGH:
482+
case SSL_R_VERSION_TOO_LOW:
483+
#endif
482484
give_proto_hint = true;
483485
break;
484486
default:

src/interfaces/libpq/fe-secure-openssl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,11 +1326,13 @@ open_client_SSL(PGconn *conn)
13261326
case SSL_R_UNKNOWN_PROTOCOL:
13271327
case SSL_R_UNKNOWN_SSL_VERSION:
13281328
case SSL_R_UNSUPPORTED_SSL_VERSION:
1329-
case SSL_R_VERSION_TOO_HIGH:
1330-
case SSL_R_VERSION_TOO_LOW:
13311329
case SSL_R_WRONG_SSL_VERSION:
13321330
case SSL_R_WRONG_VERSION_NUMBER:
13331331
case SSL_R_TLSV1_ALERT_PROTOCOL_VERSION:
1332+
#ifdef SSL_R_VERSION_TOO_HIGH
1333+
case SSL_R_VERSION_TOO_HIGH:
1334+
case SSL_R_VERSION_TOO_LOW:
1335+
#endif
13341336
appendPQExpBuffer(&conn->errorMessage,
13351337
libpq_gettext("This may indicate that the server does not support any SSL protocol version between %s and %s.\n"),
13361338
conn->ssl_min_protocol_version ?

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy