Re: Adding support for SSLKEYLOGFILE in the frontend
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Abhishek Chanda <abhishek.becs@gmail.com>
Cc: Jacob Champion <jacob.champion@enterprisedb.com>,
Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-03T15:23:12Z
Lists: pgsql-hackers
Attachments
- v7-0002-Review-fixups.patch (application/octet-stream) patch v7-0002
- v7-0001-Add-support-for-dumping-SSL-keylog-to-a-file.patch (application/octet-stream) patch v7-0001
> On 28 Feb 2025, at 07:20, Abhishek Chanda <abhishek.becs@gmail.com> wrote:
>
> Attached a v6 with O_NOFOLLOW removed, I noticed that it failed on
> windows. Please let me know if I should do this in any other way that
> is portable across platforms.
Not sure if there is a portable way to can support.
required version is 3.4 (from <systemitem class="osname">OpenBSD</systemitem>
- version 7.0).
+ version 7.5).
Bumping the version needs a bit more infrastructure than this. Doing a bit
more research unveiled that there is no need to do this though since LibreSSL
doesn't support keylogging at all, they have only implemented stubs for
compatibility. I've added checks to autoconf and meson to identify the
capability and conditional compilation of the support. The tests are also
updated to reflect this.
- bytes_written = dprintf(fd, "%s\n", line);
We use write(2) everywhere so I've changed to patch to do the same.
The attached 0002 also contains documentation touchups and comments etc. 0001
is your patch from v6.
--
Daniel Gustafsson
Commits
-
Fix sslkeylogfile error handling logging
- a6c0bf93031d 19 (unreleased) landed
- 39f01083facd 18.0 landed
-
Mark sslkeylogfile as Debug option
- 2970c75dd982 18.0 landed
-
libpq: Add support for dumping SSL key material to file
- 2da74d8d6400 18.0 landed