GNU bug report logs -
#5592
gnus mml2015 epg: Trying and failing to encrypt email to disabled pgp-key
Previous Next
Reported by: Christian von Roques <roques <at> mti.ag>
Date: Wed, 17 Feb 2010 20:44:02 UTC
Severity: minor
Tags: patch
Found in version 23.1.1
Done: Daiki Ueno <ueno <at> unixuser.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5592 in the body.
You can then email your comments to 5592 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5592
; Package
emacs,gnus
.
(Wed, 17 Feb 2010 20:44:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christian von Roques <roques <at> mti.ag>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 17 Feb 2010 20:44:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: emacs,gnus
Version: 23.1.1
Severity: minor
Tags: patch
"GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.12.12) of
2009-10-19 on debian-build.int-office-er.priv, modified by Debian"
When trying to send a pgp-encrypted email to a friend, using gnus,
mml2015, and epg, sending the email fails with the error message:
"Encrypt failed: exit"
My friend has two pgp-keys, of which the first has been disabled from
within "gpg --edit-key friend <at> example.com". mml2015 picks this disabled
key, tries to encrypt to it and fails.
I expected mml2015 to choose the second, not disabled, key.
The patch below (relative to revno 99512 of emacs/trunk) adds 'disabled'
to epg-key-capability-alist for disabled keys and uses it in
mml2015-epg-find-usable-key to skip disabled keys.
Note: epg already tries to determine which key is disabled using the 'd'
flag in field 2 of lines from the output of "gpg --list-keys
--with-colons". But this is not used by mml2015, does not work with
version 1.4.9 of gnupg and according to doc/DETAILS of gnupg-1.4.9 the
'd' flag in field 2 is deprecated and the 'D' in field 12 should be used
instead, which is exactly what my patch is doing. My changes should be
safe with older versions of gnupg because they just don't put 'D' in
field 12.
Christian.
=== modified file 'lisp/epg.el'
--- old/lisp/epg.el 2010-01-13 08:35:10 +0000
+++ new/lisp/epg.el 2010-02-17 19:18:09 +0000
@@ -136,9 +136,10 @@
(defvar epg-key-capablity-alist
'((?e . encrypt)
(?s . sign)
(?c . certify)
- (?a . authentication)))
+ (?a . authentication)
+ (?D . disabled)))
(defvar epg-new-signature-type-alist
'((?D . detached)
(?C . clear)
=== modified file 'lisp/gnus/mml2015.el'
--- old/lisp/gnus/mml2015.el 2010-01-13 08:35:10 +0000
+++ new/lisp/gnus/mml2015.el 2010-02-17 19:18:09 +0000
@@ -1018,8 +1018,9 @@
(while keys
(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)))
(setq pointer (cdr pointer))))
Reply sent
to
Daiki Ueno <ueno <at> unixuser.org>
:
You have taken responsibility.
(Fri, 07 May 2010 09:18:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christian von Roques <roques <at> mti.ag>
:
bug acknowledged by developer.
(Fri, 07 May 2010 09:18:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 5592-close <at> debbugs.gnu.org (full text, mbox):
Christian von Roques <roques <at> mti.ag> writes:
> The patch below (relative to revno 99512 of emacs/trunk) adds 'disabled'
> to epg-key-capability-alist for disabled keys and uses it in
> mml2015-epg-find-usable-key to skip disabled keys.
Thanks! I just applied your patch to the trunk.
Regards,
--
Daiki Ueno
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 04 Jun 2010 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 21 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.