Diffusion GPGME c4cf527ea227

gpg: Send --with-keygrip when listing keys

Authored by dkg on Jan 23 2020, 11:04 PM.

Description

gpg: Send --with-keygrip when listing keys

* src/engine-gpg.c (gpg_keylist_build_options): Always pass
--with-keygrip when listing keys.

Some older versions of GnuPG (at least gpg in version
2.2.12-1+deb10u1) appear to unilaterally emit the keygrip, and it's
certainly useful to know that programmatically it will always be
present in the output needed.

However, as of GnuPG 2.2.19-1, the following command does not emit the
keygrip for non-secret keys:

gpg --with-colons --with-secret --list-keys

This change fixes tests/json/t-json by making the output comply with
tests/json/t-keylist-secret.out.json correctly.

  • Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  • GnuPG-Bug-Id: T4820

Details

Committed
dkgJan 23 2020, 11:57 PM
Parents
rMf2aeb2563ba2: tests/json: Bravo key does not have secret key material
Branches
Unknown
Tags
Unknown
References
dkg/fix-4820
Tasks
T4820: gpgme's json test fails with gpg 2.2.19