pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Changing client-side behavior regarding Certificate Revocation Lists (CRL)
6+ messages / 3 participants
[nested] [flat]

* Changing client-side behavior regarding Certificate Revocation Lists (CRL)
@ 2026-08-24 15:34 Михаил Купцов <mr.cuptsov2018@yandex.ru>
  2026-08-25 08:08 ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 1 reply; 6+ messages in thread

From: Михаил Купцов @ 2026-08-24 15:34 UTC (permalink / raw)
  To: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>


------==--bound.991781.5f6e83b2-fcf3-4e6f-9a17-fb4e9ce0204e
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset=utf-8

<div>Dear Hackers,</div><div> </div><div><div>I would like to propose a different approach regarding the client side behavior in terms of working with the list of revoked certificates.</div><div><div>The problem that was discovered is that if a user, using psql, accidentally specifies an incorrect path to a crl file or crl directory, the client part of Postgres ignores the user's error and connects the client to the database whose certificate the client would, in theory, want to check whether the database server certificate has been revoked.</div></div></div><div> </div><div>Regards,</div><div><div>- Michael</div></div>
------==--bound.991781.5f6e83b2-fcf3-4e6f-9a17-fb4e9ce0204e
Content-Disposition: attachment;
	filename="clr_v1.patch"
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
	name="clr_v1.patch"

RnJvbSA3MWRhZDZlZjJmNGViMTFhMzg4YzU0YzFkNmZkZjhjYzJjYTI2MTc5IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiAiTWljaGFlbCBLdXB0c292IiA8bXIuY3VwdHNvdjIwMThAeWFu
ZGV4LnJ1PgpEYXRlOiBNb24sIDMgQXVnIDIwMjYgMTE6MTM6MjggKzA3MDAKU3ViamVjdDogQ2hh
bmdpbmcgY2xpZW50LXNpZGUgYmVoYXZpb3IgcmVnYXJkaW5nIENlcnRpZmljYXRlIFJldm9jYXRp
b24gTG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uX2Vycm9yKGNvbm4sICJjb3VsZCBub3QgZ2V0
IGNlcnQgc3RvcmU6ICVzIiwgZXJyKTsKKwkJCVNTTGVycmZyZWUoZXJyKTsKKwkJCVNTTF9DVFhf
ZnJlZShTU0xfY29udGV4dCk7CisJCQlyZXR1cm4gLTE7CiAJCX0KIAkJaGF2ZV9yb290Y2VydCA9
IHRydWU7CiAJfQotLSAKMi41My4wCgo=
------==--bound.991781.5f6e83b2-fcf3-4e6f-9a17-fb4e9ce0204e--






Attachments:

clr_v1.patch (text/x-diff, 3.5K) download From 71dad6ef2f4eb11a388c54c1d6fdf8cc2ca26179 Mon Sep 17 00:00:00 2001 From: "Michael Kuptsov" <mr.cuptsov2018@yandex.ru> Date: Mon, 3 Aug 2026 11:13:28 +0700 Subject: Changing client-side behavior regarding Certificate Revocation Lists (CRL) --- src/interfaces/libpq/fe-secure-openssl.c | 79 ++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 6 deletions(-) diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index 140cec0e003..1518840041d 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -987,10 +987,12 @@ initialize_SSL(PGconn *conn) { char *fname = NULL; char *dname = NULL; + bool use_sslcrl = (conn->sslcrl && strlen(conn->sslcrl) > 0); + bool use_sslcrldir = (conn->sslcrldir && strlen(conn->sslcrldir) > 0); - if (conn->sslcrl && strlen(conn->sslcrl) > 0) + if (use_sslcrl) fname = conn->sslcrl; - if (conn->sslcrldir && strlen(conn->sslcrldir) > 0) + if (use_sslcrldir) dname = conn->sslcrldir; /* defaults to use the default CRL file */ @@ -1000,16 +1002,81 @@ initialize_SSL(PGconn *conn) fname = fnbuf; } + if (use_sslcrl) + { + if (stat(fname, &buf) != 0) + { + libpq_append_conn_error(conn, "certificate revocation list file \"%s\" does not exist", fname); + SSL_CTX_free(SSL_context); + return -1; + } + if (!S_ISREG(buf.st_mode)) + { + libpq_append_conn_error(conn, "certificate revocation list file \"%s\" is not a regular file", fname); + SSL_CTX_free(SSL_context); + return -1; + } + } + + if (use_sslcrldir) + { + if (stat(dname, &buf) != 0) + { + libpq_append_conn_error(conn, "certificate revocation list directory \"%s\" does not exist", dname); + SSL_CTX_free(SSL_context); + return -1; + } + if (!S_ISDIR(buf.st_mode)) + { + libpq_append_conn_error(conn, "certificate revocation list directory \"%s\" is not a directory", dname); + SSL_CTX_free(SSL_context); + return -1; + } + } + /* Set the flags to check against the complete CRL chain */ if ((fname || dname) && X509_STORE_load_locations(cvstore, fname, dname) == 1) { - X509_STORE_set_flags(cvstore, - X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL); + if (X509_STORE_set_flags(cvstore, + X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL) != 1) + { + char *err = SSLerrmessage(ERR_get_error()); + libpq_append_conn_error(conn, "could not set crl check flags: %s",err); + SSLerrfree(err); + SSL_CTX_free(SSL_context); + return -1; + } } + else + { + char *err = SSLerrmessage(ERR_get_error()); + + if (use_sslcrl) + { + libpq_append_conn_error(conn, "could not load SSL certificate revocation list file \"%s\": %s", fname, err); + SSLerrfree(err); + SSL_CTX_free(SSL_context); + return -1; + } + else if (use_sslcrldir) + { + libpq_append_conn_error(conn, "could not load SSL certificate revocation list directory \"%s\": %s", dname, err); + SSLerrfree(err); + SSL_CTX_free(SSL_context); + return -1; + } - /* if not found, silently ignore; we do not require CRL */ - ERR_clear_error(); + ERR_clear_error(); + } + } + else + { + char *err = SSLerrmessage(ERR_get_error()); + libpq_append_conn_error(conn, "could not get cert store: %s", err); + SSLerrfree(err); + SSL_CTX_free(SSL_context); + return -1; } have_rootcert = true; } -- 2.53.0
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL)
  2026-08-24 15:34 Changing client-side behavior regarding Certificate Revocation Lists (CRL) Михаил Купцов <mr.cuptsov2018@yandex.ru>
@ 2026-08-25 08:08 ` Daniel Gustafsson <daniel@yesql.se>
  2026-08-25 15:24   ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Jacob Champion <jacob.champion@enterprisedb.com>
  2026-08-26 13:40   ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Михаил Купцов <mr.cuptsov2018@yandex.ru>
  0 siblings, 2 replies; 6+ messages in thread

From: Daniel Gustafsson @ 2026-08-25 08:08 UTC (permalink / raw)
  To: Михаил Купцов <mr.cuptsov2018@yandex.ru>; +Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>

> On 24 Aug 2026, at 17:34, Михаил Купцов <mr.cuptsov2018@yandex.ru> wrote:

> I would like to propose a different approach regarding the client side behavior
> in terms of working with the list of revoked certificates.  The problem that
> was discovered is that if a user, using psql, accidentally specifies an
> incorrect path to a crl file or crl directory, the client part of Postgres
> ignores the user's error and connects the client to the database whose
> certificate the client would, in theory, want to check whether the database
> server certificate has been revoked.


I'm sympathetic to the idea of helping the user detect misconfiguration.
However, I wonder how common it is to have a "local default" filename
configured in apps which may or may not be present.  If those users all of a
sudden cannot connect after an upgrade then we didn't really improve anything.

Also, with this patch, users who have placed their CRL to match the default CRL
file location (~/.postgresql/root.crl) won't get an error if that file is
missing even if their intention was to use that file.

I think a stricter CRL policy would need another trigger.

--
Daniel Gustafsson







^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL)
  2026-08-24 15:34 Changing client-side behavior regarding Certificate Revocation Lists (CRL) Михаил Купцов <mr.cuptsov2018@yandex.ru>
  2026-08-25 08:08 ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Daniel Gustafsson <daniel@yesql.se>
@ 2026-08-25 15:24   ` Jacob Champion <jacob.champion@enterprisedb.com>
  2026-08-25 21:36     ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Daniel Gustafsson <daniel@yesql.se>
  1 sibling, 1 reply; 6+ messages in thread

From: Jacob Champion @ 2026-08-25 15:24 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: Михаил Купцов <mr.cuptsov2018@yandex.ru>; pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>

On Tue, Aug 25, 2026 at 1:08 AM Daniel Gustafsson <daniel@yesql.se> wrote:
> I think a stricter CRL policy would need another trigger.

More fuel for the fire of a .libpqrc, maybe?

--Jacob






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL)
  2026-08-24 15:34 Changing client-side behavior regarding Certificate Revocation Lists (CRL) Михаил Купцов <mr.cuptsov2018@yandex.ru>
  2026-08-25 08:08 ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Daniel Gustafsson <daniel@yesql.se>
  2026-08-25 15:24   ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Jacob Champion <jacob.champion@enterprisedb.com>
@ 2026-08-25 21:36     ` Daniel Gustafsson <daniel@yesql.se>
  0 siblings, 0 replies; 6+ messages in thread

From: Daniel Gustafsson @ 2026-08-25 21:36 UTC (permalink / raw)
  To: Jacob Champion <jacob.champion@enterprisedb.com>; +Cc: Михаил Купцов <mr.cuptsov2018@yandex.ru>; pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>

> On 25 Aug 2026, at 17:24, Jacob Champion <jacob.champion@enterprisedb.com> wrote:
> On Tue, Aug 25, 2026 at 1:08 AM Daniel Gustafsson <daniel@yesql.se> wrote:

>> I think a stricter CRL policy would need another trigger.
> 
> More fuel for the fire of a .libpqrc, maybe?

That could certainly be a trigger.  I was also thinking around how we have a
set of sslmodes which cover the usecases of yesteryear with less options for
todays world of security hardening, but .libpqrc is likely a better fit here.

--
Daniel Gustafsson







^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL)
  2026-08-24 15:34 Changing client-side behavior regarding Certificate Revocation Lists (CRL) Михаил Купцов <mr.cuptsov2018@yandex.ru>
  2026-08-25 08:08 ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Daniel Gustafsson <daniel@yesql.se>
@ 2026-08-26 13:40   ` Михаил Купцов <mr.cuptsov2018@yandex.ru>
  2026-08-26 16:34     ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Jacob Champion <jacob.champion@enterprisedb.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Михаил Купцов @ 2026-08-26 13:40 UTC (permalink / raw)
  To: Daniel Gustafsson <daniel@yesql.se>; +Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>

<div><div>I also like the concept of .libprc. But if we think about it within the current state of configuration: let's say the user doesn't want to specify a CRL file, even in the default location (~/.postgresql/root.crl), we, as the client-side of PostgreSQL, have no right to refuse a connection to the database server. In that case, would it be correct to log that the user didn't specify a CRL file (even in (~/.postgresql/root.crl))?</div><div>The idea of ​​the patch is to ensure that the client-side performs stricter configuration checking for CRL files than it currently does.</div><div> </div><div>--</div><div>Michael</div></div><div><br /></div><div><br /></div><div>----------------</div>
                        <div>Кому: Михаил Купцов (mr.cuptsov2018@yandex.ru);<br /></div>
                        <div>Копия: pgsql-hackers@lists.postgresql.org;<br /></div>
                        <div>Тема: Changing client-side behavior regarding Certificate Revocation Lists (CRL);<br /></div>
                        <div>25.08.2026, 15:08, "Daniel Gustafsson" &lt;daniel@yesql.se&gt;:<br /></div>
                        <blockquote><blockquote class="210e7a848e8fcb45wmi-quote"> On 24 Aug 2026, at 17:34, Михаил Купцов &lt;<a href="mailto:mr.cuptsov2018@yandex.ru">mr.cuptsov2018@yandex.ru</a>&gt; wrote:<br /></blockquote><p><br /></p><blockquote class="210e7a848e8fcb45wmi-quote"> I would like to propose a different approach regarding the client side behavior<br /> in terms of working with the list of revoked certificates.  The problem that<br /> was discovered is that if a user, using psql, accidentally specifies an<br /> incorrect path to a crl file or crl directory, the client part of Postgres<br /> ignores the user's error and connects the client to the database whose<br /> certificate the client would, in theory, want to check whether the database<br /> server certificate has been revoked.<br /></blockquote><p><br /><br />I'm sympathetic to the idea of helping the user detect misconfiguration.<br />However, I wonder how common it is to have a "local default" filename<br />configured in apps which may or may not be present.  If those users all of a<br />sudden cannot connect after an upgrade then we didn't really improve anything.<br /><br />Also, with this patch, users who have placed their CRL to match the default CRL<br />file location (~/.postgresql/root.crl) won't get an error if that file is<br />missing even if their intention was to use that file.<br /><br />I think a stricter CRL policy would need another trigger.<br /><br /></p><span class="f55bbb4eeef208e8wmi-sign">-- <br />Daniel Gustafsson<br /></span></blockquote>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL)
  2026-08-24 15:34 Changing client-side behavior regarding Certificate Revocation Lists (CRL) Михаил Купцов <mr.cuptsov2018@yandex.ru>
  2026-08-25 08:08 ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Daniel Gustafsson <daniel@yesql.se>
  2026-08-26 13:40   ` Re: Changing client-side behavior regarding Certificate Revocation Lists (CRL) Михаил Купцов <mr.cuptsov2018@yandex.ru>
@ 2026-08-26 16:34     ` Jacob Champion <jacob.champion@enterprisedb.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Jacob Champion @ 2026-08-26 16:34 UTC (permalink / raw)
  To: Михаил Купцов <mr.cuptsov2018@yandex.ru>; +Cc: Daniel Gustafsson <daniel@yesql.se>; pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>

On Wed, Aug 26, 2026 at 7:00 AM Михаил Купцов <mr.cuptsov2018@yandex.ru> wrote:
> But if we think about it within the current state of configuration:

(We can think about it that way, but I'm not sure it makes sense to
split the difference between the current unhelpful behavior and a new
behavior that must break compatibility in some form anyway. Maybe we
could just implement the desired behavior with a clean break instead;
that's why I mentioned libpqrc.)

> The idea of the patch is to ensure that the client-side performs stricter configuration checking for CRL files than it currently does.

Right, but since Daniel pointed out that this isn't a straight upgrade
in behavior, I don't think it necessarily gets the benefit of an
"incremental improvement" pass.

--Jacob






^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2026-08-26 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-08-24 15:34 Changing client-side behavior regarding Certificate Revocation Lists (CRL) Михаил Купцов <mr.cuptsov2018@yandex.ru>
2026-08-25 08:08 ` Daniel Gustafsson <daniel@yesql.se>
2026-08-25 15:24   ` Jacob Champion <jacob.champion@enterprisedb.com>
2026-08-25 21:36     ` Daniel Gustafsson <daniel@yesql.se>
2026-08-26 13:40   ` Михаил Купцов <mr.cuptsov2018@yandex.ru>
2026-08-26 16:34     ` Jacob Champion <jacob.champion@enterprisedb.com>

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