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 1ksabU-00024Y-0z for pgsql-committers@arkaria.postgresql.org; Fri, 25 Dec 2020 00:05:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ksabR-0001wq-RS for pgsql-committers@arkaria.postgresql.org; Fri, 25 Dec 2020 00:05:05 +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 1ksabQ-0001wF-Jm for pgsql-committers@lists.postgresql.org; Fri, 25 Dec 2020 00:05:05 +0000 Received: from [66.111.4.29] (helo=out5-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ksabL-0003aN-4F for pgsql-committers@lists.postgresql.org; Fri, 25 Dec 2020 00:05:04 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6C3F25C00CE; Thu, 24 Dec 2020 19:04:47 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 24 Dec 2020 19:04:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=LDoXt9Kweqy1WATVn0pa0ijS7Lo pQh+IIynA4rVqYrk=; b=KB5oXTaRras9W/s2OA6kgMBNT+PWrjHUtPBtuiDV3Md P5Ny0Sr5OS/zOHKL7PG2b2h4GeE0sgdePAwx8/+STXwym4biteKJBlhC/ei+Ldwc AffNOVEevPxoOPKv0vadMp0wpss76uNr57pPKWncit9yXVjXzuN7JDvvyioBMDUI RCsG+T1XY6FhmgVwb9FKZ3LtKR0UgDoQN9PExYsXclB0eZ1mLvOfuvhBfW+1L54y a8KBq6ocNinBXYiYuqvRYVqNI+Bd1YSHRg4esPmMT+LYBGXvs96ilHBR7OrECDtS WN4ZrV85eFgAeJeB9G+rBdZ6j/UlHi96wTQRpDGygcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=LDoXt9 Kweqy1WATVn0pa0ijS7LopQh+IIynA4rVqYrk=; b=kASfrPoZUi+zGfk1NAMGKk vC26SgkYzn3Yj4QqKS+UCUpSb8RnX4F7J6GTjDnqH4TJ5OXjTt415IzXClLfOjPp fgnGFrOfePeBxcI1fvZy7qDbk3hx8t2NbfvzNIPOjnY/o0oDYlN9m4svxKCUCix4 RtrXeHc0buOvMr+PkSHrjXcR9iuSeeWAdNHCyIPkWLqMLCEhClF/NeeTdMB59Rgr 3G/CVfnBu2yG2pQ2krqYXEk2WfXM9VJCEezgdok5w9XRfAMu7H70hrG+Yi2794TP 7iS4WN6vMJ2zZ7ia2lwFpyjfrnvm657NdHjW4r3wTpbuR4LUBoZm5ZeieY5RtYeQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddutddgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id B4E521080057; Thu, 24 Dec 2020 19:04:45 -0500 (EST) Date: Fri, 25 Dec 2020 09:04:41 +0900 From: Michael Paquier To: Bruce Momjian Cc: Tom Lane , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: move hex_decode() to /common so it can be called from frontend Message-ID: References: <1080268.1608851689@sss.pgh.pa.us> <20201224231620.GA21105@momjian.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0qwXFk9X7XMPgqEw" Content-Disposition: inline In-Reply-To: <20201224231620.GA21105@momjian.us> X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.29 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0qwXFk9X7XMPgqEw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 24, 2020 at 06:16:20PM -0500, Bruce Momjian wrote: > On Thu, Dec 24, 2020 at 06:14:49PM -0500, Tom Lane wrote: >> Bruce Momjian writes: >> > move hex_decode() to /common so it can be called from frontend >>=20 >> The buildfarm seems pretty unimpressed with this. >=20 > Yes, we are working on reverting the ecpg part. Looks like the defense put in place by 6b1c5ca has allowed to catch up a bug here. When base64 has been copied from encode.c to src/common/ for SCRAM (newlines should not be handled by SCRAM, hence the copy), we have done the same. The copied code just returns -1 for error paths. For this case, I think that you should also prefix those functions with "pg_", and also include the encode part for completeness. -- Michael --0qwXFk9X7XMPgqEw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl/lLJkACgkQnvQgOdby QH0n/BAAn81qzGYDOOPLPiB7hj0qVCX9zAcV7YnQGK681PpI88fG7dxtjQf6hVQb 75ShVtazZjneY/sPwS6kLWs378dExQJ5hBGizEuLpHalSHjYI1jBMmwyYCt3XtHd TgJtS+jgsIFFwweWaUPOVCCV20uAN+y72myhYIGWZPFKwFeAyflDWwIdI47c911E R4N85Cvv7SwFURGbQ2D/tf22YcyrfHOFhfYSyE96pxHSoTQdrY24xFcwiOUvQW0M mFQj2ugnEQF5rUCkJjHitdbR2X4ubrChwePbLMI9iNiCG0GZSYf5YJNKn889Bskj iEPOowV+Kw7LujiPOMLNMqd4/KT81qRmNcPWeX3ZNB9YceIJiHzk0ohMi7GapN7y gW3AuP64mn4jieMzvMKcvd/ZfTRbbzrTu67di/c7Mi/ksETLXuY6w42Rdx0W8Fmv kQmjdXV0wf66jLV2t1HqE+shz6ZUCaINTF8Rt6jN2Aa8asXZAlHKeRnfgn1UgbnN 8CyF43cCdNM+/+0afywuJqPbTb7MAMiUXvqnqBN3toOwMOeDIHnXtzWzzy4NZi1N 1MCufSoyjaEXGIBHiA6ejIjcfwJve/MR39hhfHCQICYlk1Z4wkxnS6uqpSM6HiRf YgfRXhoGWdoPtTMEoxPTb0MKvS+DD6Z51V/57b2gOH44l2mKRnE= =o6pF -----END PGP SIGNATURE----- --0qwXFk9X7XMPgqEw--