Re: lippq client library and openssl initialization: PQinitOpenSSL()

2023-04-12 Thread Tom Lane
Daniel Gustafsson writes: > Reviving an old thread that got buried, I propose to apply the attached and > backpatch it as OpenSSL of such vintage is equally likely to be used in old > versions of postgres as current. +1 regards, tom lane

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2023-04-12 Thread Daniel Gustafsson
> On 12 Sep 2022, at 15:47, Tom Lane wrote: > Personally I'd put this up front, more like > > have been initialized by your application, so that > libpq will not also initialize those libraries. > + However, this is unnecessary when using OpenSSL 1.1.0 or later, > + as duplicate initializa

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-12 Thread Tom Lane
Daniel Gustafsson writes: > On 12 Sep 2022, at 13:21, Peter Eisentraut > wrote: >> AFAICT, RHEL 7 ships with an older version. I think that's still pretty >> widespread. > Fair enough. That doesn't however IMO prevent us from adding a note that > 1.1.0 > and onwards are different. The attac

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-12 Thread Daniel Gustafsson
> On 12 Sep 2022, at 13:21, Peter Eisentraut > wrote: > On 11.09.22 23:43, Daniel Gustafsson wrote: >>> On 11 Sep 2022, at 23:35, Tom Lane wrote: >>> Should we document these functions as obsolete when using >>> OpenSSL >= 1.1.0 ? >> Given that 1.1.0+ is very common, it's probably not a bad ide

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-12 Thread Peter Eisentraut
On 11.09.22 23:43, Daniel Gustafsson wrote: On 11 Sep 2022, at 23:35, Tom Lane wrote: Daniel Gustafsson writes: On 11 Sep 2022, at 17:08, Tom Lane wrote: Don't believe so. The HAVE_CRYPTO_LOCK stuff is all obsolete and not compiled if you built against 1.1.0. The only thing left that will

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-11 Thread Daniel Gustafsson
> On 11 Sep 2022, at 23:35, Tom Lane wrote: > > Daniel Gustafsson writes: >> On 11 Sep 2022, at 17:08, Tom Lane wrote: >>> Don't believe so. The HAVE_CRYPTO_LOCK stuff is all obsolete and >>> not compiled if you built against 1.1.0. The only thing left that >>> will happen if you don't call P

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-11 Thread Tom Lane
Daniel Gustafsson writes: > On 11 Sep 2022, at 17:08, Tom Lane wrote: >> Don't believe so. The HAVE_CRYPTO_LOCK stuff is all obsolete and >> not compiled if you built against 1.1.0. The only thing left that >> will happen if you don't call PQinitOpenSSL is an extra call to >> OPENSSL_init_ssl,

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-11 Thread Daniel Gustafsson
> On 11 Sep 2022, at 17:08, Tom Lane wrote: > > Sebastien Flaesch writes: >> The PostgreSQL doc says that if the application code is initializing >> OpenSSL, it should tell PostgreSQL libpq client library that OpenSSL >> initialization is already done: >> https://www.postgresql.org/docs/14/lib

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-11 Thread Tom Lane
Sebastien Flaesch writes: > The PostgreSQL doc says that if the application code is initializing OpenSSL, > it should tell PostgreSQL libpq client library that OpenSSL initialization is > already done: > https://www.postgresql.org/docs/14/libpq-ssl.html#LIBPQ-SSL-INITIALIZE > I was wondering if

Re: lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-11 Thread Jeffrey Walton
On Sun, Sep 11, 2022 at 6:55 AM Sebastien Flaesch wrote: > > The PostgreSQL doc says that if the application code is initializing OpenSSL, > it should tell PostgreSQL libpq client library that OpenSSL initialization is > already done: > > https://www.postgresql.org/docs/14/libpq-ssl.html#LIBPQ-S

lippq client library and openssl initialization: PQinitOpenSSL()

2022-09-11 Thread Sebastien Flaesch
Hello! The PostgreSQL doc says that if the application code is initializing OpenSSL, it should tell PostgreSQL libpq client library that OpenSSL initialization is already done: https://www.postgresql.org/docs/14/libpq-ssl.html#LIBPQ-SSL-INITIALIZE I was wondering if this is still true with Ope