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 1nZvqp-00019M-NX for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Mar 2022 14:32:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZvqo-0004XU-KM for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Mar 2022 14:32:38 +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 1nZvqn-0004XL-LA for pgsql-hackers@lists.postgresql.org; Thu, 31 Mar 2022 14:32:38 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZvqk-0003xM-FV for pgsql-hackers@postgresql.org; Thu, 31 Mar 2022 14:32:36 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 76FDD3201E09; Thu, 31 Mar 2022 10:32:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 31 Mar 2022 10:32:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=lylQhe5HyJ53KqDJJIlMTALD/XDem2fxBEM4HaFco sQ=; b=bzSFrHYlwDbtV19RB2MSUZXQDkvhFhQQiLC4bGKIRDa3yS0lFaKkUgBC1 EeD5fE625jTdy9XhvVg/O/+N9mEK6zAkdSFVTt3iHnYb+NWjfzw4kH8Wew9iKKNY +tpblyIOb9Dux46scHevzZ688EXyZvFUo5WVphWn0kJ6acWcR0gGt9BfJ20Sy+lm 9AoSLTD0GAcXPmzYRXcABZHbgtvG10a6QNlSRhGviKvGjPaDPKC518H07FlEIPGH QcIwFM5vpgeb8KodLT3oTMOBm3vAqYWZ/jxcoEW1jq0P4oWOT9+eRCcQkKxHd3Am IWrSj0ZTX1t6HFjxUxqns4/fZysOw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeigedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepfeejgeehteeuhfevvedu leeufedtjeetiefftedvudfhtdeifefgueettdevgefgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 31 Mar 2022 10:32:29 -0400 (EDT) Message-ID: <658f846c-04e0-9391-9ae8-fd698c32637f@enterprisedb.com> Date: Thu, 31 Mar 2022 16:32:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] Accept IP addresses in server certificate SANs Content-Language: en-US To: Jacob Champion , "daniel@yesql.se" , "tgl@sss.pgh.pa.us" Cc: "stark@mit.edu" , "pgsql-hackers@postgresql.org" , "horikyota.ntt@gmail.com" References: <20220318.163857.1357392368287571138.horikyota.ntt@gmail.com> <20220322.133202.1699013732440256188.horikyota.ntt@gmail.com> <5878cc4f261dfac70999be7c10d80e898449e388.camel@vmware.com> <20220323.142007.1816604521514641243.horikyota.ntt@gmail.com> <2da38935f528904f62dd5846767dc53585d8a309.camel@vmware.com> <552429.1648415967@sss.pgh.pa.us> <3F1A8748-DEF8-454C-B7ED-F536CCF7F115@yesql.se> <5EA8D400-9705-463C-B30F-E7A78EE5C8FB@yesql.se> <27dd89aa5bd8fac8fdfdbd33dd460422bcb77d6b.camel@vmware.com> <26dd7e4b482832323e38ba6f08e3651b5c2c5817.camel@vmware.com> From: Peter Eisentraut In-Reply-To: <26dd7e4b482832323e38ba6f08e3651b5c2c5817.camel@vmware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 30.03.22 18:17, Jacob Champion wrote: >> Also, if someone ever >> wants to change how those backend data types work, we then have to check >> a bunch of other code as well. >> >> I think we should be using inet_ntop()/inet_pton() directly here. We >> can throw substitute implementations into libpgport if necessary, that's >> not so difficult. > Is this request satisfied by the implementation of pg_inet_pton() in > patch 0003? If not, what needs to change? Why add a (failry complicated) pg_inet_pton() when a perfectly reasonable inet_pton() exists? I would get rid of all that refactoring and just have your code call inet_pton()/inet_ntop() directly. If you're worried about portability, and you don't want to go through the effort of proving libpgport substitutes, just have your code raise an error in the "#else" code paths. We can fill that in later if there is demand.