diff options
author | NIIBE Yutaka <[email protected]> | 2018-07-12 08:09:14 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2018-07-12 08:09:14 +0000 |
commit | e8caa282d3d5f286919a1ed3db6699c555b7e89d (patch) | |
tree | 1762014bacef69c542923f55dfe83a2f925d7999 /g10/export.c | |
parent | g10: Fix enum_secret_keys for card keys. (diff) | |
parent | gpg: Remove multiple subkey bindings during export-clean. (diff) | |
download | gnupg-gniibe/decryption-key.tar.gz gnupg-gniibe/decryption-key.zip |
Merge branch 'master' into gniibe/decryption-keygniibe/decryption-key
Diffstat (limited to 'g10/export.c')
-rw-r--r-- | g10/export.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/g10/export.c b/g10/export.c index c538dc1f1..e94e959fb 100644 --- a/g10/export.c +++ b/g10/export.c @@ -41,6 +41,8 @@ #include "../common/init.h" #include "trustdb.h" #include "call-agent.h" +#include "key-clean.h" + /* An object to keep track of subkeys. */ struct subkey_list_s @@ -2001,12 +2003,19 @@ do_export_stream (ctrl_t ctrl, iobuf_t out, strlist_t users, int secret, } /* Always do the cleaning on the public key part if requested. - * Note that both export-clean and export-minimal only apply to - * UID sigs (0x10, 0x11, 0x12, and 0x13). A designated - * revocation is never stripped, even with export-minimal set. */ + * A designated revocation is never stripped, even with + * export-minimal set. */ if ((options & EXPORT_CLEAN)) - clean_key (ctrl, keyblock, opt.verbose, - (options&EXPORT_MINIMAL), NULL, NULL); + { + merge_keys_and_selfsig (ctrl, keyblock); + clean_all_uids (ctrl, keyblock, opt.verbose, + (options&EXPORT_MINIMAL), NULL, NULL); + clean_all_subkeys (ctrl, keyblock, opt.verbose, + (options&EXPORT_MINIMAL)? KEY_CLEAN_ALL + /**/ : KEY_CLEAN_AUTHENCR, + NULL, NULL); + commit_kbnode (&keyblock); + } if (export_keep_uid) { |