From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Revert "Change SHA2 implementation based on OpenSSL to use EVP d
Date: Tue, 29 Sep 2020 00:26:23 +0000
Message-ID: <E1kN3TL-00075A-Tk@gemulon.postgresql.org> (raw)
Revert "Change SHA2 implementation based on OpenSSL to use EVP digest routines"
This reverts commit e21cbb4, as the switch to EVP routines requires a
more careful design where we would need to have at least our wrapper
routines return a status instead of issuing an error by themselves to
let the caller do the error handling. The memory handling was also
incorrect and could cause leaks in the backend if a failure happened,
requiring most likely a callback to do the necessary cleanup as the only
clean way to be able to allocate an EVP context requires the use of an
allocation within OpenSSL. The potential rework of the wrappers also
impacts the fallback implementation when not building with OpenSSL.
Originally, prairiedog has reported a compilation failure, but after
discussion with Tom Lane this needs a better design.
Discussion: https://postgr.es/m/20200928073330.GC2316@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/fe0a1dc52c7332a65b44db8e8408a5fd1d8fc8fb
Modified Files
--------------
src/common/sha2_openssl.c | 63 +++++++++++------------------------------------
src/include/common/sha2.h | 10 ++++----
2 files changed, 19 insertions(+), 54 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Revert "Change SHA2 implementation based on OpenSSL to use EVP d
In-Reply-To: <E1kN3TL-00075A-Tk@gemulon.postgresql.org>
References: <E1kN3TL-00075A-Tk@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox