| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Mark Atwood <mark(at)reviewcommit(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Fetch channel binding digest explicitly with OpenSSL 3.0 and later |
| Date: | 2026-08-13 01:06:19 |
| Message-ID: | an0Yi32DgDjl6HSs@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Aug 12, 2026 at 10:20:33AM +0900, Michael Paquier wrote:
> Now I think that this patch should be reworked in a style closer to
> what has been done in 1f3b9bb109b8 and b91f79cd08ab:
> - Keep the variable declarations at the top of each function. For
> example algo_type is shared between the pre-3.0 block and the post-3.0
> block. No need for two declarations.
> - The #if parts work as the way as the curly brackets, let's remove
> one level of indentation. Your patch makes the whole diff harder to
> parse and the pre-3.0 code is still the same.
> - Minimization of the diffs by planting more #if blocks. Here I am
> looking at the EVP_MD_free() calls. Let's minimize the duplicated
> libpq_append_conn_error() and elog(ERROR) calls in the final result.
As this part was itching me, I have taken a shot at simplifying the
patch, and it looks much better once adapted among these lines. The
EVP_MD_free() feel slightly annoying, but they're isolated enough that
they don't matter to me. A second thing is the const marker for
EVP_MD, which avoids some casts or some unconstify(). At the end that
feels like the best thing to do.
Attached is the refined version. Comments and/or objections?
--
Michael
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Use-explicit-fetching-of-digests-in-channel-bindi.patch | text/plain | 4.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2026-08-13 01:11:11 | Re: DOCS - ALTER PUBLICATION - description has confusing slash-list |
| Previous Message | Junwang Zhao | 2026-08-13 00:58:20 | Re: Fix small psql slash option leaks |