GNU bug report logs - #22941
25.1.50; epa-list-secret-keys does not find gpg private keys

Previous Next

Package: emacs;

Reported by: Iñigo Serna <inigoserna <at> gmail.com>

Date: Tue, 8 Mar 2016 11:00:02 UTC

Severity: normal

Tags: notabug

Found in version 25.1.50

Done: Daiki Ueno <ueno <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 22941 <at> debbugs.gnu.org (full text, mbox):

From: Iñigo Serna <inigoserna <at> gmail.com>
To: Daiki Ueno <ueno <at> gnu.org>
Cc: 22941 <at> debbugs.gnu.org
Subject: Re: bug#22941: 25.1.50;
 epa-list-secret-keys does not find gpg private keys
Date: Fri, 11 Mar 2016 18:17:24 +0100
Hello, and thanks for your answer.

Daiki Ueno <ueno <at> gnu.org> writes:
> [...]
>
> This behavior is intended, if the key was created with gpg2.  GnuPG 2.1
> removed support for secring.gpg, which was used by pre-2.1 versions.
> That is one of the reasons we switched the default to "gpg2".

Sorry, I don't understand.
The key was generated with gpg v1.x, and I want to continue using gpg
v1.x within emacs. From cli, I can see the correct key with "gpg -K".

I understand from the doc you cited that now it is not possible 
to use gpg v1.x keys with gpg v2.1+ and vice versa. But in my case I
want to use a v1.x key with gpg v1.x. And that's why I set
`epg-pgp-program' to "gpg" instead of using default "gpg2".

Am I missing something?

Thanks in advance,
Iñigo Serna


> tag 22941 notabug
> close 22941
> stop
>
> Iñigo Serna <inigoserna <at> gmail.com> writes:
>
>> Since a couple of months ago emacs 25.0.x (last tested as 2016/03/08
>> from git master) can't open encrypted files (using symmetric keys), as
>> epa can't find secret keys from gpg.
>>
>> This is the error message I get:
>> """
>> Error while decrypting with "gpg":
>>
>> gpg: encrypted with 2048-bit RSA key, ID C0ED9C8489B28C43, created 2016-01-12
>>       "Iñigo Serna (XXX.YY) <inigo <at> XXX.YY>"
>> gpg: decryption failed: No secret key
>> """
>>
>> I use gpg (not gpg2) so I added '(setq epg-gpg-program "gpg")' to my
>> configuration as new epa defaults to gpg2 when I've run "emacs -Q -nw".
>>
>> `epa-list-secret-keys` does not find any keys.
>>
>> This same configuration works ok with 24.5.1 (from Fedora 23 x86_64), and
>> even `epa-list-secret-keys` shows the private keys correctly.
>
> This behavior is intended, if the key was created with gpg2.  GnuPG 2.1
> removed support for secring.gpg, which was used by pre-2.1 versions.
> That is one of the reasons we switched the default to "gpg2".
>
> See doc/whats-new-in-2.1.txt in GnuPG:
>
> 1.1 Removal of the secret keyring
> ─────────────────────────────────
> [...]
>   2.1.  However, any change to the private keys using the new /gpg/ will
>   not show up when using pre-2.1 versions of GnuPG and vice versa.
>
> Regards,


-- 
Iñigo Serna




This bug report was last modified 9 years and 127 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.