Skip site navigation (1) Skip section navigation (2)

Re: protocol, md5 authentication

From: James William Pye <pgsql(at)jwp(dot)name>
To: Josh Close <narshe(at)gmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: protocol, md5 authentication
Date: 2006-02-22 16:30:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
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 = + self.keywords['user']).hexdigest()
  pw = 'md5' + + 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

In response to


pgsql-interfaces by date

Next:From: Ibrahim NoorzaieDate: 2006-02-22 16:47:59
Subject: unsubscribe
Previous:From: Tom LaneDate: 2006-02-22 14:28:01
Subject: Re: Finding the pqlib version

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group