Re: OpenSSL 3.0.0 compatibility

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-11T13:08:20Z
Lists: pgsql-hackers
On Thu, Mar 11, 2021 at 11:41:22AM +0100, Daniel Gustafsson wrote:
> .. and apply the padding changes as proposed in a patch upthread
> like this (these  work for all OpenSSL versions I've tested, and I'm
> rather more puzzled as to  why we got away with not having them in
> the past):

No objections from here to disable the padding and tighten a bit the
error checks on the amount of data encrypted or decrypted based on
the block size.  This indeed works correctly down to OpenSSL 1.0.1 as
far as I have tested, so let's extract this part first, and figure the
rest after there is a beta.
--
Michael

Commits

  1. Define OPENSSL_API_COMPAT

  2. Add alternative output for OpenSSL 3 without legacy loaded

  3. Disable OpenSSL EVP digest padding in pgcrypto

  4. pgcrypto: Check for error return of px_cipher_decrypt()

  5. OpenSSL 3.0.0 compatibility in tests

  6. Make ssl certificate for ssl_passphrase_callback test via Makefile

  7. Provide a TLS init hook