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 1rteD1-00GSnf-4p for pgsql-committers@arkaria.postgresql.org; Mon, 08 Apr 2024 01:54:07 +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 1rteD0-00FmrC-92 for pgsql-committers@arkaria.postgresql.org; Mon, 08 Apr 2024 01:54:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rteA1-00FkWc-KW for pgsql-committers@lists.postgresql.org; Mon, 08 Apr 2024 01:51:01 +0000 Received: from fout4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rte9y-001kDz-FF for pgsql-committers@lists.postgresql.org; Mon, 08 Apr 2024 01:51:00 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 953161380218; Sun, 7 Apr 2024 21:50:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 07 Apr 2024 21:50:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1712541057; x=1712627457; bh=cAfDtlmWeA 1vBmxohDBicumHgnc23Mbbdps5NRQFbc8=; b=hYtpA7by9oZkH6AYNH8pkPha20 Su0W3jn+v5t3LmUdXMa72any6knjsRi4ZhQShwHk+hBDeS53F/ZrZ9GQoY9o/AWm zOhIl+GD31IfW/Xx3KtoXK58mwv6byE+7Fw6cV9YWGwjiLw4nRf6N9ZIDC6qQnpW LNiMUUlYUMoMAt6ogmlrvcOkonNPAo0HTXYg+NcLdTfNwxn5ZrdlcC7/eF5Ry3o7 riPeskmMD3o2FUk5J51y71UQA5UVPaImRSI6a1fbk17wV1Yu3fg8TYksCFbIL42t jndMFB9WZ0ANmzRug0LGcY9pIKtoq7cL3EHxcGaU0sJ8HrjpsJUBf0Nbx5iQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712541057; x=1712627457; bh=cAfDtlmWeA1vBmxohDBicumHgnc2 3Mbbdps5NRQFbc8=; b=v5tLnNe3UZ+Y3FrnuV5KjvpDkDq3UN2xDe9PvYeZeorS pqVMg8MkLY1o8Dp2NipyP8JtoIFY0W4E1jjKplfURvdbzp+diPLZ3oP9hjcZClBc HKtUg/3mZpEuyVp5he4EbWpW0O7aAbzqFJkllhPjRa3gZDLqu18HmEnw5ZBEVwZY +J9mPBKQY/NuX7IZz5jHDzrV0aefCQ4H9sRhOserT+kNoztXinxcNnrXp8bmFtjj dC8SGtZ1QCkGMnOFIZc0kjsdj/C8DC2EVNdQS8CpF3HSp+W6FFMHmaYeC4Wnzf06 F/XsgOAIgYBFOtpk36DD/kzjVNGF5/Ko/LTz4XWJdQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 7 Apr 2024 21:50:56 -0400 (EDT) Date: Sun, 7 Apr 2024 18:50:55 -0700 From: Andres Freund To: Heikki Linnakangas Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Send ALPN in TLS handshake, require it in direct SSL connections Message-ID: <20240408015055.xsuahullywpfwyvu@awork3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2024-04-08 01:25:40 +0000, Heikki Linnakangas wrote: > Send ALPN in TLS handshake, require it in direct SSL connections > > libpq now always tries to send ALPN. With the traditional negotiated > SSL connections, the server accepts the ALPN, and refuses the > connection if it's not what we expect, but connecting without ALPN is > still OK. With the new direct SSL connections, ALPN is mandatory. > > NOTE: This uses "TBD-pgsql" as the protocol ID. We must register a > proper one with IANA before the release! > > Author: Greg Stark, Heikki Linnakangas > Reviewed-by: Matthias van de Meent, Jacob Champion My compiler complains: [396/992 42 39%] Compiling C object src/backend/postgres_lib.a.p/libpq_be-secure-openssl.c.o ../../../../../home/andres/src/postgresql/src/backend/libpq/be-secure-openssl.c: In function 'alpn_cb': ../../../../../home/andres/src/postgresql/src/backend/libpq/be-secure-openssl.c:1327:69: warning: ordered comparison of pointer with integer zero [-Wextra] 1327 | if (*out == NULL || *outlen > sizeof(alpn_protos) || outlen <= 0) | ^~ [991/992 1 99%] Linking target src/bin/pg_dump/pg_dump And I think it may show why the warning is a good idea - I assume "*outlen <= 0" was intended? Greetings, Andres Freund