diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-06-20 22:22:59 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-06-20 22:22:59 +0200 |
commit | e2d453f1d2c9db904f2d3dc3146c7fc3f2565bef (patch) | |
tree | 2bab2ad10d4189b12c60c5be10c502fc2e8ab4d5 /src/mint-tools | |
parent | 605058f774a2852e2a0d2ca2b201a889c0edbd09 (diff) |
also check timestamps are round
Diffstat (limited to 'src/mint-tools')
-rw-r--r-- | src/mint-tools/taler-mint-keycheck.c | 19 |
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, |