diff options
author | Werner Koch <wk@gnupg.org> | 2014-10-30 09:55:51 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-10-30 09:55:51 +0100 |
commit | 9546aa3cc87fc83a40768a12fbbceb19496ce129 (patch) | |
tree | 4615b34ccbfcd5c2be616c84285ea822822c4d72 /agent | |
parent | po: Add a new German translation (diff) | |
download | gnupg2-9546aa3cc87fc83a40768a12fbbceb19496ce129.tar.xz gnupg2-9546aa3cc87fc83a40768a12fbbceb19496ce129.zip |
tests: Speed up the genkey1024.test by using not so strong random.
* agent/gpg-agent.c (oDebugQuickRandom): New.
(opts): New option --debug-quick-random.
(main): Use new option.
* common/asshelp.c (start_new_gpg_agent): Add hack to pass an
additional argument for the agent name.
* tests/openpgp/defs.inc: Pass --debug-quick-random to the gpg-agent
starting parameters.
* tests/openpgp/version.test: Ditto.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'agent')
-rw-r--r-- | agent/gpg-agent.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index af9150640..3f03ff4dc 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -81,6 +81,7 @@ enum cmd_and_opt_values oDebugAll, oDebugLevel, oDebugWait, + oDebugQuickRandom, oNoGreeting, oNoOptions, oHomedir, @@ -149,6 +150,7 @@ static ARGPARSE_OPTS opts[] = { { oDebugAll, "debug-all" ,0, "@"}, { oDebugLevel, "debug-level" ,2, "@"}, { oDebugWait,"debug-wait",1, "@"}, + ARGPARSE_s_n (oDebugQuickRandom, "debug-quick-random", "@"), { oNoDetach, "no-detach" ,0, N_("do not detach from the console")}, { oNoGrab, "no-grab" ,0, N_("do not grab keyboard and mouse")}, { oLogFile, "log-file" ,2, N_("use a log file for the server")}, @@ -730,6 +732,11 @@ main (int argc, char **argv ) default_config = 0; /* --no-options */ else if (pargs.r_opt == oHomedir) opt.homedir = pargs.r.ret_str; + else if (pargs.r_opt == oDebugQuickRandom) + { + gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); + } + } /* Initialize the secure memory. */ @@ -847,6 +854,10 @@ main (int argc, char **argv ) # endif break; + case oDebugQuickRandom: + /* Only used by the first stage command line parser. */ + break; + case oWriteEnvFile: /* dummy */ break; default : pargs.err = configfp? 1:2; break; |