X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fsasl.el;h=9321efdfda823894603f23716f9b787f376830cb;hb=851278bf56a0156a4dd5896e9959f63e33d07ee2;hp=23d8e622751a8648d4a18c3bce3b81bed1b3101d;hpb=8b5af94e55ef83ee46b42d32d92fa1ce95dcacf5;p=gnus diff --git a/lisp/sasl.el b/lisp/sasl.el index 23d8e6227..9321efdfd 100644 --- a/lisp/sasl.el +++ b/lisp/sasl.el @@ -1,6 +1,6 @@ ;;; sasl.el --- SASL client framework -;; Copyright (C) 2000, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2007-2015 Free Software Foundation, Inc. ;; Author: Daiki Ueno ;; Keywords: SASL @@ -35,8 +35,8 @@ ;;; Code: (defvar sasl-mechanisms - '("CRAM-MD5" "DIGEST-MD5" "PLAIN" "LOGIN" "ANONYMOUS" - "NTLM" "SCRAM-MD5")) + '("SCRAM-SHA-1" "CRAM-MD5" "DIGEST-MD5" "PLAIN" "LOGIN" "ANONYMOUS" + "NTLM")) (defvar sasl-mechanism-alist '(("CRAM-MD5" sasl-cram) @@ -45,7 +45,7 @@ ("LOGIN" sasl-login) ("ANONYMOUS" sasl-anonymous) ("NTLM" sasl-ntlm) - ("SCRAM-MD5" sasl-scram))) + ("SCRAM-SHA-1" sasl-scram-rfc))) (defvar sasl-unique-id-function #'sasl-unique-id-function) @@ -86,7 +86,7 @@ The second argument PLIST is the new property list." (setplist (aref client 4) plist)) (defun sasl-client-set-property (client property value) - "Add the given property/value to CLIENT." + "Add the given PROPERTY/VALUE to CLIENT." (put (aref client 4) property value)) (defun sasl-client-property (client property) @@ -103,7 +103,7 @@ The second argument PLIST is the new property list." (defun sasl-make-mechanism (name steps) "Make an authentication mechanism. NAME is a IANA registered SASL mechanism name. -STEPS is list of continuation function." +STEPS is list of continuation functions." (vector name (mapcar (lambda (step) @@ -121,7 +121,7 @@ STEPS is list of continuation function." (aref mechanism 1)) (defun sasl-find-mechanism (mechanisms) - "Retrieve an apropriate mechanism object from MECHANISMS hints." + "Retrieve an appropriate mechanism object from MECHANISMS hints." (let* ((sasl-mechanisms sasl-mechanisms) (mechanism (catch 'done @@ -147,9 +147,9 @@ STEPS is list of continuation function." (defun sasl-next-step (client step) "Evaluate the challenge and prepare an appropriate next response. -The data type of the value and optional 2nd argument STEP is nil or -opaque authentication step which holds the reference to the next action -and the current challenge. At the first time STEP should be set to nil." +The data type of the value and 2nd argument STEP is nil or opaque +authentication step which holds the reference to the next action and +the current challenge. At the first time STEP should be set to nil." (let* ((steps (sasl-mechanism-steps (sasl-client-mechanism client))) @@ -183,7 +183,7 @@ It contain at least 64 bits of entropy." ;; Don't use microseconds from (current-time), they may be unsupported. ;; Instead we use this randomly inited counter. (setq sasl-unique-id-char - (% (1+ (or sasl-unique-id-char (logand (random t) (1- (lsh 1 20))))) + (% (1+ (or sasl-unique-id-char (logand (random) (1- (lsh 1 20))))) ;; (current-time) returns 16-bit ints, ;; and 2^16*25 just fits into 4 digits i base 36. (* 25 25))) @@ -267,5 +267,4 @@ It contain at least 64 bits of entropy." (provide 'sasl) -;; arch-tag: 8b3326fa-4978-4fda-93e2-cb2c6255f887 ;;; sasl.el ends here