fix size calculation in keycheck tool
This commit is contained in:
parent
d9dbc44389
commit
6d222b2d6c
@ -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",
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user