Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s2Tbw-003JuQ-RR for pgsql-committers@arkaria.postgresql.org; Thu, 02 May 2024 10:24:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s2Tbu-00HCQW-9X for pgsql-committers@arkaria.postgresql.org; Thu, 02 May 2024 10:24:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s2Tbt-00HCQO-W2 for pgsql-committers@lists.postgresql.org; Thu, 02 May 2024 10:24:18 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s2Tbr-0019ce-A6 for pgsql-committers@lists.postgresql.org; Thu, 02 May 2024 10:24:17 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 688F9300BBB9 for ; Thu, 2 May 2024 12:24:14 +0200 (CEST) Received: from s979.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 582352E29667; Thu, 2 May 2024 12:24:14 +0200 (CEST) Received: from s471.loopia.se (unknown [172.22.191.6]) by s979.loopia.se (Postfix) with ESMTP id 5664410BC49F; Thu, 2 May 2024 12:24:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s471.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s980.loopia.se ([172.22.191.6]) by s471.loopia.se (s471.loopia.se [172.22.190.35]) (amavisd-new, port 10024) with LMTP id 2hsXmteTRrPg; Thu, 2 May 2024 12:24:14 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s980.loopia.se (Postfix) with ESMTPSA id D836A2201698; Thu, 2 May 2024 12:24:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1714645453; bh=BAX55cIdMQSJgsbRh3QTdCO5yoA8JujppGUfC7JiGUk=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=dTXc4Xe3v2fvwkaLYmCeE2ySrKy2ZksxRtOHY9ClZZ3UhHE66xWMlYnjGt2WEDUMr /oYFPfBBIyjY7LAfhdlc0JUVW+wg7EdxCFhx1lTd6lTWFohsFj/2ChOCGGIK/Q+2eS 3EjWNsi+ROqDGDqCt7i2swPa5Yy1kOcQNEjUFz1ddUnui1mFAYwWzoLErUV4xGOpEF wPrqJLiSrxEKNR3Hg7ACmzr6YxO9QEeFki3Y8YfP6GrMdqwt5FlnGvZjJ9vMFSLlu8 LWAZbVPKJV08C+Z/EXScHCG74EyskS8nNSHbQnraYEvcofIUdUAgQvb/Ei7AP37GtI /jojYJxTphEAA== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: pgsql: Fix compilation on OpenSSL 1.0.2 and LibreSSL From: Daniel Gustafsson In-Reply-To: <5f162ff7-02f0-42f4-9473-53cfb7393bc3@iki.fi> Date: Thu, 2 May 2024 12:24:03 +0200 Cc: Heikki Linnakangas , pgsql-committers@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <5EACEB09-BCBC-432A-A5B0-E8FD73808276@yesql.se> References: <1C71E5C4-46BE-46B7-9884-310B25280B49@yesql.se> <5f162ff7-02f0-42f4-9473-53cfb7393bc3@iki.fi> To: Heikki Linnakangas X-Mailer: Apple Mail (2.3774.500.171.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 2 May 2024, at 11:30, Heikki Linnakangas wrote: >=20 > On 02/05/2024 12:09, Daniel Gustafsson wrote: >>> On 30 Apr 2024, at 07:26, Heikki Linnakangas = wrote: >>> Fix compilation on OpenSSL 1.0.2 and LibreSSL >>>=20 >>> SSL_AD_NO_APPLICATION_PROTOCOL was introduced in OpenSSL 1.1.0. >> + * https://github.com/openssl/openssl/issues/24300. This is = available in >> + * OpenSSL 1.1.0 and later, but as of this writing not in = LibreSSL. >> I'm a bit confused, as far as I can tell this has been in LibreSSL = since the >> OpenBSD 6.9 release. >> = https://github.com/openbsd/src/blob/master/lib/libssl/ssl_tlsext.c#L130 >> Or am I missing something? >=20 > Hmm, I'm not sure how exactly LibreSSL is versioned. But morepork runs = OpenBSD 6.9, and it was one of the failing buildfarm members: = https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dmorepork&dt=3D20= 24-04-30%2004%3A30%3A28. Turns out I fat-fingered my grep, it's available starting with OpenBSD = 7.0 so the morepork failure makes sense. > And I don't see the symbol in a fresh checkout of the portable = libressl repository at https://github.com/libressl/portable. The portable repo only contains the portable parts, did you pull the = libssl code with ./autogen? If so you should be able to see it, like below: :~/dev/tls/libressl $ git clone git@github.com:libressl/portable.git :~/dev/tls/libressl $ cd portable/ :~/dev/tls/libressl/portable (master) $ git checkout OPENBSD_7_0 branch 'OPENBSD_7_0' set up to track 'origin/OPENBSD_7_0'. Switched to a new branch 'OPENBSD_7_0' :~/dev/tls/libressl/portable (OPENBSD_7_0) $ ./autogen.sh ... :~/dev/tls/libressl/portable (OPENBSD_7_0) $ cd openbsd/ :~/dev/tls/libressl/portable/openbsd (OPENBSD_7_0) $ git grep = SSL_AD_NO_APPLICATION_PROTOCOL src/lib/libssl/ssl.h:#define SSL_AD_NO_APPLICATION_PROTOCOL = 120 src/lib/libssl/ssl_tlsext.c: *alert =3D = SSL_AD_NO_APPLICATION_PROTOCOL; This makes targeting 7.0 as the lowest LibreSSL version appealing in my patchset for removing support for old OpenSSL and LibreSSL versions. -- Daniel Gustafsson