Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C1ED5B5DC17 for ; Mon, 12 Sep 2011 14:21:36 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 08002-08 for ; Mon, 12 Sep 2011 17:21:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fetter.org (173-164-140-181-SFBA.hfc.comcastbusiness.net [173.164.140.181]) by mail.postgresql.org (Postfix) with ESMTP id 2A5BBB5D91F for ; Mon, 12 Sep 2011 14:21:27 -0300 (ADT) Received: by fetter.org (Postfix, from userid 500) id B3A523C0445; Mon, 12 Sep 2011 10:21:26 -0700 (PDT) Date: Mon, 12 Sep 2011 10:21:26 -0700 From: David Fetter To: PG Hackers Subject: Re: [BUGS] BUG #6189: libpq: sslmode=require verifies server certificate if root.crt is present Message-ID: <20110912172126.GA12610@fetter.org> References: <201108310959.p7V9xIRp030425@wwwmaster.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201108310959.p7V9xIRp030425@wwwmaster.postgresql.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.918 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RDNS_DYNAMIC=0.982 X-Spam-Level: X-Archive-Number: 201109/620 X-Sequence-Number: 194809 On Wed, Aug 31, 2011 at 09:59:18AM +0000, Srinivas Aji wrote: > > The following bug has been logged online: > > Bug reference: 6189 > Logged by: Srinivas Aji > Email address: srinivas.aji@emc.com > PostgreSQL version: 9.0.4 > Operating system: Linux > Description: libpq: sslmode=require verifies server certificate if > root.crt is present > Details: > > >From the documentation of sslmode values in > http://www.postgresql.org/docs/9.0/static/libpq-ssl.html , > it looks like libpq will not verify the server certificate when the option > sslmode=require is used, and will perform different levels of certificate > verification in the cases sslmode=verify-ca and sslmode=verify-full. > > The observed behaviour is a bit different. If the ~/.postgresql/root.crt > file (or any other filename set through sslrootcert option) is found, > sslmode=require also performs the same level of certificate verification as > verify-ca. The difference between require and verify-ca is that it is an > error for the file to not exist when sslmode is verify-ca. > > Thanks, > Srinivas It looks to me like there could at least in theory be an attack vector or two that we're not covering with this bug. Anybody want to tackle same? Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate