Fix URLs.
[elisp/flim.git] / sasl.el
diff --git a/sasl.el b/sasl.el
index 7565a6c..dd07f13 100644 (file)
--- a/sasl.el
+++ b/sasl.el
@@ -83,7 +83,8 @@
 
 ;;; SCRAM-MD5
 (defvar sasl-scram-md5-client-security-info
-  (scram-make-security-info nil t 0))
+  (eval-when-compile
+    (scram-make-security-info nil t 0)))
 
 (defun sasl-scram-md5-make-salted-pass (server-msg-1 passphrase)
   (scram-md5-make-salted-pass
         client-proof)
       (fillarray client-proof 0))))
             
-(defun sasl-scram-md5-authenticate-server (server-msg-1 
+(defun sasl-scram-md5-authenticate-server (server-msg-1
                                           server-msg-2
                                           client-msg-1
                                           salted-pass)
             (scram-md5-parse-server-msg-1 server-msg-1))
            salted-pass)))
 
+;;; DIGEST-MD5
+
+(defvar sasl-digest-md5-nonce-count 1)
+
+(defun sasl-digest-md5-digest-response (digest-challenge username passwd
+                                                        serv-type host &optional realm)
+  (digest-md5-parse-digest-challenge digest-challenge)
+  (digest-md5-digest-response
+   username
+   (or realm (digest-md5-challenge 'realm)) ;; need to check.
+   passwd
+   (digest-md5-challenge 'nonce)
+   (digest-md5-cnonce)
+   sasl-digest-md5-nonce-count
+   (digest-md5-digest-uri serv-type host) ;; MX host
+   ))
+
 (provide 'sasl)
 
-;;; sasl.el ends here
+;;; sasl.el ends here
\ No newline at end of file