diff options
author | David Shaw <[email protected]> | 2004-11-26 15:51:37 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-11-26 15:51:37 +0000 |
commit | 6dedf7a068e617b7d5af94fece868c86f7cdff55 (patch) | |
tree | 0a0d8b0ac74d03cd123ccc9bb38e86c00e9c2e73 /g10/export.c | |
parent | * options.h, export.c (parse_export_options, do_export_stream): Add (diff) | |
download | gnupg-6dedf7a068e617b7d5af94fece868c86f7cdff55.tar.gz gnupg-6dedf7a068e617b7d5af94fece868c86f7cdff55.zip |
* options.h, export.c (parse_export_options, do_export_stream), import.c
(parse_import_options, import_keys_internal): Make the import-options and
export-options distinct since they can be mixed together as part of
keyserver-options.
Diffstat (limited to '')
-rw-r--r-- | g10/export.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/g10/export.c b/g10/export.c index 40e5b4424..f56019b37 100644 --- a/g10/export.c +++ b/g10/export.c @@ -45,10 +45,14 @@ parse_export_options(char *str,unsigned int *options,int noisy) { struct parse_options export_opts[]= { - {"include-local-sigs",EXPORT_INCLUDE_LOCAL_SIGS,NULL}, - {"include-attributes",EXPORT_INCLUDE_ATTRIBUTES,NULL}, - {"include-sensitive-revkeys",EXPORT_INCLUDE_SENSITIVE_REVKEYS,NULL}, + {"export-local-sigs",EXPORT_LOCAL_SIGS,NULL}, + {"export-attributes",EXPORT_ATTRIBUTES,NULL}, + {"export-sensitive-revkeys",EXPORT_SENSITIVE_REVKEYS,NULL}, {"export-minimal",EXPORT_MINIMAL,NULL}, + /* Aliases for backward compatibility */ + {"include-local-sigs",EXPORT_LOCAL_SIGS,NULL}, + {"include-attributes",EXPORT_ATTRIBUTES,NULL}, + {"include-sensitive-revkeys",EXPORT_SENSITIVE_REVKEYS,NULL}, {NULL,0,NULL} /* add tags for include revoked and disabled? */ }; @@ -318,7 +322,7 @@ do_export_stream( IOBUF out, STRLIST users, int secret, continue; /* do not export packets which are marked as not exportable */ - if(!(options&EXPORT_INCLUDE_LOCAL_SIGS) + if(!(options&EXPORT_LOCAL_SIGS) && !node->pkt->pkt.signature->flags.exportable) continue; /* not exportable */ @@ -326,7 +330,7 @@ do_export_stream( IOBUF out, STRLIST users, int secret, key unless the user wants us to. Note that we do export these when issuing the actual revocation (see revoke.c). */ - if(!(options&EXPORT_INCLUDE_SENSITIVE_REVKEYS) + if(!(options&EXPORT_SENSITIVE_REVKEYS) && node->pkt->pkt.signature->revkey) { int i; @@ -341,7 +345,7 @@ do_export_stream( IOBUF out, STRLIST users, int secret, } /* Don't export attribs? */ - if( !(options&EXPORT_INCLUDE_ATTRIBUTES) && + if( !(options&EXPORT_ATTRIBUTES) && node->pkt->pkttype == PKT_USER_ID && node->pkt->pkt.user_id->attrib_data ) { /* Skip until we get to something that is not an attrib |