Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXOZI-0004Qr-Ip for pgsql-general@arkaria.postgresql.org; Sun, 11 Sep 2022 15:08:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oXOZG-0002X4-FV for pgsql-general@arkaria.postgresql.org; Sun, 11 Sep 2022 15:08:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXOZG-0002Wt-4n for pgsql-general@lists.postgresql.org; Sun, 11 Sep 2022 15:08:18 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oXOZB-0007Lm-4D for pgsql-general@lists.postgresql.org; Sun, 11 Sep 2022 15:08:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 28BF80fk816007; Sun, 11 Sep 2022 11:08:01 -0400 From: Tom Lane To: Sebastien Flaesch cc: "pgsql-general@lists.postgresql.org" Subject: Re: lippq client library and openssl initialization: PQinitOpenSSL() In-reply-to: References: Comments: In-reply-to Sebastien Flaesch message dated "Sun, 11 Sep 2022 10:55:39 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <816005.1662908880.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 11 Sep 2022 11:08:00 -0400 Message-ID: <816006.1662908880@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Sebastien Flaesch writes: > The PostgreSQL doc says that if the application code is initializing Ope= nSSL, it should tell PostgreSQL libpq client library that OpenSSL initiali= zation is already done: > https://www.postgresql.org/docs/14/libpq-ssl.html#LIBPQ-SSL-INITIALIZE > I was wondering if this is still true with OpenSSL 1.1.0+ 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, which should be harmless as far as I can see from the OpenSSL docs. regards, tom lane