Re: Direct SSL connection with ALPN and HBA rules - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Direct SSL connection with ALPN and HBA rules
Date
Msg-id CAGECzQSYxd2FM8LzipN0b_6_-pLegBh3S8zdRx10Gyw3wty7ww@mail.gmail.com
Whole thread Raw
In response to Re: Direct SSL connection with ALPN and HBA rules  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Direct SSL connection with ALPN and HBA rules
List pgsql-hackers
On Mon, 13 May 2024 at 15:38, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> Here's a patch to implement that.

+       if (conn->sslnegotiation[0] == 'd' &&
+           conn->sslmode[0] != 'r' && conn->sslmode[0] != 'v')

I think these checks should use strcmp instead of checking magic first
characters. I see this same clever trick is used in the recently added
init_allowed_encryption_methods, and I think that should be changed to
use strcmp too for readability.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: cataloguing NOT NULL constraints
Next
From: Melanie Plageman
Date:
Subject: Re: BitmapHeapScan streaming read user and prelim refactoring