Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 89FC26327AE for ; Wed, 14 Jul 2010 13:02:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 84142-02 for ; Wed, 14 Jul 2010 16:02:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DEC08632584 for ; Wed, 14 Jul 2010 13:02:20 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o6EG2ISW006812; Wed, 14 Jul 2010 12:02:18 -0400 (EDT) To: Magnus Hagander cc: Christopher Head , pgsql-bugs Subject: Re: BUG #5559: Full SSL verification fails when hostaddr provided In-reply-to: References: <201007130825.o6D8Pepl005798@wwwmaster.postgresql.org> <18252.1279058967@sss.pgh.pa.us> Comments: In-reply-to Magnus Hagander message dated "Wed, 14 Jul 2010 09:02:12 +0200" Date: Wed, 14 Jul 2010 12:02:18 -0400 Message-ID: <6811.1279123338@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/98 X-Sequence-Number: 27442 Magnus Hagander writes: > On Wed, Jul 14, 2010 at 00:09, Tom Lane wrote: >> "Christopher Head" writes: >>> ... Unfortunately, as per line 536 of the file >>> fe-secure.c in the PostgreSQL sources, if hostaddr is specified, SSL full >>> verification just plain fails without trying at all. I suspect this line >>> should be "if (!conn->pghost)" instead of "if (conn->pghostaddr)". >> >> That's really a definitional change, but it seems like a reasonable one >> to me.  Magnus, what do you think? > Yeah, I think it is, but I haven't had the time to look into the code > yet to see if I agree with the fix as well. Hope to get there soon. The test actually needs to check for pghost being nonempty, I think, but otherwise it seems straightforward. Will apply. regards, tom lane