X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A3CF33A5DF3 for ; Sun, 5 Dec 2004 19:27:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51623-07 for ; Sun, 5 Dec 2004 19:27:42 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 582EA3A5DD5 for ; Sun, 5 Dec 2004 19:27:42 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id iB5JRXpr028002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 5 Dec 2004 12:27:36 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id iB5JRX8o085110; Sun, 5 Dec 2004 12:27:33 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id iB5JRXdc085109; Sun, 5 Dec 2004 12:27:33 -0700 (MST) (envelope-from mfuhr) Date: Sun, 5 Dec 2004 12:27:33 -0700 From: Michael Fuhr To: Steve Atkins Cc: pgsql-general@postgresql.org Subject: Re: SSL confirmation Message-ID: <20041205192733.GA4596@winnie.fuhr.org> References: <7B8F2685-46D8-11D9-BFCB-0003938366A4@jibeya.com> <333EE0F2-46DE-11D9-BFCB-0003938366A4@jibeya.com> <87r7m4isom.fsf@gate450.dyndns.org> <3E054141-46E4-11D9-8B7A-0003938366A4@jibeya.com> <87k6rwiq2a.fsf@gate450.dyndns.org> <20041205182757.GA46671@winnie.fuhr.org> <20041205190233.GA31145@gp.word-to-the-wise.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041205190233.GA31145@gp.word-to-the-wise.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/295 X-Sequence-Number: 69907 On Sun, Dec 05, 2004 at 11:02:33AM -0800, Steve Atkins wrote: > On Sun, Dec 05, 2004 at 11:27:57AM -0700, Michael Fuhr wrote: > > > > You can use psql to check if SSL is working. Psql prints a message > > like the following if SSL was successfully negotiated: > > > > SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) > > I tend to fire up ethereal and look at the data stream to make absolutely > sure that my app is doing SSL to postgresql. Doesn't hurt to be sure. > I've been burnt once or twice by the libpq my app uses not negotiating > SSL correctly while the version of libpq that psql uses being just > fine (dumb build problems on my part, but I'd probably have missed > them without the sanity check of sniffing the connection). On the backend side you can force SSL by using "hostssl" in pg_hba.conf; connections that don't use SSL should then fail instead of silently proceeding unencrypted. On the client side you could set the PGSSLMODE environment variable to "require" (or the older PGREQUIRESSL to "1"), which should tell libpq to attempt only SSL connections. -- Michael Fuhr http://www.fuhr.org/~mfuhr/