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 1nGVo1-0001Xg-Fe for pgsql-bugs@arkaria.postgresql.org; Sun, 06 Feb 2022 00:53:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nGVnz-00059F-69 for pgsql-bugs@arkaria.postgresql.org; Sun, 06 Feb 2022 00:53:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nGVny-000596-U5 for pgsql-bugs@lists.postgresql.org; Sun, 06 Feb 2022 00:53:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nGVnu-0005Pb-F1 for pgsql-bugs@lists.postgresql.org; Sun, 06 Feb 2022 00:53:24 +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 2160r5U4635761; Sat, 5 Feb 2022 19:53:06 -0500 From: Tom Lane To: Daniel Gustafsson cc: Thomas Munro , Andres Freund , byavuz81@gmail.com, PostgreSQL mailing lists , Heikki Linnakangas , Michael Paquier Subject: Re: BUG #17391: While using --with-ssl=openssl and PG_TEST_EXTRA='ssl' options, SSL tests fail on OpenBSD 7.0 In-reply-to: <621771.1644098845@sss.pgh.pa.us> References: <17391-304f81bcf724b58b@postgresql.org> <20220202213900.h7paogmcge2rtls6@alap3.anarazel.de> <131329.1643851912@sss.pgh.pa.us> <203742.1643866877@sss.pgh.pa.us> <887CBA28-0942-4084-BE09-FBE0D6A1DB53@yesql.se> <621771.1644098845@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sat, 05 Feb 2022 17:07:25 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <635759.1644108785.1@sss.pgh.pa.us> Date: Sat, 05 Feb 2022 19:53:05 -0500 Message-ID: <635760.1644108785@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > I don't have any theory about why "host=localhost" helps. Hah: now I do. The initial connection string set up by Cluster.pm is something like Connection string: port=65130 host=/tmp/ShNzQo5mRv and we happily pass that bogus host name to SSL_set_tlsext_host_name. Apparently, openssl takes such a bogus setting in stride, but libressl not so much. It's not entirely clear to me why this doesn't cause *every* connection attempt to fail, but at any rate Daniel's hack causes this to be overridden with "localhost", keeping SSL_set_tlsext_host_name happy. You can get the same results by setting host='' instead (preventing SSL_set_tlsext_host_name from being called at all). I'd backed into this by diking out the SSL_set_tlsext_host_name call altogether and finding that that also makes the tests pass (after groveling through the libpq source code and finding that that's basically the only way we could be exposing the host setting to libressl). I'd recommend using host='' in the tests, as that more or less replicates what the test author probably expected to happen. The seeming timing problem with the two CRL tests remains. regards, tom lane