diff options
author | David Shaw <[email protected]> | 2005-11-10 21:18:49 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2005-11-10 21:18:49 +0000 |
commit | debc169f8858f3066a6cce7d04614a4ac927e2b1 (patch) | |
tree | fd2209037edc8e9524c89979b135a6be3b777cf2 /g10/export.c | |
parent | * options.skel: Add a section for --encrypt-to. This is Debian bug (diff) | |
download | gnupg-debc169f8858f3066a6cce7d04614a4ac927e2b1.tar.gz gnupg-debc169f8858f3066a6cce7d04614a4ac927e2b1.zip |
* trustdb.h, trustdb.c (clean_sigs_from_uid): Add flag to remove all
non-selfsigs from key during cleaning. Change all callers.
* export.c (do_export_stream): Use it here so we don't need additional
minimize code in the export path.
Diffstat (limited to '')
-rw-r--r-- | g10/export.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/g10/export.c b/g10/export.c index 053e1c185..a57105402 100644 --- a/g10/export.c +++ b/g10/export.c @@ -293,7 +293,6 @@ do_export_stream( IOBUF out, STRLIST users, int secret, subkey_list_t subkey_list = NULL; /* Track alreay processed subkeys. */ KEYDB_HANDLE kdbhd; STRLIST sl; - u32 keyid[2]; *any = 0; init_packet( &pkt ); @@ -383,10 +382,6 @@ do_export_stream( IOBUF out, STRLIST users, int secret, else { /* It's a public key export. */ - if((options&EXPORT_MINIMAL) - && (node=find_kbnode(keyblock,PKT_PUBLIC_KEY))) - keyid_from_pk(node->pkt->pkt.public_key,keyid); - if(options&EXPORT_CLEAN_UIDS) clean_uids_from_key(keyblock,opt.verbose); } @@ -460,26 +455,20 @@ do_export_stream( IOBUF out, STRLIST users, int secret, } } - if(node->pkt->pkttype==PKT_USER_ID) { /* Run clean_sigs_from_uid against each uid if - export-clean-sigs is on. */ + export-clean-sigs is on. export-minimal causes it + to remove all non-selfsigs as well. Note that + export-minimal only applies to UID sigs (0x10, + 0x11, 0x12, and 0x13). A designated revocation is + not stripped. */ if(options&EXPORT_CLEAN_SIGS) - clean_sigs_from_uid(keyblock,node,opt.verbose); + clean_sigs_from_uid(keyblock,node, + opt.verbose,options&EXPORT_MINIMAL); } else if(node->pkt->pkttype==PKT_SIGNATURE) { - /* If we have export-minimal turned on, do not include - any signature that isn't a selfsig. Note that this - only applies to uid sigs (0x10, 0x11, 0x12, and - 0x13). A designated revocation is not stripped. */ - if((options&EXPORT_MINIMAL) - && IS_UID_SIG(node->pkt->pkt.signature) - && (node->pkt->pkt.signature->keyid[0]!=keyid[0] - || node->pkt->pkt.signature->keyid[1]!=keyid[1])) - continue; - /* do not export packets which are marked as not exportable */ if(!(options&EXPORT_LOCAL_SIGS) |