Re: Fetch channel binding digest explicitly with OpenSSL 3.0 and later

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Mark Atwood <mark(at)reviewcommit(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fetch channel binding digest explicitly with OpenSSL 3.0 and later
Date: 2026-08-14 00:37:34
Message-ID: an5jTmaE7n4q-Ib_@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 14, 2026 at 09:23:28AM +0900, Fujii Masao wrote:
> In these cases, algo_name is NULL, so OBJ_nid2sn(algo_nid) is also
> NULL. That means NULL would be passed to %s in both elog() and
> libpq_append_conn_error().

And that's a very stupid thing to do. Not sure what I was thinking
here..

> Isn't it better to use %d and pass algo_nid instead?

And that would be a better thing to do yes. It's a nice copy-pasto
from the pre-3.0 path, which is not wrong as we derive the error from
a EVP_get_digestbynid().

Switching to the NID number in the report is the right call, will fix.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2026-08-14 00:47:06 Re: Report index currently being vacuumed in pg_stat_progress_vacuum
Previous Message Fujii Masao 2026-08-14 00:23:28 Re: Fetch channel binding digest explicitly with OpenSSL 3.0 and later