;;;; Programmer: Kevin M. Rosenberg\r
;;;; Date Started: Aug 2002\r
;;;;\r
-;;;; $Id: clsql-postgresql-socket.asd,v 1.14 2002/10/21 07:14:18 kevin Exp $\r
+;;;; $Id: clsql-postgresql-socket.asd,v 1.15 2003/03/02 20:02:02 kevin Exp $\r
;;;;\r
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg\r
;;;;\r
:depends-on ("postgresql-socket-package"))\r
(:file "postgresql-socket-sql"\r
:depends-on ("postgresql-socket-api")))))\r
- :depends-on (:clsql-base :uffi))\r
+ :depends-on (:clsql-base :uffi :md5))\r
;;;;
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: postgresql-socket-api.lisp,v 1.2 2002/10/21 07:45:50 kevin Exp $
+;;;; $Id: postgresql-socket-api.lisp,v 1.3 2003/03/02 20:02:02 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
:database database :user user
:password (or password ""))))
+(defun encrypt-md5 (plaintext salt)
+ (string-downcase
+ (format nil "~{~2,'0X~}"
+ (coerce (md5:md5sum-sequence (concatenate 'string plaintext salt)) 'list))))
+
(defun reopen-postgresql-connection (connection)
"Reopen the given PostgreSQL connection. Closes any existing
connection, if it is still open."
socket
(crypt-password
(postgresql-connection-password connection) salt))))
+ (5
+ (let ((salt (make-string 4)))
+ (read-socket-sequence salt socket)
+ (let* ((pwd2 (encrypt-md5 (postgresql-connection-password connection)
+ (postgresql-connection-user connection)))
+ (pwd (encrypt-md5 pwd2 salt)))
+ (send-encrypted-password-message
+ socket
+ (concatenate 'string "md5" pwd)))))
(t
(error 'postgresql-login-error
:connection connection
+cl-sql (1.4.0-2) unstable; urgency=low
+
+ * Add MD5 support to postgresql socket backend (contributed by
+ Robert Macomber)
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Sun, 2 Mar 2003 12:59:10 -0700
+
cl-sql (1.3.0-1) unstable; urgency=low
* uffi/clsql-uffi.lisp: return NIL for numeric fields that are NULL
Package: cl-sql-postgresql
Architecture: all
-Depends: cl-sql-base (>= ${Source-Version}), postgresql-client, cl-sql-uffi (>= ${Source-Version})
+Depends: cl-sql-base (>= ${Source-Version}), postgresql-client, cl-sql-uffi (>= ${Source-Version}), cl-md5
Provides: cl-sql-backend
Description: CLSQL database backend, PostgreSQL
This package enables you to use the CLSQL data access package