diff options
author | Werner Koch <wk@gnupg.org> | 2020-03-13 13:17:51 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-03-13 13:19:31 +0100 |
commit | 32493ce50ad880de7b548d7870c6040a8233a8f5 (patch) | |
tree | 61ae869cc0e4c550c257bf2001723aaf735df605 /g10/import.c | |
parent | doc: Add a comment to explain the signature postscript. (diff) | |
download | gnupg2-32493ce50ad880de7b548d7870c6040a8233a8f5.tar.xz gnupg2-32493ce50ad880de7b548d7870c6040a8233a8f5.zip |
gpg: Add property "fpr" for use by --export-filter.
* g10/export.c (push_export_filters): New.
(pop_export_filters): New.
(export_pubkey_buffer): Add args prefix and prefixlen. Adjust
callers.
* g10/import.c (impex_filter_getval): Add property "fpr".
* g10/main.h (struct impex_filter_parm_s): Add field hexfpr.
--
The push and pop feature will help us to use the export filter
internally in gpg. Same for the export_pubkey_buffer change.
GnuPG-bug-id: 4856
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/import.c')
-rw-r--r-- | g10/import.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/import.c b/g10/import.c index ab825085e..77c05c1f1 100644 --- a/g10/import.c +++ b/g10/import.c @@ -1478,6 +1478,11 @@ impex_filter_getval (void *cookie, const char *propname) (pk->pubkey_usage & PUBKEY_USAGE_UNKNOWN)?"?":""); result = numbuf; } + else if (!strcmp (propname, "fpr")) + { + hexfingerprint (pk, parm->hexfpr, sizeof parm->hexfpr); + result = parm->hexfpr; + } else result = NULL; } |