summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-18 16:24:01 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-18 16:24:01 +0200
commit3df2a873b5b9197c9ccb689ac5eebdb43697e530 (patch)
tree38b633d3462052f704675e14696272481fa392d0 /src
parent8f656ba0fc3973ca517cbec902cc8ce2d7b15e92 (diff)
downloadexchange-3df2a873b5b9197c9ccb689ac5eebdb43697e530.tar.gz
exchange-3df2a873b5b9197c9ccb689ac5eebdb43697e530.tar.bz2
exchange-3df2a873b5b9197c9ccb689ac5eebdb43697e530.zip
fix generation of signing keys by keyup tool
Diffstat (limited to 'src')
-rw-r--r--src/mint-tools/taler-mint-keyup.c4
-rw-r--r--src/mintdb/mintdb_keyio.c11
2 files changed, 8 insertions, 7 deletions
diff --git a/src/mint-tools/taler-mint-keyup.c b/src/mint-tools/taler-mint-keyup.c
index e9de07ef..f4b9bb65 100644
--- a/src/mint-tools/taler-mint-keyup.c
+++ b/src/mint-tools/taler-mint-keyup.c
@@ -555,9 +555,9 @@ mint_keys_update_signkeys ()
&signkey_issue);
nwrite = GNUNET_DISK_fn_write (skf,
&signkey_issue,
- sizeof (struct TALER_MintSigningKeyValidityPS),
+ sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP),
GNUNET_DISK_PERM_USER_WRITE | GNUNET_DISK_PERM_USER_READ);
- if (nwrite != sizeof (struct TALER_MintSigningKeyValidityPS))
+ if (sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP) != nwrite)
{
fprintf (stderr,
"Failed to write to file `%s': %s\n",
diff --git a/src/mintdb/mintdb_keyio.c b/src/mintdb/mintdb_keyio.c
index 44baee85..7109c983 100644
--- a/src/mintdb/mintdb_keyio.c
+++ b/src/mintdb/mintdb_keyio.c
@@ -44,9 +44,8 @@ struct SignkeysIterateContext
/**
- * Function called on each file in the directory with
- * our signing keys. Parses the file and calls the
- * iterator from @a cls.
+ * Function called on each file in the directory with our signing
+ * keys. Parses the file and calls the iterator from @a cls.
*
* @param cls the `struct SignkeysIterateContext *`
* @param filename name of the file to parse
@@ -68,8 +67,10 @@ signkeys_iterate_dir_iter (void *cls,
if (nread != sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Invalid signkey file `%s': wrong size\n",
- filename);
+ "Invalid signkey file `%s': wrong size (%d, expected %u)\n",
+ filename,
+ (int) nread,
+ sizeof (struct TALER_MINTDB_PrivateSigningKeyInformationP));
return GNUNET_OK;
}
return skc->it (skc->it_cls,