Re: Fix error handling in be_tls_open_server() - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Fix error handling in be_tls_open_server()
Date
Msg-id B50175D5-6793-40F0-873E-B276D68D45C7@yesql.se
Whole thread Raw
In response to Re: Fix error handling in be_tls_open_server()  (Jacob Champion <jchampion@timescale.com>)
List pgsql-hackers
> On 23 Aug 2023, at 23:47, Jacob Champion <jchampion@timescale.com> wrote:
>
> On Wed, Aug 23, 2023 at 6:23 AM Daniel Gustafsson <daniel@yesql.se> wrote:
>> This has the smell of a theoretical problem, I can't really imagine a
>> certificate where which would produce this.  Have you been able to trigger it?
>>
>> Wouldn't a better fix be to error out on len == -1 as in the attached, maybe
>> with a "Shouldn't happen" comment?
>
> Using "cert clientname=DN" in the HBA should let you issue Subjects
> without Common Names. Or, if you're using a certificate to authorize
> the connection rather than authenticate the user (for example
> "scram-sha-256 clientcert=verify-ca" in your HBA), then the certs you
> distribute could even be SAN-only with a completely empty Subject.

That's a good point, didn't think about those.  In those cases the original
patch by Sergey seems along the right lines.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc?
Next
From: Tom Lane
Date:
Subject: Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc?