gpg: Include ADSK keys in a key listing with fingerprints.
* g10/keydb.h (GET_PUBKEYBLOCK_FLAG_ADSK): Remove. (GETKEY_ALLOW_ADSK): New. * g10/getkey.c (get_pubkeyblock_ext): Use the new flag instead. Change the caller using the old flag. (key_byname): Support the GETKEY_ALLOW_ADSK flag. (getkey_bynames): Change to use aan arg flags instead of want_secret. This allows to pass more flag values. Adjust callers. * g10/keylist.c (list_one): Pass GETKEY_ALLOW_ADSK.
Updates-commit: 882ab7fef9bf4440900c32d7463469307224f11a
When using
gpg -k <adsk-subkey-fingerprint>
only the actual ADSK key (the one having the E capability set for the
subkey) was listed. However, when using
gpg -k <adsk-subkey-fingerprint>!
all keys having this subkey (with E or R capability) were listed.
This is suprising and thus needs to be fixed. With this patch the
exact search ('!' suffix) is not anymore required.
This bug was found while fixing the unrelated
- GnuPG-bug-id: T7892