summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-03-21 14:40:59 +0100
committerChristian Grothoff <christian@grothoff.org>2016-03-21 14:40:59 +0100
commit6a80c0bfa2da80a8f1efd600ee3c94f31d31b21d (patch)
tree42e06c619a46fb11bb602e94cb46707c40a93083 /src/exchange
parent3cb188e8a7ffa30a6b264355011f45f594725741 (diff)
parent553d6eb23e3ac1001dd6c4e0523cddb88bc5e723 (diff)
downloadexchange-6a80c0bfa2da80a8f1efd600ee3c94f31d31b21d.tar.gz
exchange-6a80c0bfa2da80a8f1efd600ee3c94f31d31b21d.tar.bz2
exchange-6a80c0bfa2da80a8f1efd600ee3c94f31d31b21d.zip
Merge branch 'master' of git+ssh://git.taler.net/var/git/exchange
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-httpd_db.c12
-rw-r--r--src/exchange/taler-exchange-httpd_keystate.c10
-rw-r--r--src/exchange/taler-exchange-httpd_test.c6
3 files changed, 17 insertions, 11 deletions
diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c
index e96653a63..7698b92bb 100644
--- a/src/exchange/taler-exchange-httpd_db.c
+++ b/src/exchange/taler-exchange-httpd_db.c
@@ -453,9 +453,9 @@ execute_reserve_withdraw_transaction (struct MHD_Connection *connection,
/* Balance is good, sign the coin! */
denom_sig->rsa_signature
- = GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key,
- blinded_msg,
- blinded_msg_len);
+ = GNUNET_CRYPTO_rsa_sign_blinded (dki->denom_priv.rsa_private_key,
+ blinded_msg,
+ blinded_msg_len);
if (NULL == denom_sig->rsa_signature)
{
GNUNET_break (0);
@@ -1112,9 +1112,9 @@ refresh_exchange_coin (struct MHD_Connection *connection,
return ev_sig;
}
ev_sig.rsa_signature
- = GNUNET_CRYPTO_rsa_sign (dki->denom_priv.rsa_private_key,
- commit_coin->coin_ev,
- commit_coin->coin_ev_size);
+ = GNUNET_CRYPTO_rsa_sign_blinded (dki->denom_priv.rsa_private_key,
+ commit_coin->coin_ev,
+ commit_coin->coin_ev_size);
if (NULL == ev_sig.rsa_signature)
{
GNUNET_break (0);
diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c
index bf91b8183..dbb72fab2 100644
--- a/src/exchange/taler-exchange-httpd_keystate.c
+++ b/src/exchange/taler-exchange-httpd_keystate.c
@@ -419,6 +419,7 @@ reload_keys_sign_iter (void *cls,
* Convert information from an auditor to a JSON object.
*
* @param apub the auditor's public key
+ * @param auditor_url URL of the auditor
* @param dki_len length of @a dki and @a asigs arrays
* @param asigs the auditor's signatures
* @param dki array of denomination coin data signed by the auditor
@@ -426,6 +427,7 @@ reload_keys_sign_iter (void *cls,
*/
static json_t *
auditor_to_json (const struct TALER_AuditorPublicKeyP *apub,
+ const char *auditor_url,
unsigned int dki_len,
const struct TALER_AuditorSignatureP **asigs,
const struct TALER_DenominationKeyValidityPS **dki)
@@ -442,10 +444,11 @@ auditor_to_json (const struct TALER_AuditorPublicKeyP *apub,
sizeof (struct GNUNET_HashCode)),
"auditor_sig",
GNUNET_JSON_from_data (asigs[i],
- sizeof (struct TALER_AuditorSignatureP))));
+ sizeof (struct TALER_AuditorSignatureP))));
return
- json_pack ("{s:o, s:o}",
+ json_pack ("{s:o, s:s, s:o}",
"denomination_keys", ja,
+ "auditor_url", auditor_url,
"auditor_pub",
GNUNET_JSON_from_data (apub,
sizeof (struct TALER_AuditorPublicKeyP)));
@@ -460,6 +463,7 @@ auditor_to_json (const struct TALER_AuditorPublicKeyP *apub,
*
* @param cls closure with the `struct TMH_KS_StateHandle *`
* @param apub the auditor's public key
+ * @param auditor_url URL of the auditor
* @param mpub the exchange's public key (as expected by the auditor)
* @param dki_len length of @a dki and @a asigs
* @param asigs array with the auditor's signatures, of length @a dki_len
@@ -471,6 +475,7 @@ auditor_to_json (const struct TALER_AuditorPublicKeyP *apub,
static int
reload_auditor_iter (void *cls,
const struct TALER_AuditorPublicKeyP *apub,
+ const char *auditor_url,
const struct TALER_MasterPublicKeyP *mpub,
unsigned int dki_len,
const struct TALER_AuditorSignatureP *asigs,
@@ -508,6 +513,7 @@ reload_auditor_iter (void *cls,
/* add auditor information to our /keys response */
json_array_append_new (ctx->auditors_array,
auditor_to_json (apub,
+ auditor_url,
keep,
kept_asigs,
kept_dkis));
diff --git a/src/exchange/taler-exchange-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c
index 3fc8f473b..7c9e0820d 100644
--- a/src/exchange/taler-exchange-httpd_test.c
+++ b/src/exchange/taler-exchange-httpd_test.c
@@ -495,9 +495,9 @@ TMH_TEST_handler_test_rsa_sign (struct TMH_RequestHandler *rh,
return TMH_RESPONSE_reply_internal_error (connection,
"Failed to create RSA key");
}
- sig = GNUNET_CRYPTO_rsa_sign (rsa_pk,
- in_ptr,
- in_ptr_size);
+ sig = GNUNET_CRYPTO_rsa_sign_blinded (rsa_pk,
+ in_ptr,
+ in_ptr_size);
if (NULL == sig)
{
GNUNET_break (0);