GNU bug report logs -
#7797
24.0.50; [EasyPG/Gnus] always pick up the first key from `gpg --list-key $SENDER`
Previous Next
Reported by: Luca Capello <luca <at> pca.it>
Date: Thu, 6 Jan 2011 23:24:02 UTC
Severity: normal
Found in version 24.0.50
Done: Chong Yidong <cyd <at> stupidchicken.com>
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 7797 in the body.
You can then email your comments to 7797 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, rfrancoise <at> debian.org, bug-gnu-emacs <at> gnu.org
:
bug#7797
; Package
emacs
.
(Thu, 06 Jan 2011 23:24:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Luca Capello <luca <at> pca.it>
:
New bug report received and forwarded. Copy sent to
rfrancoise <at> debian.org, bug-gnu-emacs <at> gnu.org
.
(Thu, 06 Jan 2011 23:24:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi there!
Since more than a month, now, actually since the upgrade from the Debian
package emacs-snapshot 1:20101116-1 to 1:20101120-1 (which I did on
2010-11-23 at 14:50 +0100), EasyPG is not working anymore with Gnus. I
am sorry for the delay in this bug report, but I did not find the time
before to debug it and switched back to PGG instead.
BTW, now that the emacs-snapshot package is no more updated, I will go
back to the Debian emacs23 package. If you need me to test something,
please say so and I could even compile a Git snapshot, if needed.
This bug can be reproduced with the following minimal ~/.emacs:
--8<---------------cut here---------------start------------->8---
(setq debug-on-error t)
(setq epg-debug t)
(add-hook 'gnus-message-setup-hook 'epa-mail-mode)
(add-hook 'gnus-message-setup-hook 'mml-secure-message-sign-pgpmime)
(setq gnus-select-method '(nnnil))
--8<---------------cut here---------------end--------------->8---
Here the debug error, which unfortunately is useless:
=====
Debugger entered--Lisp error: (error "Sign failed: ((exit))")
signal(error ("Sign failed: ((exit))"))
byte-code("[...]" [mml2015-epg-secret-key-id-list error password-cache-remove signal] 4)
mml2015-epg-sign((part (sign . "pgpmime") (tag-location . 271) (contents . "test\n")))
mml2015-sign((part (sign . "pgpmime") (tag-location . 271) (contents . "test\n")))
mml-pgpmime-sign-buffer((part (sign . "pgpmime") (tag-location . 271) (contents . "test\n")))
mml-generate-mime-1((part (sign . "pgpmime") (tag-location . 271) (contents . "test\n")))
mml-generate-mime()
message-encode-message-body()
message-send-mail(nil)
message-send-via-mail(nil)
message-send(nil)
message-send-and-exit(nil)
call-interactively(message-send-and-exit nil nil)
=====
Thanks to the ` *epg-debug*' buffer, the problem is clear:
=====
/usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor \
--textmode --output /tmp/epg-output5441TZj --detach-sign \
-u 8D3867D89DDB992B
gpg: skipped "8D3867D89DDB992B": unusable secret key
gpg: signing failed: unusable secret key
=====
What the hell? Why EasyPG is specyfing a key and not relying on my
~/.gnupg/gpg.conf, which is *correct*?
=====
luca <at> gismo:~$ gpg --version
gpg (GnuPG) 1.4.10
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
luca <at> gismo:~$ gpg --list-key luca <at> pca.it
pub 1024D/9DDB992B 2007-06-08 [revoked: 2010-01-01]
uid Luca Capello <luca <at> pca.it>
uid Luca Capello <gismo <at> debian.org>
pub 1024D/6D742669 2003-11-09 [revoked: 2005-07-22]
uid Luca Capello <luca <at> pca.it>
uid Luca Capello <gismo <at> member.fsf.org>
uid Luca Capello <luca.capello <at> gmail.com>
uid Luca Capello <luca.capello <at> zoo.unige.ch>
uid Luca Capello <lucacapello <at> users.sourceforge.net>
uid Luca Capello <luca.capello <at> frontiers-in-genetics.org>
uid Luca Capello <gismo <at> innerloop.it>
uid Luca Capello <lcapello <at> common-lisp.net>
uid Luca Capello <gismo <at> debian.org>
pub 4096R/E397832F 2009-07-01
uid Luca Capello <luca <at> pca.it>
uid Luca Capello <gismo <at> debian.org>
sub 4096R/3BE9F36D 2009-07-01
sub 4096R/2BB95F4B 2009-07-01
luca <at> gismo:~$ cat ~/.gnupg/gpg.conf
personal-digest-preferences SHA512
cert-digest-algo SHA512
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
hidden-encrypt-to 3BE9F36D!
hidden-encrypt-to 2BB95F4B!
default-recipient 3BE9F36D!
default-recipient 2BB95F4B!
default-key E397832F
list-options show-sig-expire
display-charset UTF-8
trust-model auto
keyserver hkps://keys.indymedia.org
keyserver-options ca-cert-file=/etc/ssl/certs/cacert.org.pem
luca <at> gismo:~$
=====
FYI, I do not know why the order of the --list-key option is that one
(the three secret keys are there as well), but it is still the same with
GnuPG-2.
I looked into the Git repository and I found the faulty commit:
commit 9515b7dbfaa1e68fb72c323a45120f77362c7324
Author: Daniel Dehennin <daniel.dehennin <at> baby-gnu.org>
Date: Tue Nov 16 23:05:02 2010 +0000
mml2015-epg-sign: Use From header.
mml2015.el (mml2015-epg-sign): New variable 'sender' is
(message-options-get 'message-sender) and append it to mml2015-signers.
If mm-sign-option is not 'guided, mml2015-signers and sender sign the mail.
What is the reason of this change? If I want to sign with another key,
independent of the From header, I should be able to do so,
*automatically*, thus without any extra choice when sending the email.
My ~/.gnupg/gpg.conf allows that, EasyPG/Gnus does not.
Obviously, even setting `mml2015-signers' does not solve the problem:
because now EasyPG tries to sign with two keys. The debug error is the
same as above (useless), again the ` *epg-debug*' buffer contains the
answer:
=====
/usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor \
--textmode --output /tmp/epg-output5441Qsz --detach-sign \
-u 8D3867D89DDB992B -u 06EAA066E397832F
[GNUPG:] USERID_HINT D91D57A03BE9F36D Luca Capello <luca <at> pca.it>
[GNUPG:] NEED_PASSPHRASE D91D57A03BE9F36D 06EAA066E397832F 1 0
[GNUPG:] GET_HIDDEN passphrase.enter
[GNUPG:] GOT_IT
[GNUPG:] GOOD_PASSPHRASE
gpg: skipped "8D3867D89DDB992B": unusable secret key
gpg: signing failed: unusable secret key
=====
FTR, if I go back to the `mml2015-sign' version before the commit above,
everything is fine. Please note, however, the output in the `
*epg-debug*' buffer:
=====
/usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor \
--textmode --output /tmp/epg-output5441cKP --detach-sign
[GNUPG:] USERID_HINT D91D57A03BE9F36D Luca Capello <luca <at> pca.it>
[GNUPG:] NEED_PASSPHRASE D91D57A03BE9F36D 06EAA066E397832F 1 0
[GNUPG:] GET_HIDDEN passphrase.enter
[GNUPG:] GOT_IT
[GNUPG:] GOOD_PASSPHRASE
[GNUPG:] BEGIN_SIGNING
[GNUPG:] SIG_CREATED D 1 10 01 1294352394 139121880F512EC2E6A464D3D91D57A03BE9F36D
/usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor \
--textmode --output /tmp/epg-output5441pUV --detach-sign
[GNUPG:] USERID_HINT D91D57A03BE9F36D Luca Capello <luca <at> pca.it>
[GNUPG:] NEED_PASSPHRASE D91D57A03BE9F36D 06EAA066E397832F 1 0
[GNUPG:] GET_HIDDEN passphrase.enter
[GNUPG:] GOT_IT
[GNUPG:] GOOD_PASSPHRASE
[GNUPG:] BEGIN_SIGNING
[GNUPG:] SIG_CREATED D 1 10 01 1294352397 139121880F512EC2E6A464D3D91D57A03BE9F36D
=====
The GnuPG invocation will respect my ~/.gnupg/gpg.conf (which is, again,
the expected behavior), given that there is no -u option specified.
Thx, bye,
Gismo / Luca
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.0.50/etc/DEBUG.
In GNU Emacs 24.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
of 2010-12-13 on elegiac, modified by Debian
(emacs-snapshot package, version 1:20101212-2)
configured using `configure '--build' 'x86_64-linux-gnu' '--host' \
'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' \
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' \
'--mandir=/usr/share/man' '--with-pop=yes' \
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:\
/usr/local/share/emacs/24.0.50/site-lisp:/usr/local/share/emacs/site-lisp: \
/usr/share/emacs/24.0.50/site-lisp:/usr/share/emacs/site-lisp' \
'--without-compress-info' '--with-x=yes' '--with-x-toolkit=gtk' \
'--with-imagemagick=yes' 'build_alias=x86_64-linux-gnu' \
'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 \
-g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Message
Minor modes in effect:
epa-mail-mode: t
gnus-message-citation-mode: t
mml-mode: t
gpm-mouse-mode: t
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
ESC x g n u s RET m l u c a @ l o c a l h o s t C-n
t e s t C-n C-n C-n C-n C-n t e s t RET C-c C-c y q
ESC x r e p o r t - e m TAB RET
Recent messages:
Opening nnfolder server on archive...done
Reading active file from archive via nnfolder...done
No new newsgroups
Checking new news...done
Setting up drafts group
Warning: Setting up drafts group
Address `luca <at> localhost' might be bogus. Continue? (y or n) y
Sending...
Entering debugger...
Back to top level.
Load-path shadows:
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs/24.0.50/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs/24.0.50/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs/24.0.50/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-fptex hides /usr/share/emacs/site-lisp/auctex/tex-fptex
/usr/share/emacs/24.0.50/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs/24.0.50/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs/24.0.50/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs/24.0.50/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs/24.0.50/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs/24.0.50/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs/24.0.50/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs/24.0.50/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs-snapshot/site-lisp/psgml/psgml hides /usr/share/emacs/site-lisp/psgml/psgml
/usr/share/emacs-snapshot/site-lisp/psgml/psgml-other hides /usr/share/emacs/site-lisp/psgml/psgml-other
/usr/share/emacs-snapshot/site-lisp/psgml/psgml-init hides /usr/share/emacs/site-lisp/psgml/psgml-init
/usr/share/emacs-snapshot/site-lisp/psgml/psgml-sysdep hides /usr/share/emacs/site-lisp/psgml/psgml-sysdep
/usr/share/emacs-snapshot/site-lisp/psgml/psgml-html hides /usr/share/emacs/site-lisp/psgml/psgml-html
/usr/share/emacs/24.0.50/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/local/share/emacs/site-lisp/fortune hides /usr/share/emacs/24.0.50/lisp/play/fortune
/usr/share/emacs-snapshot/site-lisp/emms/tq hides /usr/share/emacs/24.0.50/lisp/emacs-lisp/tq
Features:
(shadow emacsbug help-mode view debug mail-extr sort epa-mail epa
derived epg gnus-cite nnfolder nndraft nnmh nnnil gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015
epg-config mm-view smime password-cache dig mailcap nntp proto-stream
starttls tls gnus-cache nnir gnus-sum macroexp nnoo gnus-group time-date
gnus-undo nnmail mail-source format-spec gnus-start gnus-spec gnus-int
gnus-range message sendmail regexp-opt rfc822 mml easymenu mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems
nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit t-mouse
planner-autoloads debian-el debian-el-loaddefs w3m-load psgml-init
muse-autoloads emms-auto emacs-goodies-el emacs-goodies-custom
emacs-goodies-loaddefs easy-mmode dpkg-dev-el dpkg-dev-el-loaddefs
bbdb-autoloads preview-latex tex-site auto-loads tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Fri, 07 Jan 2011 01:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 7797 <at> debbugs.gnu.org (full text, mbox):
Hi,
Luca Capello <luca <at> pca.it> writes:
> gpg: skipped "8D3867D89DDB992B": unusable secret key
> gpg: signing failed: unusable secret key
You may want to try the patch I posted last month:
http://lists.gnu.org/archive/html/emacs-devel/2010-12/msg00624.html
Although this patch is a workaround, I'm going to push it for the time
being.
> I looked into the Git repository and I found the faulty commit:
>
> mml2015-epg-sign: Use From header.
>
> What is the reason of this change? If I want to sign with another key,
> independent of the From header, I should be able to do so,
> *automatically*, thus without any extra choice when sending the email.
> My ~/.gnupg/gpg.conf allows that, EasyPG/Gnus does not.
Quite a few users expect that Gnus/GPG pick a key matching the From
header automatically - me too, I use different keys at work and home :)
Regards,
--
Daiki Ueno
Reply sent
to
Daiki Ueno <ueno <at> unixuser.org>
:
You have taken responsibility.
(Fri, 07 Jan 2011 09:28:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Luca Capello <luca <at> pca.it>
:
bug acknowledged by developer.
(Fri, 07 Jan 2011 09:28:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 7797-done <at> debbugs.gnu.org (full text, mbox):
Daiki Ueno <ueno <at> unixuser.org> writes:
> Luca Capello <luca <at> pca.it> writes:
>
>> gpg: skipped "8D3867D89DDB992B": unusable secret key
>> gpg: signing failed: unusable secret key
>
> You may want to try the patch I posted last month:
> http://lists.gnu.org/archive/html/emacs-devel/2010-12/msg00624.html
>
> Although this patch is a workaround, I'm going to push it for the time
> being.
OK, I fixed this in a better way (r102771).
My test case is:
$ mv .gnupg .gnupg.bak
$ gpg --gen-key # create a key foo <at> example.com
$ gpg --gen-key # create a key bar <at> example.com
$ gpg --gen-key # create a key baz <at> example.com
$ gpg --edit-key foo <at> example.com # revoke foo <at> example.com
$ gpg --delete-secret-key bar <at> example.com
(mml2015-epg-find-usable-secret-key
(epg-make-context 'OpenPGP) "foo <at> example.com" 'sign)
=> nil
(mml2015-epg-find-usable-secret-key
(epg-make-context 'OpenPGP) "bar <at> example.com" 'sign)
=> nil
(mml2015-epg-find-usable-secret-key
(epg-make-context 'OpenPGP) "baz <at> example.com" 'sign)
=> (epg-key . ...)
Regards,
--
Daiki Ueno
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Fri, 07 Jan 2011 10:11:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 7797 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
reopen 7797
thanks
Hi Daiki!
On Fri, 07 Jan 2011 10:34:59 +0100, Daiki Ueno wrote:
> Daiki Ueno <ueno <at> unixuser.org> writes:
>
>> Luca Capello <luca <at> pca.it> writes:
>>
>>> gpg: skipped "8D3867D89DDB992B": unusable secret key
>>> gpg: signing failed: unusable secret key
>>
>> You may want to try the patch I posted last month:
>> http://lists.gnu.org/archive/html/emacs-devel/2010-12/msg00624.html
Thank you for the link, I was quite disappointed no one reported it on
the GNU BTS. I added both Ashish and Daniel to the cc:, discussion
requested below.
>> Although this patch is a workaround, I'm going to push it for the time
>> being.
>
> OK, I fixed this in a better way (r102771).
Please, can you post it here, so I do not have to download the bzr
repository? The Savannah bzr repository is disabled
<http://bzr.savannah.gnu.org/lh/emacs> and the Launhpad one
<http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/files> does not
have it yet.
> My test case is:
>
> $ mv .gnupg .gnupg.bak
> $ gpg --gen-key # create a key foo <at> example.com
> $ gpg --gen-key # create a key bar <at> example.com
> $ gpg --gen-key # create a key baz <at> example.com
> $ gpg --edit-key foo <at> example.com # revoke foo <at> example.com
> $ gpg --delete-secret-key bar <at> example.com
>
> (mml2015-epg-find-usable-secret-key
> (epg-make-context 'OpenPGP) "foo <at> example.com" 'sign)
> => nil
> (mml2015-epg-find-usable-secret-key
> (epg-make-context 'OpenPGP) "bar <at> example.com" 'sign)
> => nil
> (mml2015-epg-find-usable-secret-key
> (epg-make-context 'OpenPGP) "baz <at> example.com" 'sign)
> => (epg-key . ...)
I am sorry, but I still think this is not the correct solution, thus I
reopened the bug (control server bcc:ed). I think the cases should be
the following, which I have (sort of) explained in my first post and it
is similar to Ashish's one at:
<http://lists.gnu.org/archive/html/emacs-devel/2010-12/msg00612.html>
1) by default, EasyPG does not pass any key-id to GnuPG, simply relying
on ~/.gnupg/gpg.conf. After all, GnuPG configuration is done there,
and *by default* all the other programs working with GnuPG should
obey that configuration.
And this is how I read `mm-sign-option':
Option how to create signed parts.
nil, use the default keys without asking;
`guided', let you select signing keys from the menu.
However, `mm-encrypt-option' contains the real behavior according to
the code:
Option of creating encrypted parts.
nil, use the first public-key matching the "From:" header as the
recipient;
`guided', ask user to select recipient keys from the menu.
2) if `mml2015-signers' is set, it overrides point 1.
BTW1, the documentation for that variable should be corrected: AFAIK
you can set it to multiple keys, which means that the documentation
should read "A list of your own key ID(s)...", note the plural.
BTW2, this variable is not mentioned in any file in the doc/ folder,
which is another bug.
3) introduce a new `mml2015-use-from-address' variable:
- if set, it then acts like the way you explain above.
- if not set, nothing changes WRT to points 1 and 2.
4) introduce also a new `mml2015-default-user-id' variable, which, if
set, overrides *everything* from the above, similar to
`pgg-default-user-id' reported by Ashish at the link above.
I would have wanted to reply only after having implemented my solution,
but since I am quite busy right now (and I will be for the whole next
week as well), it is better to put here my ideas *now*. For this
reason, I have probably missed something of the whole situation, thus
please forgive me.
Thx, bye,
Gismo / Luca
[Message part 2 (application/pgp-signature, inline)]
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 07 Jan 2011 10:11:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Fri, 07 Jan 2011 13:12:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 7797 <at> debbugs.gnu.org (full text, mbox):
Luca Capello <luca <at> pca.it> writes:
> Please, can you post it here, so I do not have to download the bzr
> repository? The Savannah bzr repository is disabled
> <http://bzr.savannah.gnu.org/lh/emacs> and the Launhpad one
> <http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/files> does not
> have it yet.
Looks git mirror is up to date:
http://git.sv.gnu.org/cgit/emacs.git/commit/?id=3d51f602
> I am sorry, but I still think this is not the correct solution, thus I
> reopened the bug (control server bcc:ed). I think the cases should be
> the following, which I have (sort of) explained in my first post and it
> is similar to Ashish's one at:
>
> <http://lists.gnu.org/archive/html/emacs-devel/2010-12/msg00612.html>
I think there are 2 separate issues:
(1) Gnus now picks signing keys from "From:" header by default. Which is
an incompatible behavior change from the previous versions.
(2) mml2015-epg-find-usable-key, a function used to determine whether a
key is usable for signing, has a bug.
I fixed (2) as r102771 and you are talking about (1).
> I would have wanted to reply only after having implemented my solution,
> but since I am quite busy right now (and I will be for the whole next
> week as well), it is better to put here my ideas *now*.
Well, probably you could first try the patch for (2) and then propose
improvement ideas for (1) I think :-)
Regards,
--
Daiki Ueno
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Fri, 07 Jan 2011 17:50:03 GMT)
Full text and
rfc822 format available.
Message #24 received at 7797 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Here is a patch to make the use of from header conditional, this solve
issue 1 in [1].
It can be fetched from my Gnus git repository [2].
I do not update the Changelog to avoid conflict, I think changelog can
be automatically handled by hook when Lars pull in its branch ;-)
This patch is tested by me.
Regards.
* lisp/mml2015.el (mml2015-use-from-address): New variable for optional
from header use.
(mml2015-epg-sign): Use it.
(mml2015-epg-encrypt): Ditto.
---
lisp/mml2015.el | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/lisp/mml2015.el b/lisp/mml2015.el
index 9831b33..dde8a08 100644
--- a/lisp/mml2015.el
+++ b/lisp/mml2015.el
@@ -121,6 +121,12 @@ Whether the passphrase is cached at all is controlled by
:group 'mime-security
:type '(repeat (string :tag "Key ID")))
+(defcustom mml2015-use-from-address nil
+ "If t, use from header mail address before mml2015-signers when
+signing."
+ :group 'mime-security
+ :type 'boolean)
+
(defcustom mml2015-encrypt-to-self nil
"If t, add your own key ID to recipient list when encryption."
:group 'mime-security
@@ -960,7 +966,8 @@ Whether the passphrase is cached at all is controlled by
(let* ((inhibit-redisplay t)
(context (epg-make-context))
(boundary (mml-compute-boundary cont))
- (sender (message-options-get 'message-sender))
+ (sender (if mml2015-use-from-address
+ (message-options-get 'message-sender)))
signer-key
(signers
(or (message-options-get 'mml2015-epg-signers)
@@ -1035,7 +1042,8 @@ If no one is selected, default secret key is used. "
(let ((inhibit-redisplay t)
(context (epg-make-context))
(config (epg-configuration))
- (sender (message-options-get 'message-sender))
+ (sender (if mml2015-use-from-address
+ (message-options-get 'message-sender)))
(recipients (message-options-get 'mml2015-epg-recipients))
cipher signers
(boundary (mml-compute-boundary cont))
--
1.7.2.3
Footnotes:
[1] http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-01/msg00207.html
[2] http://www.baby-gnu.org/~nebu/archives/gnus/gnus.git/ dad/mml2015-epg-use-from-to-sign-if-configured
--
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Sun, 16 Jan 2011 20:25:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 7797 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi there!
On Fri, 07 Jan 2011 14:18:41 +0100, Daiki Ueno wrote:
> Luca Capello <luca <at> pca.it> writes:
>> Please, can you post it here, so I do not have to download the bzr
>> repository? The Savannah bzr repository is disabled
>> <http://bzr.savannah.gnu.org/lh/emacs> and the Launhpad one
>> <http://bazaar.launchpad.net/~vcs-imports/emacs/trunk/files> does not
>> have it yet.
>
> Looks git mirror is up to date:
>
> http://git.sv.gnu.org/cgit/emacs.git/commit/?id=3d51f602
It was not at the time of my writing and looking around on the Internet
I was not sure if the Git repository is automatically updated (and when)
or not.
>> I am sorry, but I still think this is not the correct solution, thus I
>> reopened the bug (control server bcc:ed). I think the cases should be
>> the following, which I have (sort of) explained in my first post and it
>> is similar to Ashish's one at:
>>
>> <http://lists.gnu.org/archive/html/emacs-devel/2010-12/msg00612.html>
>
> I think there are 2 separate issues:
>
> (1) Gnus now picks signing keys from "From:" header by default. Which is
> an incompatible behavior change from the previous versions.
>
> (2) mml2015-epg-find-usable-key, a function used to determine whether a
> key is usable for signing, has a bug.
>
> I fixed (2) as r102771 and you are talking about (1).
Exactly, but I do not understand the need for (2), since as I wrote in
my previous reply (point 1) IMHO by default EasyPG should do nothing WRT
GnuPG and which keys should be used, especially given that the error
message is useless without a non-nil `epg-debug':
Message-ID: <87r5cpow4q.fsf <at> gismo.pca.it>
URL: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7797#16>
Nevertheless, now that things went back to normality (read below), I do
not care such a lot about that.
>> I would have wanted to reply only after having implemented my solution,
>> but since I am quite busy right now (and I will be for the whole next
>> week as well), it is better to put here my ideas *now*.
>
> Well, probably you could first try the patch for (2) and then propose
> improvement ideas for (1) I think :-)
FWIW, your patch for (2) works perfectly (adapted to the
lisp/gnus/mml2015.el local copy I have), tested on both my working
environment and the fresh setup I used to report the bug.
On Fri, 07 Jan 2011 18:29:01 +0100, Daniel Dehennin wrote:
> Here is a patch to make the use of from header conditional, this solve
> issue 1 in [1].
>
> It can be fetched from my Gnus git repository [2].
>
> I do not update the Changelog to avoid conflict, I think changelog can
> be automatically handled by hook when Lars pull in its branch ;-)
>
> This patch is tested by me.
And tested by me as well, *without* Daiki's patch applied, for both
signing...
=====
/usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode \
--output /tmp/epg-output3395dRp --detach-sign -u 8D3867D89DDB992B
gpg: skipped "8D3867D89DDB992B": unusable secret key
gpg: signing failed: unusable secret key
[patch applied]
/usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode \
--output /tmp/epg-output3395qbv --detach-sign
[GNUPG:] USERID_HINT D91D57A03BE9F36D Luca Capello <luca <at> pca.it>
=====
...and encryption to my Debian address:
=====
/usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode \
--output /tmp/epg-output355543E --always-trust --encrypt --sign -u 8D3867D89DDB992B -r 06EAA066E397832F
gpg: skipped "8D3867D89DDB992B": unusable secret key
gpg: [stdin]: sign+encrypt failed: unusable secret key
[patch applied]
/usr/bin/gpg --no-tty --status-fd 1 --yes --command-fd 0 --armor --textmode \
--output /tmp/epg-output3555FCL --always-trust --encrypt --sign -r 06EAA066E397832F
[GNUPG:] USERID_HINT D91D57A03BE9F36D Luca Capello <luca <at> pca.it>
=====
> @@ -1035,7 +1042,8 @@ If no one is selected, default secret key is used. "
> (let ((inhibit-redisplay t)
> (context (epg-make-context))
> (config (epg-configuration))
> - (sender (message-options-get 'message-sender))
> + (sender (if mml2015-use-from-address
> + (message-options-get 'message-sender)))
There are extra spaces before the parenthesis here ;-)
Thx, bye,
Gismo / Luca
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Sun, 16 Jan 2011 20:45:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 7797 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Here is a fixed patch.
Regards.
* lisp/mml2015.el (mml2015-use-from-address): New variable for optional
from header use.
(mml2015-epg-sign): Use it.
(mml2015-epg-encrypt): Ditto.
---
lisp/mml2015.el | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/lisp/mml2015.el b/lisp/mml2015.el
index 9831b33..762eb95 100644
--- a/lisp/mml2015.el
+++ b/lisp/mml2015.el
@@ -121,6 +121,12 @@ Whether the passphrase is cached at all is controlled by
:group 'mime-security
:type '(repeat (string :tag "Key ID")))
+(defcustom mml2015-use-from-address nil
+ "If t, use from header mail address before mml2015-signers when
+signing."
+ :group 'mime-security
+ :type 'boolean)
+
(defcustom mml2015-encrypt-to-self nil
"If t, add your own key ID to recipient list when encryption."
:group 'mime-security
@@ -960,7 +966,8 @@ Whether the passphrase is cached at all is controlled by
(let* ((inhibit-redisplay t)
(context (epg-make-context))
(boundary (mml-compute-boundary cont))
- (sender (message-options-get 'message-sender))
+ (sender (if mml2015-use-from-address
+ (message-options-get 'message-sender)))
signer-key
(signers
(or (message-options-get 'mml2015-epg-signers)
@@ -1035,7 +1042,8 @@ If no one is selected, default secret key is used. "
(let ((inhibit-redisplay t)
(context (epg-make-context))
(config (epg-configuration))
- (sender (message-options-get 'message-sender))
+ (sender (if mml2015-use-from-address
+ (message-options-get 'message-sender)))
(recipients (message-options-get 'mml2015-epg-recipients))
cipher signers
(boundary (mml-compute-boundary cont))
--
1.7.2.3
--
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Sat, 22 Jan 2011 18:45:02 GMT)
Full text and
rfc822 format available.
Message #33 received at 7797 <at> debbugs.gnu.org (full text, mbox):
Daniel Dehennin <daniel.dehennin <at> baby-gnu.org> writes:
> Here is a fixed patch.
I'm not familiar with the signing code, but the patch looks fine to me.
Should I just apply it?
--
(domestic pets only, the antidote for overdose, milk.)
larsi <at> gnus.org * Lars Magne Ingebrigtsen
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Mon, 24 Jan 2011 03:02:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 7797 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Daniel Dehennin <daniel.dehennin <at> baby-gnu.org> writes:
>
>> Here is a fixed patch.
>
> I'm not familiar with the signing code, but the patch looks fine to me.
> Should I just apply it?
It looks good to me. Since I'm thinking of another tweak related to
signing, I'll apply this patch soon unless anyone objects.
Regards,
--
Daiki Ueno
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Thu, 27 Jan 2011 17:11:01 GMT)
Full text and
rfc822 format available.
Message #39 received at 7797 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> It looks good to me. Since I'm thinking of another tweak related to
> signing, I'll apply this patch soon unless anyone objects.
Sorry, I got bitten by this today and fixed it without seeing this
thread before. I've just fixed the same way Daniel did, so no harm done.
:)
--
Julien Danjou
❱ http://julien.danjou.info
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Fri, 28 Jan 2011 01:00:04 GMT)
Full text and
rfc822 format available.
Message #42 received at 7797 <at> debbugs.gnu.org (full text, mbox):
Julien Danjou <julien <at> danjou.info> writes:
>> It looks good to me. Since I'm thinking of another tweak related to
>> signing, I'll apply this patch soon unless anyone objects.
>
> Sorry, I got bitten by this today and fixed it without seeing this
> thread before. I've just fixed the same way Daniel did, so no harm done.
> :)
Cool, thanks :) I just installed another tweak now (commit 5999faac),
which implements Luca's suggestion #2 at:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7797#16
Testing would be appreciated.
Regards,
--
Daiki Ueno
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#7797
; Package
emacs,gnus
.
(Wed, 09 Feb 2011 11:56:02 GMT)
Full text and
rfc822 format available.
Message #45 received at 7797 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi there!
I am sorry for being late, preparing/attending FOSDEM got all my time.
On Fri, 28 Jan 2011 02:08:08 +0100, Daiki Ueno wrote:
> Julien Danjou <julien <at> danjou.info> writes:
>
>>> It looks good to me. Since I'm thinking of another tweak related to
>>> signing, I'll apply this patch soon unless anyone objects.
>>
>> Sorry, I got bitten by this today and fixed it without seeing this
>> thread before. I've just fixed the same way Daniel did, so no harm done.
>> :)
>
> Cool, thanks :) I just installed another tweak now (commit 5999faac),
> which implements Luca's suggestion #2 at:
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7797#16
>
> Testing would be appreciated.
I backported your patch on top of your first one [1] and Julien's [2]
and everything is working as expected, thanks:
(setq mml2015-signers nil)
=> Passphrase for D91D57A03BE9F36D Luca Capello <luca <at> pca.it>:
(setq mml2015-signers (list "3BE9F36D"))
=> Passphrase for D91D57A03BE9F36D Luca Capello <luca <at> pca.it>
(setq mml2015-signers (list "9DDB992B"))
=> No secret key for 9DDB992B; skip it? (y or n) y
Passphrase for D91D57A03BE9F36D Luca Capello <luca <at> pca.it>:
(setq mml2015-signers (list "9DDB992B" "3BE9F36D"))
=> No secret key for 9DDB992B; skip it? (y or n) y
Passphrase for D91D57A03BE9F36D Luca Capello <luca <at> pca.it>:
[1] <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7797#13>
[2] <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7797#39>
FWIW I would have preferred Daniel's patch, the variable name was a
bit clearer and more self-explicative, but never mind, what is
important is that it is fixed!
BTW, the description for `mml2015-signers' still needs
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/mml2015.el b/lisp/mml2015.el
index 1271168..df106bb 100644
--- a/lisp/mml2015.el
+++ b/lisp/mml2015.el
@@ -116,7 +116,7 @@ Whether the passphrase is cached at all is controlled by
:type 'integer)
(defcustom mml2015-signers nil
- "A list of your own key ID which will be used to sign a message.
+ "A list of your own key ID(s) which will be used to sign a message.
If set, it overrides the setting of `mml2015-sign-with-sender'."
:group 'mime-security
:type '(repeat (string :tag "Key ID")))
--8<---------------cut here---------------end--------------->8---
Apart from the above, given that all the patches have been included in
the emacs tree, this bug should be closed, I leave this to you ;-)
Thx, bye,
Gismo / Luca
[Message part 2 (application/pgp-signature, inline)]
bug closed, send any further explanations to Luca Capello <luca <at> pca.it>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> debbugs.gnu.org
.
(Sat, 12 Feb 2011 01:22:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 12 Mar 2011 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 181 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.