From: okada Date: Sun, 19 Nov 2000 21:57:40 +0000 (+0000) Subject: * elmo-imap4.el (elmo-network-authenticate-session): Use `elmo-imap4-login' X-Git-Tag: wl-2_6-root~180 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=11e64f9efaa9b06bab804b44ea481265af9002ae;p=elisp%2Fwanderlust.git * elmo-imap4.el (elmo-network-authenticate-session): Use `elmo-imap4-login' --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index e806a80..b2bf93d 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,34 +1,38 @@ -2000-11-19 Kenichi OKADA +2000-11-20 Kenichi OKADA + + * elmo-imap4.el (elmo-network-authenticate-session): Use `elmo-imap4-login' + +2000-11-20 Kenichi OKADA * elmo-pop3.el (elmo-pop3-auth-apop): Signal `elmo-pop-auth-apop' if error. (elmo-network-authenticate-session): Use `elmo-pop-auth-user' and `elmo-pop-auth-apop'. -2000-11-19 Kenichi OKADA +2000-11-20 Kenichi OKADA * elmo-pop3.el (elmo-network-authenticate-session): Fix for `APOP'. -2000-11-19 Kenichi OKADA +2000-11-20 Kenichi OKADA * elmo-pop3.el (elmo-network-authenticate-session): Split encoded response value. -2000-11-19 Kenichi OKADA +2000-11-20 Kenichi OKADA * elmo-pop3.el (elmo-network-authenticate-session): Abolish `elmo-pop3-force-login'. Redefine `sasl-mechanisms'. * elmo-vars.el (elmo-pop3-force-login): Ditto. -2000-11-19 Kenichi OKADA +2000-11-20 Kenichi OKADA * elmo-imap4.el (toplevel): Delete defun-maybe for sasl-*. Delete `elmo-imap4-authenticator-alist'. (elmo-imap4-auth-cram-md5): Delete. (elmo-imap4-auth-digest-md5): Delete. -2000-11-19 Kenichi OKADA +2000-11-20 Kenichi OKADA * elmo-pop3.el (elmo-pop3-auth-digest-md5): Delete. (elmo-pop3-auth-scram-md5): Ditto. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index b064442..20c3f4d 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1147,20 +1147,20 @@ If optional argument UNMARK is non-nil, unmark." (signal 'elmo-authenticate-error '(login))))) ;;; dirty hack -(defconst sasl-imap4-login-steps - '(sasl-imap4-login-response)) - -(defun sasl-imap4-login-response (client step) - (concat - (sasl-client-name client) - " " - (sasl-read-passphrase - (format "LOGIN passphrase for %s: " (sasl-client-name client))))) - -(put 'sasl-imap4-login 'sasl-mechanism - (sasl-make-mechanism "IMAP4-LOGIN" sasl-imap4-login-steps)) - -(provide 'sasl-imap4-login) +;;;(defconst sasl-imap4-login-steps +;;; '(sasl-imap4-login-response)) +;;; +;;;(defun sasl-imap4-login-response (client step) +;;; (concat +;;; (sasl-client-name client) +;;; " " +;;; (sasl-read-passphrase +;;; (format "LOGIN passphrase for %s: " (sasl-client-name client))))) +;;; +;;;(put 'sasl-imap4-login 'sasl-mechanism +;;; (sasl-make-mechanism "IMAP4-LOGIN" sasl-imap4-login-steps)) +;;; +;;;(provide 'sasl-imap4-login) (luna-define-method elmo-network-initialize-session-buffer :after ((session @@ -1210,36 +1210,39 @@ If optional argument UNMARK is non-nil, unmark." (with-current-buffer (process-buffer (elmo-network-session-process-internal session)) (let* ((auth (elmo-network-session-auth-internal session)) - (auth (mapcar '(lambda (a) - (if (eq a 'plain) - 'imap4-login - a)) - (if (listp auth) auth (list auth))))) +; (auth (mapcar '(lambda (a) +; (if (eq a 'plain) +; 'imap4-login +; a)) +; (if (listp auth) auth (list auth))))) + (auth (if (listp auth) auth (list auth)))) (unless (or (eq elmo-imap4-status 'auth) (null auth)) - (let* ((elmo-imap4-debug-inhibit-logging t) - (sasl-mechanism-alist - (append - sasl-mechanism-alist - (list '("IMAP4-LOGIN" sasl-imap4-login)))) + (if (eq 'plain (car auth)) + (elmo-imap4-login session) + (let* ((elmo-imap4-debug-inhibit-logging t) +; (sasl-mechanism-alist +; (append +; sasl-mechanism-alist +; (list '("IMAP4-LOGIN" sasl-imap4-login)))) (sasl-mechanisms - (append +; (append (delq nil (mapcar '(lambda (cap) (if (string-match "^auth=\\(.*\\)$" (symbol-name cap)) (match-string 1 (upcase (symbol-name cap))))) - (elmo-imap4-session-capability-internal session))) - (list "IMAP4-LOGIN"))) + (elmo-imap4-session-capability-internal session)))) +; (list "IMAP4-LOGIN"))) (mechanism - (if (eq auth 'any) - (sasl-find-mechanism sasl-mechanisms) +; (if (eq auth 'any) +; (sasl-find-mechanism sasl-mechanisms) (sasl-find-mechanism (delq nil (mapcar '(lambda (cap) (upcase (symbol-name cap))) (if (listp auth) auth - (list auth))))))) + (list auth))))));) client name step response tag sasl-read-passphrase) (unless mechanism @@ -1269,11 +1272,11 @@ If optional argument UNMARK is non-nil, unmark." (lambda (prompt) (elmo-get-passwd (elmo-network-session-password-key session))))) - (if (string= name "IMAP4-LOGIN") - (setq tag - (elmo-imap4-send-command - session - (concat "LOGIN " (sasl-step-data step)))) +; (if (string= name "IMAP4-LOGIN") +; (setq tag +; (elmo-imap4-send-command +; session +; (concat "LOGIN " (sasl-step-data step)))) (setq tag (elmo-imap4-send-command session @@ -1283,7 +1286,7 @@ If optional argument UNMARK is non-nil, unmark." " " (elmo-base64-encode-string (sasl-step-data step) - 'no-lin-break))))))) + 'no-lin-break))))));) (catch 'done (while t (setq response (elmo-imap4-read-untagged @@ -1308,7 +1311,7 @@ If optional argument UNMARK is non-nil, unmark." (if (sasl-step-data step) (elmo-base64-encode-string (sasl-step-data step) 'no-line-break) - "")))))))))) + ""))))))))))) (luna-define-method elmo-network-setup-session ((session elmo-imap4-session))