Mercurial > emacs
annotate lisp/net/sasl-cram.el @ 110702:4e901a2d3669
* files.el (remote-file-name-inhibit-cache): New defcustom.
* time.el (display-time-file-nonempty-p): Use
`remote-file-name-inhibit-cache'.
* net/tramp.el (tramp-completion-reread-directory-timeout): Fix
docstring.
* net/tramp-cache.el (tramp-cache-inhibit-cache): Remove.
(tramp-get-file-property): Replace `tramp-cache-inhibit-cache' by
`remote-file-name-inhibit-cache'. Check also for an integer
value. Add/increase counter when `tramp-verbose' >= 10.
(tramp-set-file-property): Add/increase counter when
`tramp-verbose' >= 10.
* net/tramp-cmds.el (tramp-cleanup-all-connections)
(tramp-cleanup-all-buffers): Set tramp-autoload cookie.
(tramp-bug): Set tramp-autoload cookie. Report all interned
tramp-* variables. Report also `remote-file-name-inhibit-cache'.
(tramp-reporter-dump-variable): Fix docstring. Mask non-7bit
characters only in strings.
* net/tramp-compat.el (remote-file-name-inhibit-cache): Define due
to backward compatibility.
* net/tramp-sh.el (tramp-handle-verify-visited-file-modtime)
(tramp-handle-file-name-all-completions)
(tramp-handle-vc-registered): Use
`remote-file-name-inhibit-cache'.
(tramp-open-connection-setup-interactive-shell): Call
`tramp-cleanup-connection' directly.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Sat, 02 Oct 2010 15:21:43 +0200 |
parents | 8d09094063d0 |
children | 417b1e4d63cd |
rev | line source |
---|---|
86994 | 1 ;;; sasl-cram.el --- CRAM-MD5 module for the SASL client framework |
2 | |
106815 | 3 ;; Copyright (C) 2000, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
86994 | 4 |
5 ;; Author: Daiki Ueno <ueno@unixuser.org> | |
6 ;; Kenichi OKADA <okada@opaopa.org> | |
7 ;; Keywords: SASL, CRAM-MD5 | |
110015
280c8ae2476d
Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
8 ;; Package: sasl |
86994 | 9 |
10 ;; This file is part of GNU Emacs. | |
11 | |
94677
91e5880a36c1
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
86994 | 13 ;; it under the terms of the GNU General Public License as published by |
94677
91e5880a36c1
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
14 ;; the Free Software Foundation, either version 3 of the License, or |
91e5880a36c1
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
15 ;; (at your option) any later version. |
86994 | 16 |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
94677
91e5880a36c1
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
86994 | 24 |
25 ;;; Commentary: | |
26 | |
27 (require 'sasl) | |
28 (require 'hmac-md5) | |
29 | |
30 (defconst sasl-cram-md5-steps | |
31 '(ignore ;no initial response | |
32 sasl-cram-md5-response)) | |
33 | |
34 (defun sasl-cram-md5-response (client step) | |
35 (let ((passphrase | |
36 (sasl-read-passphrase | |
37 (format "CRAM-MD5 passphrase for %s: " | |
38 (sasl-client-name client))))) | |
39 (unwind-protect | |
40 (concat (sasl-client-name client) " " | |
41 (encode-hex-string | |
42 (hmac-md5 (sasl-step-data step) passphrase))) | |
43 (fillarray passphrase 0)))) | |
44 | |
45 (put 'sasl-cram 'sasl-mechanism | |
46 (sasl-make-mechanism "CRAM-MD5" sasl-cram-md5-steps)) | |
47 | |
48 (provide 'sasl-cram) | |
49 | |
50 ;;; sasl-cram.el ends here |