Disable OpenSSL EVP digest padding in pgcrypto
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Tue, 10 Aug 2021 13:01:52 +0000 (15:01 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Tue, 10 Aug 2021 13:01:52 +0000 (15:01 +0200)
commit318df802355924015d4d8f21859bc0ef7a348970
tree077f11b52eaf7c808c3f4266a91b119bd6914760
parent152c2e0ae1a8d0ed810b2e833b536e64b91da0a6
Disable OpenSSL EVP digest padding in pgcrypto

The PX layer in pgcrypto is handling digest padding on its own uniformly
for all backend implementations. Starting with OpenSSL 3.0.0, DecryptUpdate
doesn't flush the last block in case padding is enabled so explicitly
disable it as we don't use it.

This will be backpatched to all supported version once there is sufficient
testing in the buildfarm of OpenSSL 3.

Reviewed-by: Peter Eisentraut, Michael Paquier
Discussion: https://postgr.es/m/FEF81714-D479-4512-839B-C769D2605F8A@yesql.se
contrib/pgcrypto/openssl.c