summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-20 22:22:59 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-20 22:22:59 +0200
commite2d453f1d2c9db904f2d3dc3146c7fc3f2565bef (patch)
tree2bab2ad10d4189b12c60c5be10c502fc2e8ab4d5 /src
parent605058f774a2852e2a0d2ca2b201a889c0edbd09 (diff)
downloadexchange-e2d453f1d2c9db904f2d3dc3146c7fc3f2565bef.tar.gz
exchange-e2d453f1d2c9db904f2d3dc3146c7fc3f2565bef.tar.bz2
exchange-e2d453f1d2c9db904f2d3dc3146c7fc3f2565bef.zip
also check timestamps are round
Diffstat (limited to 'src')
-rw-r--r--src/mint-tools/taler-mint-keycheck.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mint-tools/taler-mint-keycheck.c b/src/mint-tools/taler-mint-keycheck.c
index 22bf1e719..e6fa1ea6e 100644
--- a/src/mint-tools/taler-mint-keycheck.c
+++ b/src/mint-tools/taler-mint-keycheck.c
@@ -68,6 +68,15 @@ signkeys_iter (void *cls,
filename);
return GNUNET_SYSERR;
}
+ if ( (0 != GNUNET_TIME_absolute_ntoh (ski->issue.start).abs_value_us % 1000000) ||
+ (0 != GNUNET_TIME_absolute_ntoh (ski->issue.expire).abs_value_us % 1000000) ||
+ (0 != GNUNET_TIME_absolute_ntoh (ski->issue.end).abs_value_us % 1000000) )
+ {
+ fprintf (stderr,
+ "Timestamps are not multiples of a round second\n");
+ return GNUNET_SYSERR;
+ }
+
if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_SIGNING_KEY_VALIDITY,
&ski->issue.purpose,
@@ -130,6 +139,16 @@ denomkeys_iter (void *cls,
return GNUNET_SYSERR;
}
+ if ( (0 != GNUNET_TIME_absolute_ntoh (dki->issue.start).abs_value_us % 1000000) ||
+ (0 != GNUNET_TIME_absolute_ntoh (dki->issue.expire_withdraw).abs_value_us % 1000000) ||
+ (0 != GNUNET_TIME_absolute_ntoh (dki->issue.expire_legal).abs_value_us % 1000000) ||
+ (0 != GNUNET_TIME_absolute_ntoh (dki->issue.expire_spend).abs_value_us % 1000000) )
+ {
+ fprintf (stderr,
+ "Timestamps are not multiples of a round second\n");
+ return GNUNET_SYSERR;
+ }
+
if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_DENOMINATION_KEY_VALIDITY,
&dki->issue.purpose,