mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* options.h, main.h, export.c (parse_export_options, do_export_stream),
g10.c (main): add new --export-options option. Current flags are "include-non-rfc", "include-local-sigs", "include-attributes", and "include-sensitive-revkeys". * options.h, hkp.c (hkp_export), keyserver.c (parse_keyserver_options, keyserver_spawn): try passing unknown keyserver options to export options, and if successful, use them when doing a keyserver --send-key. * build-packet.c (build_sig_subpkt): We do not generate SIGSUBPKT_PRIV_VERIFY_CACHE anymore.
This commit is contained in:
parent
b65aced7b2
commit
002f085c23
8 changed files with 111 additions and 33 deletions
16
g10/g10.c
16
g10/g10.c
|
@ -237,6 +237,7 @@ enum cmd_and_opt_values { aNull = 0,
|
|||
oLockNever,
|
||||
oKeyServer,
|
||||
oKeyServerOptions,
|
||||
oExportOptions,
|
||||
oTempDir,
|
||||
oExecPath,
|
||||
oEncryptTo,
|
||||
|
@ -409,6 +410,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,"@"},
|
||||
{ oExportOptions, "export-options",2,"@"},
|
||||
{ oCharset, "charset" , 2, N_("|NAME|set terminal charset to NAME") },
|
||||
{ oOptions, "options" , 2, N_("read options from file")},
|
||||
|
||||
|
@ -902,6 +904,8 @@ main( int argc, char **argv )
|
|||
opt.pgp2_workarounds = 1;
|
||||
opt.force_v3_sigs = 1;
|
||||
opt.escape_from = 1;
|
||||
opt.export_options=EXPORT_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__)
|
||||
|
@ -1331,6 +1335,16 @@ main( int argc, char **argv )
|
|||
case oKeyServerOptions:
|
||||
parse_keyserver_options(pargs.r.ret_str);
|
||||
break;
|
||||
case oExportOptions:
|
||||
if(!parse_export_options(pargs.r.ret_str,&opt.export_options))
|
||||
{
|
||||
if(configname)
|
||||
log_error(_("%s:%d: invalid export options\n"),
|
||||
configname,configlineno);
|
||||
else
|
||||
log_error(_("invalid export options\n"));
|
||||
}
|
||||
break;
|
||||
case oTempDir: opt.temp_dir=pargs.r.ret_str; break;
|
||||
case oExecPath:
|
||||
#ifndef FIXED_EXEC_PATH
|
||||
|
@ -2009,7 +2023,7 @@ main( int argc, char **argv )
|
|||
else if( cmd == aRecvKeys )
|
||||
keyserver_import( sl );
|
||||
else
|
||||
export_pubkeys( sl, (cmd == aExport)?EXPORT_FLAG_ONLYRFC:0 );
|
||||
export_pubkeys( sl, opt.export_options );
|
||||
free_strlist(sl);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue