core: Make sure the keygrip is available in WITH_SECRET mode.
* src/engine-gpg.c (gpg_keylist_build_options): Send --with-keygrip if --with-secret is used. -- Since GnuPG 2.2.19 the keygrip was not anymore send if only --with-secret was used in a public key listing. Given that --with-secret requires computation of the keygrip anyway, there is no point in not requesting the keyrip in this case. GnuPG-bug-id: 4820
This commit is contained in:
parent
5c0d1c7f76
commit
004fdf61c8
@ -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
|
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
|
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
|
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
|
@item GPGME_KEYLIST_MODE_EPHEMERAL
|
||||||
@since{1.2.0}
|
@since{1.2.0}
|
||||||
|
@ -2997,7 +2997,10 @@ gpg_keylist_build_options (engine_gpg_t gpg, int secret_only,
|
|||||||
err = add_arg (gpg, "--with-tofu-info");
|
err = add_arg (gpg, "--with-tofu-info");
|
||||||
|
|
||||||
if (!err && (mode & GPGME_KEYLIST_MODE_WITH_SECRET))
|
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
|
if (!err
|
||||||
&& (mode & GPGME_KEYLIST_MODE_SIGS)
|
&& (mode & GPGME_KEYLIST_MODE_SIGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user