Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1itS9x-0004di-4h for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jan 2020 08:11:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1itS9v-0002ww-Th for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jan 2020 08:11:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1itS9v-0002wo-0r for pgsql-hackers@lists.postgresql.org; Mon, 20 Jan 2020 08:11:43 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1itS9p-0004Wu-2H for pgsql-hackers@lists.postgresql.org; Mon, 20 Jan 2020 08:11:42 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id DBD1C21EBC; Mon, 20 Jan 2020 03:11:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 20 Jan 2020 03:11:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=MougqC32rnzBWWfwRlQN8Js8zMuxVQx99kH8Z9esm f0=; b=Isp87XJjUBOB0kUWuXfZ7uo//UE1M6Y1IR8RdRsHSKQlYLh/yY983knX6 qQhPbx2JPzp2xaZtTNwrzWa60RlqNKZPzhjW+9L2Qe1ho6he+kpQgTs92tvHjsNk OSvgPYoVtjXyKIlaHkqyvZ8YHG4uEpFZbxB5QvM5ZkDME/1mDuZ/f1nwiqLvlD4Z Wcw2S1bCFY53/FVDwr9y1ES9PNrNFge9DZCJuqcyHQDlpi/yl8ic4EnRo/GF4MQI FuznAkaV4uvMUYy97kSE+KOMTZghSzxYt7FloNIbiHg3udg0zgC6WAwTi2wr9m0I 6DYDWXIakKT7Tmx+KO8YLPbl62HHA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeggdduudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeehnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpedvnhguqhhurggurhgrnhhtrdgt ohhmnecukfhppeelfedrvdegvddrvdehhedrudduvdenucfrrghrrghmpehmrghilhhfrh homhepphgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqhhurggurhgrnhhtrdgtohhm necuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from april.pezone.net (p5df2ff70.dip0.t-ipconnect.de [93.242.255.112]) by mail.messagingengine.com (Postfix) with ESMTPA id C195780059; Mon, 20 Jan 2020 03:11:32 -0500 (EST) Subject: Re: Improve errors when setting incorrect bounds for SSL protocols To: Michael Paquier , Daniel Gustafsson References: <20200114035420.GE1515@paquier.xyz> <20200115022805.GB2243@paquier.xyz> Cc: Postgres hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <5342043b-c85f-2fb9-7934-45cf6a64b200@2ndquadrant.com> Date: Mon, 20 Jan 2020 09:11:30 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200115022805.GB2243@paquier.xyz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-01-15 03:28, Michael Paquier wrote: > Good points. And the get routines are not that portable in OpenSSL > either even if HEAD supports 1.0.1 and newer versions... Attached is > an updated patch which uses a GUC check for both parameters, and > provides a hint on top of the original error message. The SSL context > does not get reloaded if there is an error, so the errors from OpenSSL > cannot be triggered as far as I checked (after mixing a couple of > corrent and incorrect combinations manually). The reason this wasn't done originally is that it is not correct to have GUC check hooks that refer to other GUC variables, because otherwise you get inconsistent behavior depending on the order of processing of the assignments. In this case, I think it would work because you have symmetric checks for both variables, but in general it is a problematic strategy. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services