Gpg 2.1.10 - Invalid error with --encrypt-to

Neal H. Walfield neal at walfield.org
Mon Dec 14 12:00:07 CET 2015


Hi Patrick,

Thanks for reporting this!

On Sat, 12 Dec 2015 18:27:18 +0100,
Patrick Brunschwig wrote:
> Using GnuPG 2.1.10 with --encrypt-to brings wrong error messages. An
> example can be found here: https://bugs.gnupg.org/gnupg/issue2186
> 
> Another example is this one:
> 
> Using gpg2 --encrypt-to 0x4F9F89F5505AC1D1A260631CDB1187B9DD5F693B \
>   -r someone - e
> 
> Results in the following error message, which I consider wrong:
> 
> gpg: key specification '0x4F9F89F5505AC1D1A260631CDB1187B9DD5F693B' is
> ambiguous
> gpg: (check argument of option '--encrypt-to')
> gpg: '0x4F9F89F5505AC1D1A260631CDB1187B9DD5F693B' matches at least:
> gpg:   4F9F89F5505AC1D1A260631CDB1187B9DD5F693B
> gpg:   4F9F89F5505AC1D1A260631CDB1187B9DD5F693B
> 
> Result of gpg2 --list-keys 0x4F9F89F5505AC1D1A260631CDB1187B9DD5F693B:
> 
> pub   rsa4096/DD5F693B 2015-01-17 [expires: 2025-01-14]
> uid         [  full  ] Patrick Brunschwig <patrick at enigmail.net>
> uid         [  full  ] Patrick Brunschwig <patrick at brunschwig.net>
> uid         [  full  ] [jpeg image of size 13251]
> sub   rsa4096/4E4953D8 2015-01-17 [expires: 2018-01-16]

This error has been turned into a more exact warning in 6dc37c5f:

  gpg: Don't error out if a key occurs multiple times in the keyring.

This might suggest some keyring corruption.  Are you using a keyring
or a keybox (try running gpg2 -k KEYID with --debug=lookup)?  Are you
using multiple keyrings/keyboxes?

Thanks!

Neal



More information about the Gnupg-devel mailing list