pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James William Pye <pgsql@jwp.name>
To: Josh Close <narshe@gmail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: protocol, md5 authentication
Date: Wed, 22 Feb 2006 09:30:10 -0700
Message-ID: <20060222163010.GA13550@lit.jwp.name> (raw)
In-Reply-To: <4a0cafe20602220622g77666533k7564b439e83ce55@mail.gmail.com>
References: <4a0cafe20602220622g77666533k7564b439e83ce55@mail.gmail.com>

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



view thread (7+ messages)  latest in thread

Message-ID: <20060222163010.GA13550@lit.jwp.name>
Permalink:  ../20060222163010.GA13550@lit.jwp.name/
Also on:    postgresql.org/message-id/20060222163010.GA13550@lit.jwp.name

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pgsql@jwp.name, narshe@gmail.com
  Subject: Re: protocol, md5 authentication
  In-Reply-To: <20060222163010.GA13550@lit.jwp.name>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox