diff options
author | Michael Paquier <michael@paquier.xyz> | 2020-04-30 13:39:10 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2020-04-30 13:39:10 +0900 |
commit | 401aad67045b2d467571b54abe229fdd115a228c (patch) | |
tree | 54d04d6e61baf739682eba1cf082c48ba9af4e43 /src/interfaces/libpq/fe-secure-openssl.c | |
parent | 4ad047a6eac356436b88681a9383a52cde2ffe9c (diff) | |
download | postgresql-401aad67045b2d467571b54abe229fdd115a228c.tar.gz postgresql-401aad67045b2d467571b54abe229fdd115a228c.zip |
Rename connection parameters to control min/max SSL protocol version in libpq
The libpq parameters ssl{max|min}protocolversion are renamed to use
underscores, to become ssl_{max|min}_protocol_version. The related
environment variables still use the names introduced in commit ff8ca5f
that added the feature.
Per complaint from Peter Eisentraut (this was also mentioned by me in
the original patch review but the issue got discarded).
Author: Daniel Gustafsson
Reviewed-by: Peter Eisentraut, Michael Paquier
Discussion: https://postgr.es/m/b319e449-318d-e691-4997-1327e166fcc4@2ndquadrant.com
Diffstat (limited to 'src/interfaces/libpq/fe-secure-openssl.c')
-rw-r--r-- | src/interfaces/libpq/fe-secure-openssl.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index 731aa23c553..ddeeb606f5b 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -842,18 +842,18 @@ initialize_SSL(PGconn *conn) SSL_CTX_set_options(SSL_context, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); /* Set the minimum and maximum protocol versions if necessary */ - if (conn->sslminprotocolversion && - strlen(conn->sslminprotocolversion) != 0) + if (conn->ssl_min_protocol_version && + strlen(conn->ssl_min_protocol_version) != 0) { int ssl_min_ver; - ssl_min_ver = ssl_protocol_version_to_openssl(conn->sslminprotocolversion); + ssl_min_ver = ssl_protocol_version_to_openssl(conn->ssl_min_protocol_version); if (ssl_min_ver == -1) { printfPQExpBuffer(&conn->errorMessage, libpq_gettext("invalid value \"%s\" for minimum version of SSL protocol\n"), - conn->sslminprotocolversion); + conn->ssl_min_protocol_version); SSL_CTX_free(SSL_context); return -1; } @@ -871,18 +871,18 @@ initialize_SSL(PGconn *conn) } } - if (conn->sslmaxprotocolversion && - strlen(conn->sslmaxprotocolversion) != 0) + if (conn->ssl_max_protocol_version && + strlen(conn->ssl_max_protocol_version) != 0) { int ssl_max_ver; - ssl_max_ver = ssl_protocol_version_to_openssl(conn->sslmaxprotocolversion); + ssl_max_ver = ssl_protocol_version_to_openssl(conn->ssl_max_protocol_version); if (ssl_max_ver == -1) { printfPQExpBuffer(&conn->errorMessage, libpq_gettext("invalid value \"%s\" for maximum version of SSL protocol\n"), - conn->sslmaxprotocolversion); + conn->ssl_max_protocol_version); SSL_CTX_free(SSL_context); return -1; } |