aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-20 18:27:10 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-20 18:27:10 +0100
commitd986555355de315121f1285c04ccc89082ba9755 (patch)
treeebfda7d16a20e77cab79f6944e18111374ec05db /src/util
parent1fcfdf4c9e5835c81b8424febc854fb7f9d0829b (diff)
log when we sign, with error if time does not match expectations
Diffstat (limited to 'src/util')
-rw-r--r--src/util/taler-helper-crypto-eddsa.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/util/taler-helper-crypto-eddsa.c b/src/util/taler-helper-crypto-eddsa.c
index c229a8c1f..ccea02149 100644
--- a/src/util/taler-helper-crypto-eddsa.c
+++ b/src/util/taler-helper-crypto-eddsa.c
@@ -573,6 +573,27 @@ handle_sign_request (const struct sockaddr_un *addr,
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Received request to sign over %u bytes\n",
(unsigned int) purpose_size);
+ {
+ struct GNUNET_TIME_Absolute now;
+
+ now = GNUNET_TIME_absolute_get ();
+ if ( (now.abs_value_us >= keys_head->anchor.abs_value_us) &&
+ (now.abs_value_us < keys_head->anchor.abs_value_us
+ + duration.rel_value_us) )
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Signing at %llu with key valid from %llu to %llu\n",
+ (unsigned long long) now.abs_value_us,
+ (unsigned long long) keys_head->anchor.abs_value_us,
+ (unsigned long long) keys_head->anchor.abs_value_us
+ + duration.rel_value_us);
+ else
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Signing at %llu with key valid from %llu to %llu\n",
+ (unsigned long long) now.abs_value_us,
+ (unsigned long long) keys_head->anchor.abs_value_us,
+ (unsigned long long) keys_head->anchor.abs_value_us
+ + duration.rel_value_us);
+ }
wi = GNUNET_new (struct WorkItem);
wi->addr = *addr;
wi->addr_size = addr_size;