diff options
| author | Werner Koch <[email protected]> | 2017-09-27 05:58:02 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2017-09-27 05:59:07 +0000 |
| commit | 6aa4478c78cb34cf3d0ae5c752525110947bd247 (patch) | |
| tree | 7345a77a543e33177143c554eac5a74a8bb5d78b /common/logging.c | |
| parent | Merge branch 'STABLE-BRANCH-2-2' into master (diff) | |
| download | gnupg-6aa4478c78cb34cf3d0ae5c752525110947bd247.tar.gz gnupg-6aa4478c78cb34cf3d0ae5c752525110947bd247.zip | |
gpg: Let --debug clock time sign and verify.
* configure.ac (ENABLE_LOG_CLOCK): New ac_define and option.
* common/logging.c (log_clock): Use ENABLE_LOG_CLOCK to enable
timestamp printing.
* g10/call-agent.c (agent_pksign): Time signing.
* g10/sig-check.c (check_signature_end_simple): Time verification.
--
Timing for verification is limited to data signatures because this is
the most common thing to evaluate. We should consider to change
log_clock to printf style so that we could print the signature class
and other info.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/logging.c')
| -rw-r--r-- | common/logging.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/logging.c b/common/logging.c index c4eaca411..82b21e25b 100644 --- a/common/logging.c +++ b/common/logging.c @@ -1039,11 +1039,11 @@ log_printsexp () {} is found in sexputils.c */ - +/* Print a microsecond timestamp followed by STRING. */ void log_clock (const char *string) { -#if 0 +#if ENABLE_LOG_CLOCK static unsigned long long initial; struct timespec tv; unsigned long long now; @@ -1060,10 +1060,10 @@ log_clock (const char *string) initial = now; log_debug ("[%6llu] %s", (now - initial)/1000, string); -#else - /* You need to link with -ltr to enable the above code. */ - log_debug ("[not enabled in the source] %s", string); -#endif +#else /*!ENABLE_LOG_CLOCK*/ + /* You may need to link with -ltr to use the above code. */ + log_debug ("[not enabled by configure] %s", string); +#endif /*!ENABLE_LOG_CLOCK*/ } |
