diff options
author | Werner Koch <wk@gnupg.org> | 2017-11-06 13:57:30 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2017-11-06 13:57:30 +0100 |
commit | f7212f1d11aad5d910d2c77b2e5c6ab31a0e786e (patch) | |
tree | c75b6ee534d5230455d56de87d5f316551abc605 /agent/protect.c | |
parent | gpg: Unifiy the message for re-configuring cards. (diff) | |
download | gnupg2-f7212f1d11aad5d910d2c77b2e5c6ab31a0e786e.tar.xz gnupg2-f7212f1d11aad5d910d2c77b2e5c6ab31a0e786e.zip |
agent: New option --s2k-count.
* agent/agent.h (opt): New field 's2k_count'.
* agent/gpg-agent.c (oS2KCount): New enum value.
(opts): New option --s2k-count.
(parse_rereadable_options): Set opt.s2k_count.
--
This option is useful to speed up the starting of gpg-agent and in
cases where the auto-calibration runs into problems due to a broken
time measurement facility.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'agent/protect.c')
-rw-r--r-- | agent/protect.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/agent/protect.c b/agent/protect.c index 9b262a978..9b4ba9143 100644 --- a/agent/protect.c +++ b/agent/protect.c @@ -198,6 +198,9 @@ get_standard_s2k_count (void) { static unsigned long count; + if (opt.s2k_count) + return opt.s2k_count < 65536 ? 65536 : opt.s2k_count; + if (!count) count = calibrate_s2k_count (); |