(defconst sasl-ntlm-steps
'(ignore ;nothing to do before making
- ;authentication request
sasl-ntlm-request ;authentication request
sasl-ntlm-response) ;response to challenge
"A list of functions to be called in sequnece for the NTLM
authentication steps. Ther are called by 'sasl-next-step.")
-(setq sasl-passwd-hash-function 'ntlm-get-password-hashes)
-
(defun sasl-ntlm-request (client step)
"SASL step function to generate a NTLM authentication request to the server.
Called from 'sasl-next-step.
"SASL step function to generate a NTLM response against the server
challenge stored in the 2nd element of STEP. Called from 'sasl-next-step."
(let* ((user (sasl-client-name client))
- (passwd-hashes
+ (passphrase
(sasl-read-passphrase (format "NTLM passphrase for %s: " user)))
(challenge (sasl-step-data step)))
- (ntlm-build-auth-response challenge user passwd-hashes)))
+ (ntlm-build-auth-response challenge user
+ (ntlm-get-password-hashes passphrase))))
(put 'sasl-ntlm 'sasl-mechanism
(sasl-make-mechanism "NTLM" sasl-ntlm-steps))