+2001-02-20 Kenichi OKADA <okada@opaopa.org>
+
+ * tests/test-sasl.el(test-sasl-ntlm-imap): Change name.
+ Delete wrong lines.
+
+2001-02-20 Taro Kawagishi <taro.kawagishi@nokia.com>
+
+ * tests/test-sasl.el(test-sasl-digest-ntlm-imap): New test.
+
2001-02-17 Kenichi OKADA <okada@opaopa.org>
* sasl-ntlm.el(sasl-ntlm-response): self-Hash.
(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
+))