+2000-01-01 Kenichi OKADA <okada@opaopa.org>
+
+ * mime-def.el (mime-library-product): Up.
+ * smtp.el (smtp-authentication-method-alist): Add `digest-md5'.
+ (smtp-auth-digest-md5): New function.
+
1999-12-21 Kenichi OKADA <okada@opaopa.org>
* sasl.el (TopLevel): Autoload `digest-md5' and `scram-md5'.
(eval-when-compile (require 'cl)) ; list*
(eval-and-compile
- (defconst mime-library-product ["SLIM" (1 13 5) "\e$B;3@%$^$_\e(B"]
+ (defconst mime-library-product ["SLIM" (1 13 6) "\e$BEg:jOB2N;R\e(B"]
"Product name, version number and code name of MIME-library package.")
)
(login smtp-auth-login)
(anonymous smtp-auth-anonymous)
(scram-md5 smtp-auth-scram-md5)
+ (digest-md5 smtp-auth-digest-md5)
))
(defcustom smtp-connection-type nil
(not (integerp (car response)))
(>= (car response) 400))
(throw 'done (car (cdr response)))) ))
+
+(defun smtp-auth-digest-md5 (process)
+ "Login to server using the AUTH DIGEST-MD5 method."
+ (let (responce)
+ (smtp-send-command process "AUTH DIGEST-MD5")
+ (setq response (smtp-read-response process))
+ (if (or (null (car response))
+ (not (integerp (car response)))
+ (>= (car response) 400))
+ (throw 'done (car (cdr response))))
+ (digest-md5-parse-digest-challenge
+ (base64-decode-string
+ (substring (car (cdr response)) 4)))
+ (smtp-send-command process
+ (base64-encode-string
+ (digest-md5-digest-response
+ smtp-authentication-user
+ smtp-authentication-passphrase
+ (digest-md5-digest-uri
+ "smtp" (digest-md5-challenge 'realm)))
+ 'no-line-break))
+ (setq response (smtp-read-response process))
+ (if (or (null (car response))
+ (not (integerp (car response)))
+ (>= (car response) 400))
+ (throw 'done (car (cdr response))))))
(provide 'smtp)