diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-07-11 18:25:30 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-07-11 18:25:30 +0200 |
commit | ee7e690bff1e85b7ac1af66f984fa84588c4c6cc (patch) | |
tree | bcf09d04a49628d498cf3e7eda1171db5ba32a6d /src/mint/taler-mint-httpd_keystate.c | |
parent | 22f022eccbf7e0f866c3d54684a1eb45708dfc8a (diff) | |
download | exchange-ee7e690bff1e85b7ac1af66f984fa84588c4c6cc.tar.xz |
fix #3886
Diffstat (limited to 'src/mint/taler-mint-httpd_keystate.c')
-rw-r--r-- | src/mint/taler-mint-httpd_keystate.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mint/taler-mint-httpd_keystate.c b/src/mint/taler-mint-httpd_keystate.c index e1509a600..0d4fc40e0 100644 --- a/src/mint/taler-mint-httpd_keystate.c +++ b/src/mint/taler-mint-httpd_keystate.c @@ -296,10 +296,12 @@ reload_keys_denom_iter (void *cls, as it is possible we just retry until we succeed. */ } - /* FIXME: this is a VERY ugly (we obtain ownership of - pointers within 'dki' here!!!) #3886 */ - d2 = GNUNET_memdup (dki, - sizeof (struct TALER_MINTDB_DenominationKeyIssueInformation)); + d2 = GNUNET_new (struct TALER_MINTDB_DenominationKeyIssueInformation); + d2->issue = dki->issue; + d2->denom_priv.rsa_private_key + = GNUNET_CRYPTO_rsa_private_key_dup (dki->denom_priv.rsa_private_key); + d2->denom_pub.rsa_public_key + = GNUNET_CRYPTO_rsa_public_key_dup (dki->denom_pub.rsa_public_key); res = GNUNET_CONTAINER_multihashmap_put (ctx->denomkey_map, &denom_key_hash, d2, @@ -309,6 +311,8 @@ reload_keys_denom_iter (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Duplicate denomination key `%s'\n", alias); + GNUNET_CRYPTO_rsa_private_key_free (d2->denom_priv.rsa_private_key); + GNUNET_CRYPTO_rsa_public_key_free (d2->denom_pub.rsa_public_key); GNUNET_free (d2); return GNUNET_OK; } |