summaryrefslogtreecommitdiffstats
path: root/agent/agent.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-12-11 18:12:51 +0100
committerWerner Koch <wk@gnupg.org>2018-12-11 18:12:51 +0100
commitcbcc8c19541fe8407f3b6588fce1535c64cf6b25 (patch)
treecc02d83240034f6089e321f16b2a6d821be7bbe6 /agent/agent.h
parentdirmngr: Retry another server from the pool on 502, 503, 504. (diff)
downloadgnupg2-cbcc8c19541fe8407f3b6588fce1535c64cf6b25.tar.xz
gnupg2-cbcc8c19541fe8407f3b6588fce1535c64cf6b25.zip
agent: Make the S2K calibration time runtime configurabe.
* agent/protect.c (s2k_calibration_time): New file global var. (calibrate_s2k_count): Use it here. (get_calibrated_s2k_count): Replace function static var by ... (s2k_calibrated_count): new file global var. (set_s2k_calibration_time): New function. * agent/gpg-agent.c (oS2KCalibration): New const. (opts): New option --s2k-calibration. (parse_rereadable_options): Parse that option. -- Note that using an unrelistic high value (like 60000) takes quite some time for calibration. GnuPG-bug-id: 3399 Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'agent/agent.h')
-rw-r--r--agent/agent.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/agent/agent.h b/agent/agent.h
index 8a3e5c6b6..05080f1f2 100644
--- a/agent/agent.h
+++ b/agent/agent.h
@@ -488,6 +488,7 @@ gpg_error_t agent_protect_and_store (ctrl_t ctrl, gcry_sexp_t s_skey,
char **passphrase_addr);
/*-- protect.c --*/
+void set_s2k_calibration_time (unsigned int milliseconds);
unsigned long get_calibrated_s2k_count (void);
unsigned long get_standard_s2k_count (void);
unsigned char get_standard_s2k_count_rfc4880 (void);