1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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
This commit is contained in:
Werner Koch 2022-05-28 17:37:34 +02:00
parent 9f1dcfc7a7
commit 7aabd94b81
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -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)
{