aboutsummaryrefslogtreecommitdiffstats
path: root/g10/g10.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-07-22 22:26:14 +0000
committerDavid Shaw <[email protected]>2002-07-22 22:26:14 +0000
commit125613737cf7b2e600b782369d40473b1bacb603 (patch)
tree7ec067b90bbf1de0ff4c65bc51d6752f44e83db6 /g10/g10.c
parent* options.h, main.h, export.c (parse_export_options, do_export_stream), (diff)
downloadgnupg-125613737cf7b2e600b782369d40473b1bacb603.tar.gz
gnupg-125613737cf7b2e600b782369d40473b1bacb603.zip
* options.h, main.h, g10.c (main), import.c (parse_import_options,
delete_inv_parts), keyserver.c (parse_keyserver_options): add new --import-options option. The only current flag is "allow-local-sigs". * g10.c (main): Don't disable MDC in pgp7 mode. * options.h, g10.c (main), keyserver.c (parse_keyserver_options): Remove old keyserver-option include-attributes now that there is an export-option for the same thing.
Diffstat (limited to '')
-rw-r--r--g10/g10.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/g10/g10.c b/g10/g10.c
index 6f7046ee4..1c542c8f5 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -237,6 +237,7 @@ enum cmd_and_opt_values { aNull = 0,
oLockNever,
oKeyServer,
oKeyServerOptions,
+ oImportOptions,
oExportOptions,
oTempDir,
oExecPath,
@@ -410,6 +411,7 @@ static ARGPARSE_OPTS opts[] = {
{ oDefaultKey, "default-key" ,2, N_("|NAME|use NAME as default secret key")},
{ oKeyServer, "keyserver",2, N_("|HOST|use this keyserver to lookup keys")},
{ oKeyServerOptions, "keyserver-options",2,"@"},
+ { oImportOptions, "import-options",2,"@"},
{ oExportOptions, "export-options",2,"@"},
{ oCharset, "charset" , 2, N_("|NAME|set terminal charset to NAME") },
{ oOptions, "options" , 2, N_("read options from file")},
@@ -904,10 +906,11 @@ main( int argc, char **argv )
opt.pgp2_workarounds = 1;
opt.force_v3_sigs = 1;
opt.escape_from = 1;
+ opt.import_options=IMPORT_DEFAULT;
opt.export_options=EXPORT_DEFAULT;
+ opt.keyserver_options.import_options=IMPORT_DEFAULT;
opt.keyserver_options.export_options=EXPORT_DEFAULT;
opt.keyserver_options.include_subkeys=1;
- opt.keyserver_options.include_attributes=1;
#if defined (__MINGW32__) || defined (__CYGWIN32__)
opt.homedir = read_w32_registry_string( NULL, "Software\\GNU\\GnuPG", "HomeDir" );
#else
@@ -1335,6 +1338,16 @@ main( int argc, char **argv )
case oKeyServerOptions:
parse_keyserver_options(pargs.r.ret_str);
break;
+ case oImportOptions:
+ if(!parse_import_options(pargs.r.ret_str,&opt.import_options))
+ {
+ if(configname)
+ log_error(_("%s:%d: invalid import options\n"),
+ configname,configlineno);
+ else
+ log_error(_("invalid import options\n"));
+ }
+ break;
case oExportOptions:
if(!parse_export_options(pargs.r.ret_str,&opt.export_options))
{
@@ -1591,13 +1604,17 @@ main( int argc, char **argv )
if(opt.pgp6 || opt.pgp7)
{
- opt.force_mdc=0;
- opt.disable_mdc=1;
opt.sk_comments=0;
opt.escape_from=1;
opt.force_v3_sigs=1;
opt.ask_sig_expire=0;
opt.def_compress_algo=1;
+
+ if(opt.pgp6) /* pgp7 has MDC */
+ {
+ opt.force_mdc=0;
+ opt.disable_mdc=1;
+ }
}
}