aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_keystate.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-05 17:15:37 +0200
committerChristian Grothoff <christian@grothoff.org>2015-07-05 17:15:37 +0200
commit0372b7583b530cd9cd9c5b65f8a2de98135cdc1e (patch)
treeefb7b45e88b4c339ce252fe58e4e19382db43959 /src/mint/taler-mint-httpd_keystate.c
parent922323b4104abfaef2a11fed4e5e8292344a3bcd (diff)
include mint's public key in reply
Diffstat (limited to 'src/mint/taler-mint-httpd_keystate.c')
-rw-r--r--src/mint/taler-mint-httpd_keystate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mint/taler-mint-httpd_keystate.c b/src/mint/taler-mint-httpd_keystate.c
index 096023ac5..dea898587 100644
--- a/src/mint/taler-mint-httpd_keystate.c
+++ b/src/mint/taler-mint-httpd_keystate.c
@@ -519,13 +519,15 @@ TMH_KS_acquire (void)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"No valid signing key found!\n");
- keys = json_pack ("{s:o, s:o, s:o, s:o, s:o}",
+ keys = json_pack ("{s:o, s:o, s:o, s:o, s:o, s:o}",
"master_public_key",
TALER_json_from_data (&TMH_master_public_key,
sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)),
"signkeys", key_state->sign_keys_array,
"denoms", key_state->denom_keys_array,
"list_issue_date", TALER_json_from_abs (key_state->reload_time),
+ "eddsa_pub", TALER_json_from_data (&key_state->current_sign_key_issue.issue.signkey_pub,
+ sizeof (struct TALER_MintPublicKeyP)),
"eddsa_sig", TALER_json_from_data (&sig,
sizeof (struct TALER_MintSignatureP)));
key_state->keys_json = json_dumps (keys,
@@ -714,16 +716,19 @@ read_again:
* Sign the message in @a purpose with the mint's signing key.
*
* @param purpose the message to sign
+ * @param[out] pub set to the current public signing key of the mint
* @param[out] sig signature over purpose using current signing key
*/
void
TMH_KS_sign (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
- struct TALER_MintSignatureP *sig)
+ struct TALER_MintPublicKeyP *pub,
+ struct TALER_MintSignatureP *sig)
{
struct TMH_KS_StateHandle *key_state;
key_state = TMH_KS_acquire ();
+ *pub = key_state->current_sign_key_issue.issue.signkey_pub;
GNUNET_assert (GNUNET_OK ==
GNUNET_CRYPTO_eddsa_sign (&key_state->current_sign_key_issue.signkey_priv.eddsa_priv,
purpose,