From: okada Date: Fri, 31 Dec 1999 18:25:53 +0000 (+0000) Subject: Happy New Year. X-Git-Tag: slim-1_13_6~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ee1b86160990995d531e6f1723a22e994fb77814;p=elisp%2Fflim.git Happy New Year. * mime-def.el (mime-library-product): Up. * smtp.el (smtp-authentication-method-alist): Add `digest-md5'. (smtp-auth-digest-md5): New function. --- diff --git a/ChangeLog b/ChangeLog index 5e9df68..1c01d67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-01-01 Kenichi OKADA + + * 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 * sasl.el (TopLevel): Autoload `digest-md5' and `scram-md5'. diff --git a/mime-def.el b/mime-def.el index dee6465..ba1736a 100644 --- a/mime-def.el +++ b/mime-def.el @@ -35,7 +35,7 @@ (eval-when-compile (require 'cl)) ; list* (eval-and-compile - (defconst mime-library-product ["SLIM" (1 13 5) "山瀬まみ"] + (defconst mime-library-product ["SLIM" (1 13 6) "島崎和歌子"] "Product name, version number and code name of MIME-library package.") ) diff --git a/sasl.el b/sasl.el index 7565a6c..69c217f 100644 --- a/sasl.el +++ b/sasl.el @@ -135,4 +135,4 @@ (provide 'sasl) -;;; sasl.el ends here +;;; sasl.el ends here \ No newline at end of file diff --git a/smtp.el b/smtp.el index 0a1612b..564bbbb 100644 --- a/smtp.el +++ b/smtp.el @@ -104,6 +104,7 @@ don't define this value." (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 @@ -655,6 +656,32 @@ don't define this value." (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)