summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-19 11:16:55 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-19 11:16:55 +0200
commit6d222b2d6c1a8614de261f60a65d273087b9f38f (patch)
treed493f1093397ba76b08e8f1a4ca8448e33dfd706 /src
parentd9dbc4438947663b146e8f07037ab86db2627b63 (diff)
downloadexchange-6d222b2d6c1a8614de261f60a65d273087b9f38f.tar.gz
exchange-6d222b2d6c1a8614de261f60a65d273087b9f38f.tar.bz2
exchange-6d222b2d6c1a8614de261f60a65d273087b9f38f.zip
fix size calculation in keycheck tool
Diffstat (limited to 'src')
-rw-r--r--src/mint-tools/taler-mint-keycheck.c4
-rw-r--r--src/mint-tools/taler-mint-keyup.c2
-rw-r--r--src/mintdb/mintdb_keyio.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/mint-tools/taler-mint-keycheck.c b/src/mint-tools/taler-mint-keycheck.c
index 41c3cba8..c4584e2f 100644
--- a/src/mint-tools/taler-mint-keycheck.c
+++ b/src/mint-tools/taler-mint-keycheck.c
@@ -120,7 +120,9 @@ denomkeys_iter (void *cls,
struct GNUNET_HashCode hc;
if (ntohl (dki->issue.purpose.size) !=
- sizeof (struct TALER_DenominationKeyValidityPS))
+ sizeof (struct TALER_DenominationKeyValidityPS) -
+ offsetof (struct TALER_DenominationKeyValidityPS,
+ purpose))
{
fprintf (stderr,
"Denomination key for `%s' has invalid purpose size\n",
diff --git a/src/mint-tools/taler-mint-keyup.c b/src/mint-tools/taler-mint-keyup.c
index f4b9bb65..81b6c902 100644
--- a/src/mint-tools/taler-mint-keyup.c
+++ b/src/mint-tools/taler-mint-keyup.c
@@ -811,7 +811,7 @@ mint_keys_update_cointype (void *cls,
&denomkey_issue);
if (GNUNET_OK !=
TALER_MINTDB_denomination_key_write (dkf,
- &denomkey_issue))
+ &denomkey_issue))
{
fprintf (stderr,
"Failed to write denomination key information to file `%s'.\n",
diff --git a/src/mintdb/mintdb_keyio.c b/src/mintdb/mintdb_keyio.c
index 7109c983..81ffb97b 100644
--- a/src/mintdb/mintdb_keyio.c
+++ b/src/mintdb/mintdb_keyio.c
@@ -206,7 +206,7 @@ TALER_MINTDB_denomination_key_write (const char *filename,
goto cleanup;
wsize = sizeof (struct TALER_DenominationKeyValidityPS);
if (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
- &dki->issue.signature,
+ &dki->issue,
wsize)))
goto cleanup;
if (wrote != wsize)