summaryrefslogtreecommitdiffstats
path: root/g10/export.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2022-05-28 17:37:34 +0200
committerWerner Koch <wk@gnupg.org>2022-05-28 17:38:13 +0200
commit7aabd94b8103432b42cd909e911bf0c645e0298c (patch)
treef2c87577794583286e14b69965de7a244b40fd3b /g10/export.c
parentagent: New field "Prompt" to prevent asking card key insertion. (diff)
downloadgnupg2-7aabd94b8103432b42cd909e911bf0c645e0298c.tar.xz
gnupg2-7aabd94b8103432b42cd909e911bf0c645e0298c.zip
gpg: Setup the 'usage' filter property for export.
* g10/export.c (do_export_stream): Merge the key to get the properties ready. -- This makes gpg --export --export-filter 'drop-subkey=usage=~a' (Export all subkeys but those with the auth usage) work without using the workaound of adding --export-options export-clean
Diffstat (limited to 'g10/export.c')
-rw-r--r--g10/export.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/export.c b/g10/export.c
index 1eec70935..edf27bc4d 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -2066,6 +2066,12 @@ do_export_stream (ctrl_t ctrl, iobuf_t out, strlist_t users, int secret,
NULL, NULL);
commit_kbnode (&keyblock);
}
+ else if (export_keep_uid || export_drop_subkey)
+ {
+ /* Need to merge so that for example the "usage" property
+ * has been setup. */
+ merge_keys_and_selfsig (ctrl, keyblock);
+ }
if (export_keep_uid)
{