gnupg/agent
NIIBE Yutaka 380bce13d9 agent: Use clock or clock_gettime for calibration.
* agent/protect.c (calibrate_get_time): Use clock or clock_gettime.

--

For calibration, clock(3) is better than times(3) among UNIXen.
Tested on NetBSD 7.1 and FreeBSD 11.1, using QEMU.

Thanks to Damien Goutte-Gattat for the information of use of
CLOCKS_PER_SEC;  The old code with times(3) is not 100% correct,
in terms of POSIX.  It should have used sysconf (_SC_CLK_TCK) instead
of CLOCKS_PER_SEC.  CLOCKS_PER_SEC is specifically for clock(3).

GnuPG-bug-id: 3056, 3276, 3472
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2017-11-07 10:49:36 +09:00
..
ChangeLog-2011 Fix typos 2015-10-28 10:20:17 +01:00
Makefile.am tests: Make it possible to run all tests using our infrastructure. 2017-05-11 18:12:37 +02:00
agent.h agent: New GETINFO sub-commands "s2k_count_cal" and "s2k_time". 2017-11-06 15:03:06 +01:00
all-tests.scm tests: Make it possible to run all tests using our infrastructure. 2017-05-11 18:12:37 +02:00
cache.c agent: Serialize access to passphrase cache. 2017-04-07 08:39:26 +09:00
call-pinentry.c agent: Clean up pinentry access locking. 2017-10-27 09:54:48 +09:00
call-scd.c agent: Fix cancellation handling for scdaemon. 2017-09-20 10:42:28 +09:00
command-ssh.c agent: Send pinentry the uid of connecting process where possible. 2017-10-19 03:09:44 -04:00
command.c agent: New GETINFO sub-commands "s2k_count_cal" and "s2k_time". 2017-11-06 15:03:06 +01:00
cvt-openpgp.c agent: Resolve conflict of util.h. 2017-03-07 19:22:48 +09:00
cvt-openpgp.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
divert-scd.c agent: Fix memory leaks. 2017-05-30 13:56:20 +09:00
findkey.c agent: Minor cleanup (mostly for documentation). 2017-07-28 10:38:57 +02:00
genkey.c agent: Use MAX_PASSPHRASE_LEN (255) also for the loopback. 2017-07-05 11:54:45 +02:00
gpg-agent-w32info.rc w32: Add icons and version information. 2013-05-07 21:35:48 +02:00
gpg-agent.c agent: New option --s2k-count. 2017-11-06 13:57:30 +01:00
keyformat.txt Clean up word replication. 2017-02-21 13:11:46 -05:00
learncard.c agent: Fix returning GPG_ERR_NOT_FOUND wrongly. 2017-11-02 16:23:10 +09:00
pkdecrypt.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
pksign.c agent: Minor cleanup (mostly for documentation). 2017-07-28 10:38:57 +02:00
preset-passphrase.c Fix usage of ARGPARSE_OPTS. 2017-07-19 13:41:18 +09:00
protect-tool.c agent: Resolve conflict of util.h. 2017-03-07 19:22:48 +09:00
protect.c agent: Use clock or clock_gettime for calibration. 2017-11-07 10:49:36 +09:00
t-protect.c agent: Use clock or clock_gettime for calibration. 2017-11-07 10:49:36 +09:00
trans.c Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00
trustlist.c Spelling fixes in docs and comments. 2017-04-28 10:06:33 +09:00
w32main.c agent: Resolve conflict of util.h. 2017-03-07 19:22:48 +09:00
w32main.h Change all http://www.gnu.org in license notices to https:// 2016-11-05 12:02:19 +01:00