From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Abhishek Chanda <abhishek(dot)becs(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Adding support for SSLKEYLOGFILE in the frontend |
Date: | 2025-03-14 08:34:26 |
Message-ID: | EB2966F0-8F94-46D4-8008-66AFE86CA569@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 14 Mar 2025, at 00:02, Abhishek Chanda <abhishek(dot)becs(at)gmail(dot)com> wrote:
>
> Thanks, Daniel.
>
> Should there be the ifdef guard in here as well?
>
> + {"sslkeylogfile", NULL, NULL, NULL,
> + "SSL-Key-Log-File", "", 0, /* sizeof("") = 0 */
> + offsetof(struct pg_conn, sslkeylogfile)},
No, we want the option to work even if the feature doesn't in order to not make
connection strings dependent on compilation options.
> A small nit, this line should say NULL
>
> + /* line is guaranteed by OpenSSL to be NUL terminated */
The variable is terminated by the NUL character so I believe this is actually
correct, if you look around in the source tree you'll find many more
references.
> On Thu, Mar 13, 2025 at 5:07 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>
>>> On 13 Mar 2025, at 19:31, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>
>>> Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> writes:
>>>> Adding the PG prefix to the envvar name addresses my collision
>>>> concern, but I think Tom's comment upthread [1] was saying that we
>>>> should not provide any envvar at all:
>>>
>>>>> I think it might be safer if we only accepted it as a connection
>>>>> parameter and not via an environment variable.
>>>
>>>> Is the addition of the PG prefix enough to address that concern too?
>>>
>>> Indeed, I was advocating for *no* environment variable. The PG prefix
>>> does not comfort me.
>>
>> Attached is a rebased version which fixes the test failure under autoconf (I
>> had missed git adding the configure file..) and Windows where the backslashes
>> weren't escaped properly. It also removes the environment variable and has
>> documentation touchups.
--
Daniel Gustafsson
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Herrera | 2025-03-14 08:35:15 | Re: Minor rework of ALTER TABLE SET RelOptions code |
Previous Message | Peter Eisentraut | 2025-03-14 08:32:51 | Re: pg_attribute_noreturn(), MSVC, C11 |