From: Daiki Ueno Date: Fri, 7 May 2010 08:10:28 +0000 (+0900) Subject: Skip disabled PGP key when encrypting mail with Gnus. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~242 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5146e84c0337eb8d9b207931fd41c692bd57f6b0;p=emacs.git Skip disabled PGP key when encrypting mail with Gnus. * lisp/epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592). * lisp/gnus/mml2015.el (mml2015-epg-find-usable-key): Skip disabled key (Bug#5592). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d28a4ffda7..df7d21c6124 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-05-07 Christian von Roques (tiny change) + + * lisp/epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592). + 2010-05-07 Katsumi Yamaoka * mail/binhex.el (binhex-decode-region-internal) diff --git a/lisp/epg.el b/lisp/epg.el index 7791c1865a7..6e69ae09da4 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -137,7 +137,8 @@ '((?e . encrypt) (?s . sign) (?c . certify) - (?a . authentication))) + (?a . authentication) + (?D . disabled))) (defvar epg-new-signature-type-alist '((?D . detached) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d429c0e319f..d78e07037b4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2010-05-07 Christian von Roques (tiny change) + + * mml2015.el (mml2015-epg-find-usable-key): Skip disabled key + (Bug#5592). + 2010-05-07 Julien Danjou * gnus-art.el (gnus-mime-pipe-part): Add optional argument `cmd'; pass diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 6725709c044..130a3ca86a5 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -1021,6 +1021,7 @@ Whether the passphrase is cached at all is controlled by (let ((pointer (epg-key-sub-key-list (car keys)))) (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)))