Change SHA2 implementation based on OpenSSL to use EVP digest routines
authorMichael Paquier <michael@paquier.xyz>
Mon, 28 Sep 2020 03:47:13 +0000 (12:47 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 28 Sep 2020 03:47:13 +0000 (12:47 +0900)
commite21cbb4b893b85b5f1cf203b9a77ca0d9ee671d1
tree324c72ead54fbb1b02e6a3678557214aef82916e
parent9d299a492454f9ffdf0fd8fe1fd6303c8ddf805a
Change SHA2 implementation based on OpenSSL to use EVP digest routines

The use of low-level hash routines is not recommended by upstream
OpenSSL since 2000, and pgcrypto already switched to EVP as of 5ff4a67.
Note that this also fixes a failure with SCRAM authentication when using
FIPS in OpenSSL, but as there have been few complaints about this
problem and as this causes an ABI breakage, no backpatch is done.

Author: Michael Paquier, Alessandro Gherardi
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/20200924025314.GE7405@paquier.xyz
Discussion: https://postgr.es/m/20180911030250.GA27115@paquier.xyz
src/common/sha2_openssl.c
src/include/common/sha2.h