projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* gnus-cloud.el: New file to provide the Emacs Cloud.
[gnus]
/
lisp
/
ntlm.el
diff --git
a/lisp/ntlm.el
b/lisp/ntlm.el
index
126f668
..
bff3bab
100644
(file)
--- a/
lisp/ntlm.el
+++ b/
lisp/ntlm.el
@@
-1,6
+1,6
@@
;;; ntlm.el --- NTLM (NT LanManager) authentication support
;;; ntlm.el --- NTLM (NT LanManager) authentication support
-;; Copyright (C) 2001, 2007
Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2007
-2014
Free Software Foundation, Inc.
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: NTLM, SASL
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: NTLM, SASL
@@
-9,10
+9,10
@@
;; This file is part of GNU Emacs.
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software
;
you can redistribute it and/or modify
+;; GNU Emacs is free software
:
you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation
; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation
, either version 3 of the License, or
+;;
(at your option)
any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-20,18
+20,16
@@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This library is a direct translation of the Samba release 2.2.0
;; implementation of Windows NT and LanManager compatible password
;; encryption.
;;; Commentary:
;; This library is a direct translation of the Samba release 2.2.0
;; implementation of Windows NT and LanManager compatible password
;; encryption.
-;;
+;;
;; Interface functions:
;; Interface functions:
-;;
+;;
;; ntlm-build-auth-request
;; This will return a binary string, which should be used in the
;; base64 encoded form and it is the caller's responsibility to encode
;; ntlm-build-auth-request
;; This will return a binary string, which should be used in the
;; base64 encoded form and it is the caller's responsibility to encode
@@
-42,7
+40,7
@@
;; (which will be a binary string) as the first argument and to
;; encode the returned string with base64. The second argument user
;; should be given in user@domain format.
;; (which will be a binary string) as the first argument and to
;; encode the returned string with base64. The second argument user
;; should be given in user@domain format.
-;;
+;;
;; ntlm-get-password-hashes
;;
;;
;; ntlm-get-password-hashes
;;
;;
@@
-104,8
+102,8
@@
is not given."
(md4-pack-int16 ld) ;domain field, count field
(md4-pack-int16 ld) ;domain field, max count field
(md4-pack-int32 (cons 0 off-d)) ;domain field, offset field
(md4-pack-int16 ld) ;domain field, count field
(md4-pack-int16 ld) ;domain field, max count field
(md4-pack-int32 (cons 0 off-d)) ;domain field, offset field
- user ;bufer field
- domain ;bufer field
+ user ;buf
f
er field
+ domain ;buf
f
er field
)))
(eval-when-compile
)))
(eval-when-compile
@@
-209,16
+207,16
@@
by PASSWORD-HASHES. PASSWORD-HASHES should be a return value of
;; buffer field
lmRespData ;lmResponse, 24 bytes
ntRespData ;ntResponse, 24 bytes
;; buffer field
lmRespData ;lmResponse, 24 bytes
ntRespData ;ntResponse, 24 bytes
- (ntlm-ascii2unicode domain ;
u
nicode domain string, 2*ld bytes
+ (ntlm-ascii2unicode domain ;
U
nicode domain string, 2*ld bytes
(length domain)) ;
(length domain)) ;
- (ntlm-ascii2unicode user ;
u
nicode user string, 2*lu bytes
+ (ntlm-ascii2unicode user ;
U
nicode user string, 2*lu bytes
(length user)) ;
(length user)) ;
- (ntlm-ascii2unicode user ;
u
nicode user string, 2*lu bytes
+ (ntlm-ascii2unicode user ;
U
nicode user string, 2*lu bytes
(length user)) ;
)))
(defun ntlm-get-password-hashes (password)
(length user)) ;
)))
(defun ntlm-get-password-hashes (password)
- "Return a pair of SMB hash and NT MD4 hash of the given password PASSWORD"
+ "Return a pair of SMB hash and NT MD4 hash of the given password PASSWORD
.
"
(list (ntlm-smb-passwd-hash password)
(ntlm-md4hash password)))
(list (ntlm-smb-passwd-hash password)
(ntlm-md4hash password)))
@@
-442,7
+440,7
@@
length of STR is LEN."
(defun ntlm-smb-dohash (in key forw)
"Return the hash value for a string IN and a string KEY.
(defun ntlm-smb-dohash (in key forw)
"Return the hash value for a string IN and a string KEY.
-Length of IN and KEY are 64. FORW non
nil
l means forward, nil means
+Length of IN and KEY are 64. FORW non
-ni
l means forward, nil means
backward."
(let (pk1 ;string of length 56
c ;string of length 28
backward."
(let (pk1 ;string of length 56
c ;string of length 28
@@
-528,7
+526,7
@@
into a Unicode string. PASSWD is truncated to 128 bytes if longer."
(setq len (length passwd))
(if (> len 128)
(setq len 128))
(setq len (length passwd))
(if (> len 128)
(setq len 128))
- ;; Password must be converted to NT
u
nicode
+ ;; Password must be converted to NT
U
nicode
(setq wpwd (ntlm-ascii2unicode passwd len))
;; Calculate length in bytes
(setq len (* len 2))
(setq wpwd (ntlm-ascii2unicode passwd len))
;; Calculate length in bytes
(setq len (* len 2))
@@
-536,5
+534,4
@@
into a Unicode string. PASSWD is truncated to 128 bytes if longer."
(provide 'ntlm)
(provide 'ntlm)
-;;; arch-tag: 348ace18-f8e2-4176-8fe9-d9ab4e96f296
;;; ntlm.el ends here
;;; ntlm.el ends here