[gnus git] branch master updated: n0-17-347-gad0f048 =1= Skip the whole GPG key if the primary key is marked as disabled.
Daiki Ueno <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via ad0f048aaf5f8cac4312c55117171719d511ca13 (commit)
from 8a021aefde6f386bf1a5d108798f7a93829aee85 (commit)
- Log -----------------------------------------------------------------
commit ad0f048aaf5f8cac4312c55117171719d511ca13
Author: Daiki Ueno <[email protected]>
Date: Mon Oct 17 11:05:43 2011 +0900
Skip the whole GPG key if the primary key is marked as disabled.
* mml2015.el (mml2015-epg-find-usable-key): Skip the whole key if the
primary key is marked as disabled.
* mml1991.el (mml1991-epg-find-usable-key): Ditto.
Thanks to Christian von Roques <[email protected]>.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e72b34d..f70fd1c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-17 Daiki Ueno <[email protected]>
+
+ * mml2015.el (mml2015-epg-find-usable-key): Skip the whole key if the
+ primary key is marked as disabled.
+ * mml1991.el (mml1991-epg-find-usable-key): Ditto.
+ Thanks to Christian von Roques <[email protected]>.
+
2011-10-11 Andreas Schwab <[email protected]>
* html2text.el (html2text-clean-anchor): Check for quotes around
diff --git a/lisp/mml1991.el b/lisp/mml1991.el
index ad9f957..1777a66 100644
--- a/lisp/mml1991.el
+++ b/lisp/mml1991.el
@@ -282,13 +282,16 @@ Whether the passphrase is cached at all is controlled by
(catch 'found
(while keys
(let ((pointer (epg-key-sub-key-list (car keys))))
+ ;; The primary key will be marked as disabled, when the entire
+ ;; key is disabled (see 12 Field, Format of colon listings, in
+ ;; gnupg/doc/DETAILS)
+ (unless (memq 'disabled (epg-sub-key-capability (car pointer)))
(while pointer
(if (and (memq usage (epg-sub-key-capability (car pointer)))
- (not (memq 'disabled (epg-sub-key-capability (car pointer))))
(not (memq (epg-sub-key-validity (car pointer))
'(revoked expired))))
(throw 'found (car keys)))
- (setq pointer (cdr pointer))))
+ (setq pointer (cdr pointer)))))
(setq keys (cdr keys)))))
;; XXX: since gpg --list-secret-keys does not return validity of each
diff --git a/lisp/mml2015.el b/lisp/mml2015.el
index b9310be..028955a 100644
--- a/lisp/mml2015.el
+++ b/lisp/mml2015.el
@@ -788,13 +788,16 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
(catch 'found
(while keys
(let ((pointer (epg-key-sub-key-list (car keys))))
+ ;; The primary key will be marked as disabled, when the entire
+ ;; key is disabled (see 12 Field, Format of colon listings, in
+ ;; gnupg/doc/DETAILS)
+ (unless (memq 'disabled (epg-sub-key-capability (car pointer)))
(while pointer
(if (and (memq usage (epg-sub-key-capability (car pointer)))
- (not (memq 'disabled (epg-sub-key-capability (car pointer))))
(not (memq (epg-sub-key-validity (car pointer))
'(revoked expired))))
(throw 'found (car keys)))
- (setq pointer (cdr pointer))))
+ (setq pointer (cdr pointer)))))
(setq keys (cdr keys)))))
;; XXX: since gpg --list-secret-keys does not return validity of each
-----------------------------------------------------------------------
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 | 7 +++++++
lisp/mml1991.el | 17 ++++++++++-------
lisp/mml2015.el | 17 ++++++++++-------
3 files changed, 27 insertions(+), 14 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