Re: OpenSSL 3.0.0 compatibility

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: OpenSSL 3.0.0 compatibility
Дата
Msg-id 2F563A2D-5216-4044-8C38-A09E617F9728@yesql.se
обсуждение исходный текст
Ответ на Re: OpenSSL 3.0.0 compatibility  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: OpenSSL 3.0.0 compatibility  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: OpenSSL 3.0.0 compatibility  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
> On 7 Jul 2020, at 19:53, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> Trying to move this along,

Thanks, this has stalled a bit on my TODO.

>> where would be a good place to define
>> OPENSSL_API_COMPAT?  The only place that's shared between frontend and
>> backend code is c.h.  The attached patch does it that way.
>
> pg_config_manual.h, perhaps?

I don't have a strong preference.  When starting hacking on this I went for the
quick and simple option of adding it to CFLAGS in configure.in for the time
being since I wasn't sure where to put it.

A slightly more complicated problem arise when trying to run the pgcrypto
regress tests, and make it run the tests for the now deprecated ciphers, as
they require the legacy provider to be loaded via the openssl configuration
file.  As was mentioned upthread, this requires us to inject our own
openssl.cnf in OPENSSL_CONF, load the legacy provider there and then from that
file include the system openssl.cnf (or override the system one completely
during testing which doesn't seem like a good idea).

Hacking this up in a crude PoC I added a REGRESS_ENV option in pgxs.mk which
then pgcrypto/Makefile could use to set an OPENSSL_CONF, which in turn ends
with a .include=<path> for my system config.  This enables pgcrypto to load
the now deprecated ciphers, but even as PoC's goes this is awfully brittle and
a significant amount of bricks shy.

Actually running the tests with the legacy provider loaded yields a fair number
of errors like these, and somewhere around there I ran out of time for now as
the CF started.

-          decrypt
-----------------------------
- Lets try a longer message.
+                         decrypt
+----------------------------------------------------------
+ Lets try a longer messag\177\177\177\177\177\177\177\177

Memorizing the "cannot load cipher" errors in an alternative output and
documenting how to use old ciphers in pgcrypto together with OpenSSL 3.0.0+
might be the least bad option?  Anyone else have any good ideas on how to get
this into the testrunner?

cheers ./daniel


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk (hash_mem)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk (hash_mem)