aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpgv.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2022-11-25 15:04:54 +0000
committerWerner Koch <[email protected]>2022-11-25 15:04:54 +0000
commit1324dc3490b02c4ff818655db1474c594f04e4ec (patch)
treeb9c72c1068de3d8e2d7238e2d9a7f3c1e1a82651 /g10/gpgv.c
parentdirmngr: Silence ocsp debug output. (diff)
downloadgnupg-1324dc3490b02c4ff818655db1474c594f04e4ec.tar.gz
gnupg-1324dc3490b02c4ff818655db1474c594f04e4ec.zip
gpg: New option --list-filter
* g10/gpg.c (oListFilter): New. (opts): Add --list-filter. (main): Parse oListFilter. * g10/keylist.c: Include init.h and recsel.h. (struct list_filter_s, list_filter): New. (release_list_filter): New. (cleanup_keylist_globals): New. (parse_and_set_list_filter): New. (list_keyblock): Implement --list-filter type "select". * g10/import.c (impex_filter_getval): Add scope support and new property names "key-size", "algostr", "origin", "lastupd", and "url". -- This option is pretty useful to select keys based on their properties. The scope thing can be sued to limit a selection to just the primary key or to subkeys. For example: gpg -k --list-filter 'select=revoked-f && sub/algostr=ed25519' Lists all non-revoked keys with an ed25519 (signing)-subkey.
Diffstat (limited to 'g10/gpgv.c')
-rw-r--r--g10/gpgv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/g10/gpgv.c b/g10/gpgv.c
index 3bb99dc6c..ceded4af9 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -812,3 +812,11 @@ get_revocation_reason (PKT_signature *sig, char **r_reason,
*r_comment = NULL;
return 0;
}
+
+const char *
+impex_filter_getval (void *cookie, const char *propname)
+{
+ (void)cookie;
+ (void)propname;
+ return NULL;
+}