;;; sasl.el --- SASL client framework
-;; Copyright (C) 2000 Daiki Ueno
+;; Copyright (C) 2000 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: SASL
;;;
(defun sasl-make-mechanism (name steps)
- "Make an authenticator.
+ "Make an authentication mechanism.
NAME is a IANA registered SASL mechanism name.
STEPS is list of continuation function."
(vector name
(defun sasl-step-data (step)
"Return the data which STEP holds, a string."
- (if (vectorp step)
- (aref step 1)))
+ (aref step 1))
(defun sasl-step-set-data (step data)
"Store DATA string to STEP."
- (if (vectorp step)
- (aset step 1 data)
- (vector nil data)))
+ (aset step 1 data))
(defun sasl-next-step (client step)
"Evaluate the challenge and prepare an appropriate next response.
sasl-login-response-2))
(defun sasl-login-response-1 (client step)
- (unless (string= (sasl-step-data step) "Username:")
- (sasl-error (format "Unexpected response: %s" (sasl-step-data step))))
+;;; (unless (string-match "^Username:" (sasl-step-data step))
+;;; (sasl-error (format "Unexpected response: %s" (sasl-step-data step))))
(sasl-client-name client))
(defun sasl-login-response-2 (client step)
- (unless (string= (sasl-step-data step) "Password:")
- (sasl-error (format "Unexpected response: %s" (sasl-step-data step))))
+;;; (unless (string-match "^Password:" (sasl-step-data step))
+;;; (sasl-error (format "Unexpected response: %s" (sasl-step-data step))))
(sasl-read-passphrase
(format "LOGIN passphrase for %s: " (sasl-client-name client))))
;;; ANONYMOUS (RFC2245)
(defconst sasl-anonymous-steps
- '(identity ;no initial response
+ '(ignore ;no initial response
sasl-anonymous-response))
(defun sasl-anonymous-response (client step)