From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add bound checks for ssl_min_protocol_version and ssl_max_protoc
Date: Mon, 23 Mar 2020 02:03:35 +0000
Message-ID: <E1jGCRD-0003M2-4s@gemulon.postgresql.org> (raw)
Add bound checks for ssl_min_protocol_version and ssl_max_protocol_version
Mixing incorrect bounds in the SSL context leads to confusing error
messages generated by OpenSSL which are hard to act on. New range
checks are added when both min/max parameters are loaded in the context
of a SSL reload to improve the error reporting. Note that this does not
make use of the GUC hook machinery contrary to 41aadee, as there is no
way to ensure a consistent range check (except if there is a way one day
to define range types for GUC parameters?). Hence, this patch applies
only to OpenSSL, and uses a logic similar to other parameters to trigger
an error when reloading the SSL context in a session.
Author: Michael Paquier
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/20200114035420.GE1515@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/79dfa8afb296e1b0dcffbe674e04c5f25cc13dfd
Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 65 ++++++++++++++++++++++++-----------
src/test/ssl/t/001_ssltests.pl | 18 +++++++++-
2 files changed, 62 insertions(+), 21 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Add bound checks for ssl_min_protocol_version and ssl_max_protoc
In-Reply-To: <E1jGCRD-0003M2-4s@gemulon.postgresql.org>
References: <E1jGCRD-0003M2-4s@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox