Re: Fix error handling in be_tls_open_server()

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Sergey Shinderuk <s.shinderuk@postgrespro.ru>
Cc: Daniel Gustafsson <daniel@yesql.se>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2023-08-25T01:25:32Z
Lists: pgsql-hackers
On Thu, Aug 24, 2023 at 12:13:18PM +0300, Sergey Shinderuk wrote:
> But I need to force malloc to fail at the right time during the test. I
> don't think I can make a stable and portable test from this.

LD_PRELOAD is the only thing I can think about, but that's very fancy.
Even with that, having a certificate with a NULL peer_cn could prove
to be useful in the SSL suite to stress more patterns around it?
--
Michael

Commits

  1. Avoid potential pfree on NULL on OpenSSL errors