From: okada Date: Fri, 16 Feb 2001 19:29:16 +0000 (+0000) Subject: * ntlm.el(TopLevel): Require `poem' X-Git-Tag: slim-1_14_6-0217~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5b2172ae844e298589c1e629e678300f57ad14f;p=elisp%2Fflim.git * ntlm.el(TopLevel): Require `poem' (ntlm-build-auth-request): Omit `request-bufIndex' (ntlm-build-auth-response): Omit `response', `ident' and `msgType' Use `string-as-unibyte' of `poem'. --- diff --git a/ChangeLog b/ChangeLog index e674389..2357173 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2001-02-17 Kenichi OKADA + * ntlm.el(TopLevel): Require `poem' + (ntlm-build-auth-request): Omit `request-bufIndex' + (ntlm-build-auth-response): Omit `response', `ident' and `msgType' + Use `string-as-unibyte' of `poem'. + +2001-02-17 Kenichi OKADA + * sasl-scram.el(sasl-scram-md5-parse-server-msg-1): Error if server's response cannot be parsed. diff --git a/ntlm.el b/ntlm.el index 399cb1a..4dd5568 100644 --- a/ntlm.el +++ b/ntlm.el @@ -63,6 +63,7 @@ ;;; Code: +(require 'poem) (require 'md4) ;;; @@ -81,7 +82,6 @@ is not given." (request-flags (concat (make-string 1 7) (make-string 1 178) (make-string 2 0))) ;0x07 0xb2 0x00 0x00 - (request-bufIndex 0) lu ld off-d off-u) (when (string-match "@" user) (unless domain @@ -112,18 +112,15 @@ the NTLM based server for the user USER and the password hash list PASSWORD-HASHES. NTLM uses two hash values which are represented by PASSWORD-HASHES. PASSWORD-HASHES should be a return value of (list (smb-passwd-hash password) (ntlm-md4hash password))" - (let* ((rchallenge (if (functionp 'string-as-unibyte) - (string-as-unibyte challenge) - challenge)) + (let* ((rchallenge (string-as-unibyte challenge)) ;; get fields within challenge struct - (ident (substring rchallenge 0 8)) ;ident, 8 bytes - (msgType (substring rchallenge 8 12)) ;msgType, 4 bytes + ;;(ident (substring rchallenge 0 8)) ;ident, 8 bytes + ;;(msgType (substring rchallenge 8 12)) ;msgType, 4 bytes (uDomain (substring rchallenge 12 20)) ;uDomain, 8 bytes (flags (substring rchallenge 20 24)) ;flags, 4 bytes (challengeData (substring rchallenge 24 32)) ;challengeData, 8 bytes uDomain-len uDomain-offs ;; response struct and its fields - response lmRespData ;lmRespData, 24 bytes ntRespData ;ntRespData, 24 bytes domain ;ascii domain string