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 E08FC9DC9AD for ; Wed, 22 Feb 2006 12:53:52 -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 45142-02 for ; Wed, 22 Feb 2006 12:53:50 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.192]) by postgresql.org (Postfix) with ESMTP id 866979DC8AA for ; Wed, 22 Feb 2006 12:53:47 -0400 (AST) Received: by uproxy.gmail.com with SMTP id y2so793388uge for ; Wed, 22 Feb 2006 08:53:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=BIUCggR/7EcrGqB3PTvX6JHcvhZC8aG8Nn8GuTHBrgRljuSQRVM4nT5pCK81YOMXYWFFbdzPEAVmd68KEOjbV7ocUWa0Vc02vk6ZNy7Cd/T6LmjAXE+ZslUkGE3f07YYgNml90aRQDzULXtJEvGqe5773IM1bpeSqNh/VuIrlYk= Received: by 10.66.184.5 with SMTP id h5mr3285952ugf; Wed, 22 Feb 2006 08:53:45 -0800 (PST) Received: by 10.66.224.11 with HTTP; Wed, 22 Feb 2006 08:53:45 -0800 (PST) Message-ID: <4a0cafe20602220853gc1da9a4gb91d8f3711cb4e50@mail.gmail.com> Date: Wed, 22 Feb 2006 10:53:45 -0600 From: "Josh Close" To: pgsql-interfaces@postgresql.org Subject: Re: protocol, md5 authentication In-Reply-To: <20060222163010.GA13550@lit.jwp.name> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1053_13668481.1140627225526" References: <4a0cafe20602220622g77666533k7564b439e83ce55@mail.gmail.com> <20060222163010.GA13550@lit.jwp.name> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.662 required=5 tests=[AWL=0.661, HTML_MESSAGE=0.001] X-Spam-Score: 0.662 X-Spam-Level: X-Archive-Number: 200602/72 X-Sequence-Number: 6036 ------=_Part_1053_13668481.1140627225526 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > libpq implements it properly. I'd suggest looking at the client source. Where would that be, in the postgres source? And what file? I'm really not too familiar with C. Also, I *think* I have this working correctly in my PQueue module, so if yo= u > don't mind a little Python: > > import md5 > pw =3D md5.new(self.password + self.keywords['user']).hexdigest() > pw =3D '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. Yeah, I love Python. That is actually the way I'm sending it also. I'm connecting via .NET though. I'll have to double check some things. -Josh ------=_Part_1053_13668481.1140627225526 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
libpq implem= ents it properly. I'd suggest looking at the client source.

Where would that be, in the postgres source? And what file? I'm really = not too familiar with C.

Also, I *think* I have this working correctly in my PQueue module, so if yo= u
don't mind a little Python:

  import md5
 &nb= sp;pw =3D md5.new(self.password + self.keywords['user']).hexdigest()
&nb= sp; pw =3D '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.

Yeah, I love Python. Tha= t is actually the way I'm sending it also. I'm connecting via .NET though. I'll have to double check some things.
<= br>-Josh

------=_Part_1053_13668481.1140627225526--