Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B1ADE632A69 for ; Wed, 7 Jul 2010 05:50:20 -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 09139-01; Wed, 7 Jul 2010 08:50:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id BFFE063296A; Wed, 7 Jul 2010 05:50:09 -0300 (ADT) Received: by bwz1 with SMTP id 1so4038979bwz.19 for ; Wed, 07 Jul 2010 01:50:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.85.89 with SMTP id n25mr4753760bkl.105.1278492603949; Wed, 07 Jul 2010 01:50:03 -0700 (PDT) Received: by 10.204.61.208 with HTTP; Wed, 7 Jul 2010 01:50:03 -0700 (PDT) In-Reply-To: <323E0FB3-767F-457F-A041-908B0A805C68@comcast.net> References: <323E0FB3-767F-457F-A041-908B0A805C68@comcast.net> Date: Wed, 7 Jul 2010 10:50:03 +0200 Message-ID: Subject: Re: [TESTERS] Location of certs -Windows 7 SSL mode? From: Magnus Hagander To: Lou Picciano Cc: pgsql-testers , pgsql-bugs Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201007/34 X-Sequence-Number: 27378 On Wed, Jul 7, 2010 at 01:37, Lou Picciano wrote: > [TEST REPORT] > [Release]:=A09.0Beta2 > [Test Type]:=A0Testing=A0connection - pgAdmin - using=A0certificate on Wi= ndows 7 - > Specifically, what is correct default placement of certs? > [Test]:=A0Attempt to connect - SSL required or better - using standard > AppData/Roaming location for certs, key. > [Platform]:=A0Windows 7 Ultimate 64-bit - attempting connection using > pgAdminIII as a test of SSL connectivity. > [Parameters]:=A0First, attempted connection, with SSL required and NO cer= ts, > to determine default location based on error message! > [Failure]:=A0Yes > [Results]:=A0Installation of a pre-packaged PostgreSQL, using an installe= r (in > this case a b1 packaged by EnterpriseDB), did create a postgresql folder = in > the expected location:=A0C:\Users\\AppData\Roaming\postgresql. > =A0After placement of valid certs and key in this folder, cannot connect = in > any SSL mode. > Interestingly, the error message reverses the pathname delimiter, halfway > through the message, from Windows-standard to UNIX-standard (is this > relevant?)... > "Error connecting to the server: could not open certificate file > "C:\Users\\AppData\roaming/postgresql/potgresql.crt": No such f= ile > or directory. The reversed slashes are pretty normal, and should work just fine. What is your connection string? Are you specifying the cert file there as w= ell? Does the file actually exist in that directory? Does the permissions on the file and all the directories leading up to it let you read the file? The code itself should actually "never" do this - it specifically checks if the file doesn't exist, and should *not* show that error.. It should fail much later, when the server actually requests the cert.. And the API documentation for stat() on windows says it'll always return ENOENT on failure. Seems to me Windows is confused, but I'm not entirely sure how. Can you try specifying an explicit file say directly in c:\, just to see if that works? BTW, if you post bug reports to -bugs, it'll make a lot more people see the= m. --=20 Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/