X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 2F1F89DCC24 for ; Wed, 22 Feb 2006 12:30:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39096-06 for ; Wed, 22 Feb 2006 12:30:10 -0400 (AST) Received: from jwp.name (rhid.com [200.46.204.134]) by postgresql.org (Postfix) with ESMTP id 310E09DCC0D for ; Wed, 22 Feb 2006 12:30:10 -0400 (AST) Received: from lit.jwp.name (ip68-98-77-16.ph.ph.cox.net [68.98.77.16]) by jwp.name (Postfix) with ESMTP id 04012153A0B5; Wed, 22 Feb 2006 16:30:09 +0000 (UTC) Received: by lit.jwp.name (Postfix, from userid 1000) id CD3FA3C6158; Wed, 22 Feb 2006 09:30:10 -0700 (MST) Date: Wed, 22 Feb 2006 09:30:10 -0700 From: James William Pye To: Josh Close Cc: pgsql-interfaces@postgresql.org Subject: Re: protocol, md5 authentication Message-ID: <20060222163010.GA13550@lit.jwp.name> Mail-Followup-To: Josh Close , pgsql-interfaces@postgresql.org References: <4a0cafe20602220622g77666533k7564b439e83ce55@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4a0cafe20602220622g77666533k7564b439e83ce55@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.104 required=5 tests=[AWL=0.104] X-Spam-Score: 0.104 X-Spam-Level: X-Archive-Number: 200602/70 X-Sequence-Number: 6034 On Wed, Feb 22, 2006 at 08:22:51AM -0600, Josh Close wrote: > What is the correct way of MD5 authenticating? libpq implements it properly. I'd suggest looking at the client source. Also, I *think* I have this working correctly in my PQueue module, so if you don't mind a little Python: import md5 pw = md5.new(self.password + self.keywords['user']).hexdigest() pw = 'md5' + md5.new(pw + authmsg.salt).hexdigest() self.password is the password given by the user. self.keywords['user'] is the user name. authmsg.salt is the salt given by the server. Where 'pw' is sent back to the server in a Password message. (mrm, can't remember if/when I tested this.. =\) -- Regards, James William Pye