diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 8cbb1f22..8129bafa 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -2827,7 +2827,8 @@ The @code{GPGME_KEYLIST_MODE_WITH_SECRET} returns information about the presence of a corresponding secret key in a public key listing. A public key listing with this mode is slower than a standard listing but can be used instead of a second run to list the secret keys. This -is only supported for GnuPG versions >= 2.1. +is only supported for GnuPG versions >= 2.1. Note that using this +option also makes sure that the keygrip is available in the output. @item GPGME_KEYLIST_MODE_EPHEMERAL @since{1.2.0} diff --git a/src/engine-gpg.c b/src/engine-gpg.c index c9928ed9..73e5245a 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -2997,7 +2997,10 @@ gpg_keylist_build_options (engine_gpg_t gpg, int secret_only, err = add_arg (gpg, "--with-tofu-info"); if (!err && (mode & GPGME_KEYLIST_MODE_WITH_SECRET)) - err = add_arg (gpg, "--with-secret"); + { + err = add_arg (gpg, "--with-secret"); + err = add_arg (gpg, "--with-keygrip"); + } if (!err && (mode & GPGME_KEYLIST_MODE_SIGS)