aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-secure-openssl.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-06-27 13:26:17 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-06-27 13:26:17 -0400
commite1cc25f59a8a90d821aaf894e1691575ed94454e (patch)
tree3f8d4b676017b3d205d08bac0e8fad4e4bcafefb /src/interfaces/libpq/fe-secure-openssl.c
parentb63dd3d88f479947ef7fb7cbf5db27de66ae0654 (diff)
downloadpostgresql-e1cc25f59a8a90d821aaf894e1691575ed94454e.tar.gz
postgresql-e1cc25f59a8a90d821aaf894e1691575ed94454e.zip
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.
Diffstat (limited to 'src/interfaces/libpq/fe-secure-openssl.c')
-rw-r--r--src/interfaces/libpq/fe-secure-openssl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index b5b2006b75d..d609a38bbe0 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -1326,11 +1326,13 @@ open_client_SSL(PGconn *conn)
case SSL_R_UNKNOWN_PROTOCOL:
case SSL_R_UNKNOWN_SSL_VERSION:
case SSL_R_UNSUPPORTED_SSL_VERSION:
- case SSL_R_VERSION_TOO_HIGH:
- case SSL_R_VERSION_TOO_LOW:
case SSL_R_WRONG_SSL_VERSION:
case SSL_R_WRONG_VERSION_NUMBER:
case SSL_R_TLSV1_ALERT_PROTOCOL_VERSION:
+#ifdef SSL_R_VERSION_TOO_HIGH
+ case SSL_R_VERSION_TOO_HIGH:
+ case SSL_R_VERSION_TOO_LOW:
+#endif
appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("This may indicate that the server does not support any SSL protocol version between %s and %s.\n"),
conn->ssl_min_protocol_version ?