aboutsummaryrefslogtreecommitdiffstats
path: root/g10/sig-check.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-09-27 05:58:02 +0000
committerWerner Koch <[email protected]>2017-09-27 05:59:07 +0000
commit6aa4478c78cb34cf3d0ae5c752525110947bd247 (patch)
tree7345a77a543e33177143c554eac5a74a8bb5d78b /g10/sig-check.c
parentMerge branch 'STABLE-BRANCH-2-2' into master (diff)
downloadgnupg-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 'g10/sig-check.c')
-rw-r--r--g10/sig-check.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/g10/sig-check.c b/g10/sig-check.c
index 23af12b2e..63c38a64a 100644
--- a/g10/sig-check.c
+++ b/g10/sig-check.c
@@ -510,7 +510,11 @@ check_signature_end_simple (PKT_public_key *pk, PKT_signature *sig,
return GPG_ERR_GENERAL;
/* Verify the signature. */
+ if (DBG_CLOCK && sig->sig_class <= 0x01)
+ log_clock ("enter pk_verify");
rc = pk_verify( pk->pubkey_algo, result, sig->data, pk->pkey );
+ if (DBG_CLOCK && sig->sig_class <= 0x01)
+ log_clock ("leave pk_verify");
gcry_mpi_release (result);
if( !rc && sig->flags.unknown_critical )