libpq: Add support for dumping SSL key material to file

Daniel Gustafsson <dgustafsson@postgresql.org>

Commit: 2da74d8d6400975bf73fb0df97c3943ad3ed9a36
Author: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: 2025-04-03T11:16:43Z
Releases: 18.0
libpq: Add support for dumping SSL key material to file

This adds a new connection parameter which instructs libpq to
write out keymaterial clientside into a file in order to make
connection debugging with Wireshark and similar tools possible.
The file format used is the standardized NSS format.

Author: Abhishek Chanda <abhishek.becs@gmail.com>
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com>
Discussion: https://postgr.es/m/CAKiP-K85C8uQbzXKWf5wHQPkuygGUGcufke713iHmYWOe9q2dA@mail.gmail.com

Files

PathChange+/−
configure modified +1 −1
configure.ac modified +1 −1
doc/src/sgml/libpq.sgml modified +24 −0
meson.build modified +1 −0
src/include/pg_config.h.in modified +3 −0
src/interfaces/libpq/fe-connect.c modified +4 −0
src/interfaces/libpq/fe-secure-openssl.c modified +58 −0
src/interfaces/libpq/libpq-int.h modified +1 −0
src/test/ssl/t/001_ssltests.pl modified +27 −0

Documentation touched

Discussion