fix size calculation in keycheck tool

This commit is contained in:
Christian Grothoff 2015-06-19 11:16:55 +02:00
parent d9dbc44389
commit 6d222b2d6c
3 changed files with 5 additions and 3 deletions

View File

@ -120,7 +120,9 @@ denomkeys_iter (void *cls,
struct GNUNET_HashCode hc; struct GNUNET_HashCode hc;
if (ntohl (dki->issue.purpose.size) != if (ntohl (dki->issue.purpose.size) !=
sizeof (struct TALER_DenominationKeyValidityPS)) sizeof (struct TALER_DenominationKeyValidityPS) -
offsetof (struct TALER_DenominationKeyValidityPS,
purpose))
{ {
fprintf (stderr, fprintf (stderr,
"Denomination key for `%s' has invalid purpose size\n", "Denomination key for `%s' has invalid purpose size\n",

View File

@ -206,7 +206,7 @@ TALER_MINTDB_denomination_key_write (const char *filename,
goto cleanup; goto cleanup;
wsize = sizeof (struct TALER_DenominationKeyValidityPS); wsize = sizeof (struct TALER_DenominationKeyValidityPS);
if (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh, if (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
&dki->issue.signature, &dki->issue,
wsize))) wsize)))
goto cleanup; goto cleanup;
if (wrote != wsize) if (wrote != wsize)