[gnus git] branch master updated: n0-17-133-g68c92ff =4= * auth-source.el (auth-source-token-passphrase-callback-function): Simplify and remove EPA dependency. ; Minor doc update for auth-source.el. ; Merge branch 'master' of https://git.gnus.org/gnus ; Reindent and untabify auth-source.el.

Ted Zlatanov <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  68c92ffbbd7e600f3a4e2f5540412b0631b3beab (commit)
       via  483dfe09f11eda5d73deba3967116d0d1e9f9420 (commit)
       via  f1620b5de8050a842ca657f3dbe47d60e0d6a0d4 (commit)
       via  080b35cfaeb706567e09a6758fe5660c65089098 (commit)
      from  d758f38a9c47ae80c7dedd13b9630230a9b4cc47 (commit)


- Log -----------------------------------------------------------------
commit 68c92ffbbd7e600f3a4e2f5540412b0631b3beab
Author: Daiki Ueno <[email protected]>
Date:   Fri Jul 1 08:35:05 2011 -0500

    * auth-source.el (auth-source-token-passphrase-callback-function):
    Simplify and remove EPA dependency.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ab80cc6..d6777cf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-01  Daiki Ueno  <[email protected]>
+
+	* auth-source.el (auth-source-token-passphrase-callback-function):
+	Simplify and remove EPA dependency.
+
 2011-07-01  Andrew Cohen  <[email protected]>
 
 	* nnir.el (nnir-request-article): Fix error message text.
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index c16137f..677698e 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -74,8 +74,6 @@
 (autoload 'plstore-save "plstore")
 (autoload 'plstore-get-file "plstore")
 
-(autoload 'epa-passphrase-callback-function "epa")
-
 (autoload 'epg-context-operation "epg")
 (autoload 'epg-make-context "epg")
 (autoload 'epg-context-set-passphrase-callback "epg")
@@ -1006,25 +1004,7 @@ Note that the MAX parameter is used so we can exit the parse early."
 
 (defvar auth-source-passphrase-alist nil)
 
-(defun auth-source-passphrase-callback-function (context key-id handback
-                                                         &optional sym-detail)
-  "Exactly like `epa-passphrase-callback-function' but takes an
-extra SYM-DETAIL parameter which will be printed at the end of
-the symmetric passphrase prompt, and assumes symmetric
-encryption."
-  (read-passwd
-   (format "Passphrase for symmetric encryption%s%s: "
-           ;; Add the file name to the prompt, if any.
-           (if (stringp handback)
-               (format " for %s" handback)
-             "")
-           (if (stringp sym-detail)
-               sym-detail
-             ""))
-   (eq (epg-context-operation context) 'encrypt)))
-
 (defun auth-source-token-passphrase-callback-function (context key-id file)
-  (if (eq key-id 'SYM)
       (let* ((file (file-truename file))
              (entry (assoc file auth-source-passphrase-alist))
              passphrase)
@@ -1036,14 +1016,13 @@ encryption."
               (unless entry
                 (setq entry (list file))
                 (push entry auth-source-passphrase-alist))
-              (setq passphrase (auth-source-passphrase-callback-function context
-                                                                         key-id
-                                                                         file
-                                                                         " tokens"))
+              (setq passphrase
+                    (read-passwd
+                     (format "Passphrase for %s tokens: " file)
+                     t))
               (setcdr entry (lexical-let ((p (copy-sequence passphrase)))
                               (lambda () p)))
-              passphrase)))
-    (epa-passphrase-callback-function context key-id file)))
+              passphrase))))
 
 ;; (auth-source-epa-extract-gpg-token "gpg:LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tClZlcnNpb246IEdudVBHIHYxLjQuMTEgKEdOVS9MaW51eCkKCmpBMEVBd01DT25qMjB1ak9rZnRneVI3K21iNm9aZWhuLzRad3cySkdlbnVaKzRpeEswWDY5di9icDI1U1dsQT0KPS9yc2wKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo=" "~/.netrc")
 (defun auth-source-epa-extract-gpg-token (secret file)

commit 483dfe09f11eda5d73deba3967116d0d1e9f9420
Author: Ted Zlatanov <[email protected]>
Date:   Fri Jul 1 08:13:47 2011 -0500

    Minor doc update for auth-source.el.

diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 9e82460..c16137f 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -102,6 +102,9 @@ let-binding."
                  (const :tag "30 Minutes" 1800)
                  (integer :tag "Seconds")))
 
+;;; The slots below correspond with the `auth-source-search' spec,
+;;; so a backend with :host set, for instance, would match only
+;;; searches for that host.  Normally they are nil.
 (defclass auth-source-backend ()
   ((type :initarg :type
          :initform 'netrc

commit f1620b5de8050a842ca657f3dbe47d60e0d6a0d4
Merge: 080b35c d758f38
Author: Ted Zlatanov <[email protected]>
Date:   Fri Jul 1 08:00:27 2011 -0500

    Merge branch 'master' of https://git.gnus.org/gnus


commit 080b35cfaeb706567e09a6758fe5660c65089098
Author: Ted Zlatanov <[email protected]>
Date:   Fri Jul 1 07:23:14 2011 -0500

    Reindent and untabify auth-source.el.

diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 52c9b17..9e82460 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -1120,7 +1120,7 @@ FILE is the file from which we obtained this token."
                                   &key backend require create delete
                                   type max host user port
                                   &allow-other-keys)
-"Given a property list SPEC, return search matches from the :backend.
+  "Given a property list SPEC, return search matches from the :backend.
 See `auth-source-search' for details on SPEC."
   ;; just in case, check that the type is correct (null or same as the backend)
   (assert (or (null type) (eq type (oref backend type)))
@@ -1256,8 +1256,8 @@ See `auth-source-search' for details on SPEC."
               (cond
                ((and (null data) (eq r 'secret))
                 ;; Special case prompt for passwords.
-;; TODO: make the default (setq auth-source-netrc-use-gpg-tokens `((,(if (boundp 'epa-file-auto-mode-alist-entry) (car (symbol-value 'epa-file-auto-mode-alist-entry)) "\\.gpg\\'") nil) (t gpg)))
-;; TODO: or maybe leave as (setq auth-source-netrc-use-gpg-tokens 'never)
+                ;; TODO: make the default (setq auth-source-netrc-use-gpg-tokens `((,(if (boundp 'epa-file-auto-mode-alist-entry) (car (symbol-value 'epa-file-auto-mode-alist-entry)) "\\.gpg\\'") nil) (t gpg)))
+                ;; TODO: or maybe leave as (setq auth-source-netrc-use-gpg-tokens 'never)
                 (let* ((ep (format "Use GPG password tokens in %s?" file))
                        (gpg-encrypt
                         (cond

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog      |    5 +
 lisp/auth-source.el |  258 ++++++++++++++++++++++++---------------------------
 2 files changed, 125 insertions(+), 138 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.