Function: imap-digest-md5-auth
imap-digest-md5-auth is a byte-compiled function defined in
imap.el.gz.
Signature
(imap-digest-md5-auth BUFFER)
Documentation
Login to server using the AUTH DIGEST-MD5 method.
Source Code
;; Defined in /usr/src/emacs/lisp/net/imap.el.gz
(defun imap-digest-md5-auth (buffer)
"Login to server using the AUTH DIGEST-MD5 method."
(message "imap: Authenticating using DIGEST-MD5...")
(imap-interactive-login
buffer
(lambda (user passwd)
(let ((tag
(imap-send-command
(list
"AUTHENTICATE DIGEST-MD5"
(lambda (challenge)
(digest-md5-parse-digest-challenge
(base64-decode-string challenge))
(let* ((digest-uri
(digest-md5-digest-uri
"imap" (digest-md5-challenge 'realm)))
(response
(digest-md5-digest-response
user passwd digest-uri)))
(base64-encode-string response 'no-line-break))))
)))
(if (not (eq (imap-wait-for-tag tag) 'INCOMPLETE))
nil
(setq imap-continuation nil)
(imap-send-command-1 "")
(imap-ok-p (imap-wait-for-tag tag)))))))