From 2da74d8d6400975bf73fb0df97c3943ad3ed9a36 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Thu, 3 Apr 2025 13:16:43 +0200 Subject: 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 Co-authored-by: Daniel Gustafsson Reviewed-by: Jacob Champion Discussion: https://postgr.es/m/CAKiP-K85C8uQbzXKWf5wHQPkuygGUGcufke713iHmYWOe9q2dA@mail.gmail.com --- src/interfaces/libpq/fe-connect.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/interfaces/libpq/fe-connect.c') diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 715b5d5aff4..0258d9ace3c 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -401,6 +401,10 @@ static const internalPQconninfoOption PQconninfoOptions[] = { "OAuth-Scope", "", 15, offsetof(struct pg_conn, oauth_scope)}, + {"sslkeylogfile", NULL, NULL, NULL, + "SSL-Key-Log-File", "", 0, /* sizeof("") = 0 */ + offsetof(struct pg_conn, sslkeylogfile)}, + /* Terminating entry --- MUST BE LAST */ {NULL, NULL, NULL, NULL, NULL, NULL, 0} -- cgit v1.2.3