Re: OpenSSL 3.0.0 compatibility
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-29T10:25:05Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-OpenSSL-3-support-in-pgcrypto-v3.patch (application/octet-stream) patch v3-0001
> On 22 Sep 2020, at 14:01, Daniel Gustafsson <daniel@yesql.se> wrote: > >> On 22 Sep 2020, at 11:37, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote: >> >> On 2020-09-18 16:11, Daniel Gustafsson wrote: >>> Since we support ciphers that are now deprecated, we have no other choice than >>> to load the legacy provider. >> >> Well, we could just have deprecated ciphers fail, unless the user loads the legacy provider in the OS configuration. There might be an argument that that is more proper. > > Thats a fair point. The issue I have with that is that we'd impose a system > wide loading of the legacy provider, impacting other consumers of libssl as > well. After another round of thinking on this, somewhat spurred on by findings in the the nearby FIPS thread, I'm coming around to this idea. Looking at SCRAM+FIPS made me realize that we can't enforce FIPS mode in pgcrypto via the OpenSSL configuration file, since pgcrypto doesn't load the config. The automatic initialization in 1.1.0+ will however load the config file, so not doing it for older versions makes pgcrypto inconsistent. Thus, I think we should make sure that pgcrypto loads the configuratio for all OpenSSL versions, and defer the provider decision in 3.0.0 to the users. This makes the patch minimally intrusive while making pgcrypto behave consistently (and giving 3.0.0 users the option to not run legacy). The attached adds config loading to pgcrypto for < 1.1.0 and a doc notice for enabling the legacy provider in 3.0.0. This will require an alternative output file for non-legacy configs, but that should wait until 3.0.0 is GA since the returned error messages have changed over course of development and may not be set in stone just yet. cheers ./daniel
Commits
-
Define OPENSSL_API_COMPAT
- 96f96398d398 11.21 landed
- 265c9138da58 12.16 landed
- 8aa9a26236aa 13.12 landed
- 4d3db13621be 14.0 landed
-
Add alternative output for OpenSSL 3 without legacy loaded
- eb643536b9f1 10.19 landed
- 8e7199453bf9 13.5 landed
- 7b6ce36fbab5 12.9 landed
- 6d0001aabf2a 14.0 landed
- 19e91a40bf26 11.14 landed
- 72bbff4cd6ea 15.0 landed
-
Disable OpenSSL EVP digest padding in pgcrypto
- e802b594e794 10.19 landed
- 4fa2b15e1c9c 14.0 landed
- 135d8687adf1 13.5 landed
- 11901cd9628b 11.14 landed
- 00c72da4a22d 12.9 landed
- 318df8023559 15.0 landed
-
pgcrypto: Check for error return of px_cipher_decrypt()
- a69e1506f618 13.5 landed
- 90cfd269f226 12.9 landed
- 841075a65cdc 10.19 landed
- 0f28d267c7e0 11.14 landed
- 22e1943f13b6 14.0 landed
-
OpenSSL 3.0.0 compatibility in tests
- f0d2c65f17ca 13.0 landed
-
Make ssl certificate for ssl_passphrase_callback test via Makefile
- b846091fd0a7 13.0 landed
-
Provide a TLS init hook
- 896fcdb230e7 13.0 cited