From: okada Date: Tue, 20 Feb 2001 05:05:54 +0000 (+0000) Subject: New test case. X-Git-Tag: slim-1_14_6~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cdb5f469f61a82b3a3ccc729b7ee9c9d9205ca46;p=elisp%2Fflim.git New test case. --- diff --git a/ChangeLog b/ChangeLog index 1d40a06..464535f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-02-20 Kenichi OKADA + + * tests/test-sasl.el(test-sasl-ntlm-imap): Change name. + Delete wrong lines. + +2001-02-20 Taro Kawagishi + + * tests/test-sasl.el(test-sasl-digest-ntlm-imap): New test. + 2001-02-17 Kenichi OKADA * sasl-ntlm.el(sasl-ntlm-response): self-Hash. diff --git a/tests/test-sasl.el b/tests/test-sasl.el index 327a266..1503182 100644 --- a/tests/test-sasl.el +++ b/tests/test-sasl.el @@ -83,3 +83,37 @@ algorithm=md5-sess,charset=utf-8") (lunit-assert (string= (sasl-step-data step) (base64-decode-string "AQAAAMg9jU8CeB4KOfk7sUhSQPs="))))) + +(luna-define-method test-sasl-ntlm-imap ((case test-sasl)) + (let* ((sasl-mechanisms '("NTLM")) + (mechanism + (sasl-find-mechanism '("NTLM"))) + (client + (sasl-make-client mechanism "kawagish@nokiaseap" "imap" "xxx.yyy.com")) + (sasl-read-passphrase + '(lambda (passphrase) + (ntlm-get-password-hashes + "!\"#456secret"))) + step + response) + ;; init + (setq step (sasl-next-step client nil)) + ;; generate authentication request + (sasl-step-set-data step "") + (setq step (sasl-next-step client step)) + (sasl-step-data step) + ;; (base64-encode-string (sasl-step-data step) t) is sent to server + ;; generate response to challenge + (sasl-step-set-data + step + (string-as-unibyte + (base64-decode-string + "TlRMTVNTUAACAAAADAAMADAAAAAFggEApmEjGvh9M8YAAAAAAAAAAAAAAAA8AAAATgBPAEsARQBYAEMA"))) + (setq step (sasl-next-step client step)) + (sasl-step-data step) + (setq response (base64-encode-string (sasl-step-data step) t)) + (lunit-assert + (string= + response "TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABIAEgBwAAAAEAAQAIIAAAAQABAAkgAAAAAAAABiAAAABYIBAIwN9i7qK/9Y31dIDR6JQTaBbjcLJm8Sc6VogMe7fnHP96+eQ5Yf3ys2nIY4rx+iQG4AbwBrAGkAYQBzAGUAYQBwAGsAYQB3AGEAZwBpAHMAaABrAGEAdwBhAGcAaQBzAGgA")) +;;response +))