Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXCKg-0006Sc-Rb for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jan 2018 20:41:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXCKf-00071R-S3 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jan 2018 20:41:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eXCKf-00071H-Al for pgsql-hackers@lists.postgresql.org; Thu, 04 Jan 2018 20:41:45 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eXCKc-0001dw-BU for pgsql-hackers@postgresql.org; Thu, 04 Jan 2018 20:41:43 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 98E1320D38; Thu, 4 Jan 2018 15:41:40 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Thu, 04 Jan 2018 15:41:40 -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-sender:x-me-sender:x-sasl-enc; s=fm1; bh=d/LgcP MvHXqS2KCE69Xs/UlNxJorZTrW+XIQYBnPTYw=; b=pLWq7DXygj/b9lDB4HICGE VlKn3inW8yqp4POUTDR/op4QM6Xr2FquCnXdK7JXrJEdOTcVN7bK1RdLRv1mIuj/ cUbQMeL2h7HrAH1LQguuHkbNyvzv9TYjnkHnIonm8kk5B0EUMdmTBAnAGTH6nKfb 94rXGaPXrPU5CnlN7DygsKFjyr5VBMjRIG2pKViEpJcTNBI4RZHnB3EMDVN0hFiI Aiqwf3Ulh2ubC/MXKdKdy0yfO3IhxcNleUykrBGGgJE5knU60OYrJgTy9TvC2dfK kAq6gkGm3Na5jahRG7EozsbxwceFTwPu4Lg+25dOY6ZGp90fktwil0Hwf8isPV9w == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 1C41E7E34B; Thu, 4 Jan 2018 15:41:40 -0500 (EST) Subject: Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256 To: Michael Paquier References: <6de87398-a9da-aa8b-a4c2-ca06ef8d757c@2ndquadrant.com> <0eeb65bc-7f7d-064f-bbe2-5814c9763873@2ndquadrant.com> <20171222025908.GA11776@paquier.xyz> <63b10730-d6d6-fe96-c86b-b2ef4d320be7@2ndquadrant.com> <20171227002740.GA1727@paquier.xyz> <20171228071900.GA26798@paquier.xyz> Cc: Robert Haas , =?UTF-8?Q?=c3=81lvaro_Hern=c3=a1ndez_Tortosa?= , "pgsql-hackers@postgresql.org" From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <9ac07df0-784a-cb03-a9e1-1454eca16b3b@2ndquadrant.com> Date: Thu, 4 Jan 2018 15:41:39 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20171228071900.GA26798@paquier.xyz> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/28/17 02:19, Michael Paquier wrote: > On Wed, Dec 27, 2017 at 09:27:40AM +0900, Michael Paquier wrote: >> On Tue, Dec 26, 2017 at 03:28:09PM -0500, Peter Eisentraut wrote: >>> On 12/22/17 03:10, Michael Paquier wrote: >>>> Second thoughts on 0002 as there is actually no need to move around >>>> errorMessage if the PGconn* pointer is saved in the SCRAM status data >>>> as both are linked. The attached simplifies the logic even more. >>>> >>> >>> That all looks pretty reasonable. >> >> Thanks for the review. Don't you think that the the refactoring >> simplifications should be done first though? This would result in >> producing the patch set in reverse order. I'll be fine to produce them >> if need be. > > Well, here is a patch set doing the reverse operation: refactoring does > first in 0001 and support for tls-server-end-point is in 0002. Hope this > helps. committed I reorganized the be_tls_get_certificate_hash() and pgtls_get_peer_certificate_hash() functions a bit to not have most of the code in a big if statement. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services