1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* 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.
This commit is contained in:
David Shaw 2004-11-26 15:51:37 +00:00
parent 9a70afe2b3
commit 6dedf7a068
5 changed files with 32 additions and 19 deletions

View file

@ -88,12 +88,14 @@ parse_import_options(char *str,unsigned int *options,int noisy)
{
struct parse_options import_opts[]=
{
{"allow-local-sigs",IMPORT_ALLOW_LOCAL_SIGS,NULL},
{"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL},
{"import-local-sigs",IMPORT_LOCAL_SIGS,NULL},
{"repair-pks-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL},
{"fast-import",IMPORT_FAST_IMPORT,NULL},
{"fast-import",IMPORT_FAST,NULL},
{"convert-sk-to-pk",IMPORT_SK2PK,NULL},
{"merge-only",IMPORT_MERGE_ONLY,NULL},
/* Aliases for backward compatibility */
{"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL},
{"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL},
{NULL,0,NULL}
};
@ -195,7 +197,7 @@ import_keys_internal( IOBUF inp, char **fnames, int nnames,
that was other than a selfsig, or any revocation), then
update/check the trustdb if the user specified by setting
interactive or by not setting no-auto-check-trustdb */
if (!(options&IMPORT_FAST_IMPORT) && trustdb_pending_check())
if (!(options&IMPORT_FAST) && trustdb_pending_check())
{
if (opt.interactive)
update_trustdb();
@ -1493,7 +1495,7 @@ delete_inv_parts( const char *fname, KBNODE keyblock,
delete_kbnode( node ); /* build_packet() can't handle this */
else if( node->pkt->pkttype == PKT_SIGNATURE &&
!node->pkt->pkt.signature->flags.exportable &&
!(options&IMPORT_ALLOW_LOCAL_SIGS) &&
!(options&IMPORT_LOCAL_SIGS) &&
seckey_available( node->pkt->pkt.signature->keyid ) )
{
/* here we violate the rfc a bit by still allowing