Re: Direct SSL connection with ALPN and HBA rules

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Direct SSL connection with ALPN and HBA rules
Date: 2024-05-13 13:55:48
Message-ID: CAGECzQSYxd2FM8LzipN0b_6_-pLegBh3S8zdRx10Gyw3wty7ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 13 May 2024 at 15:38, Heikki Linnakangas <hlinnaka(at)iki(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2024-05-13 14:05:03 Re: BitmapHeapScan streaming read user and prelim refactoring
Previous Message Alvaro Herrera 2024-05-13 13:44:40 Re: cataloguing NOT NULL constraints