diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-10-31 17:56:56 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-31 17:56:56 +0100 |
commit | 3eae999efc0cb923aebd2bf7214c5f4093217d4f (patch) | |
tree | 9581fa718e127a79779ee1a095d4e017549f2b5e /src/lib | |
parent | de8e0907aadecf4f97c0eb8230217751f3fd44a1 (diff) | |
download | exchange-3eae999efc0cb923aebd2bf7214c5f4093217d4f.tar.xz |
distinguish between blind and non-blind denomination signatures
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/exchange_api_refreshes_reveal.c | 12 | ||||
-rw-r--r-- | src/lib/exchange_api_withdraw.c | 2 | ||||
-rw-r--r-- | src/lib/exchange_api_withdraw2.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/exchange_api_refreshes_reveal.c b/src/lib/exchange_api_refreshes_reveal.c index 0af37c021..c275e0a4d 100644 --- a/src/lib/exchange_api_refreshes_reveal.c +++ b/src/lib/exchange_api_refreshes_reveal.c @@ -137,12 +137,12 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshesRevealHandle *rrh, const struct TALER_PlanchetSecretsP *fc; struct TALER_DenominationPublicKey *pk; json_t *jsonai; - struct GNUNET_CRYPTO_RsaSignature *blind_sig; + struct TALER_BlindedDenominationSignature blind_sig; struct TALER_CoinSpendPublicKeyP coin_pub; struct TALER_CoinPubHash coin_hash; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_rsa_signature ("ev_sig", - &blind_sig), + TALER_JSON_spec_blinded_denom_sig ("ev_sig", + &blind_sig), GNUNET_JSON_spec_end () }; struct TALER_FreshCoin coin; @@ -170,17 +170,17 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshesRevealHandle *rrh, &coin_hash); if (GNUNET_OK != TALER_planchet_to_coin (pk, - blind_sig, + &blind_sig, fc, &coin_hash, &coin)) { GNUNET_break_op (0); - GNUNET_CRYPTO_rsa_signature_free (blind_sig); + GNUNET_JSON_parse_free (spec); GNUNET_JSON_parse_free (outer_spec); return GNUNET_SYSERR; } - GNUNET_CRYPTO_rsa_signature_free (blind_sig); + GNUNET_JSON_parse_free (spec); sigs[i] = coin.sig; } GNUNET_JSON_parse_free (outer_spec); diff --git a/src/lib/exchange_api_withdraw.c b/src/lib/exchange_api_withdraw.c index 8e00cfcdb..5e823ee6d 100644 --- a/src/lib/exchange_api_withdraw.c +++ b/src/lib/exchange_api_withdraw.c @@ -88,7 +88,7 @@ static void handle_reserve_withdraw_finished ( void *cls, const struct TALER_EXCHANGE_HttpResponse *hr, - const struct GNUNET_CRYPTO_RsaSignature *blind_sig) + const struct TALER_BlindedDenominationSignature *blind_sig) { struct TALER_EXCHANGE_WithdrawHandle *wh = cls; struct TALER_EXCHANGE_WithdrawResponse wr = { diff --git a/src/lib/exchange_api_withdraw2.c b/src/lib/exchange_api_withdraw2.c index e001a3154..d50892e5b 100644 --- a/src/lib/exchange_api_withdraw2.c +++ b/src/lib/exchange_api_withdraw2.c @@ -99,10 +99,10 @@ static enum GNUNET_GenericReturnValue reserve_withdraw_ok (struct TALER_EXCHANGE_Withdraw2Handle *wh, const json_t *json) { - struct GNUNET_CRYPTO_RsaSignature *blind_sig; + struct TALER_BlindedDenominationSignature blind_sig; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_rsa_signature ("ev_sig", - &blind_sig), + TALER_JSON_spec_blinded_denom_sig ("ev_sig", + &blind_sig), GNUNET_JSON_spec_end () }; struct TALER_EXCHANGE_HttpResponse hr = { @@ -122,7 +122,7 @@ reserve_withdraw_ok (struct TALER_EXCHANGE_Withdraw2Handle *wh, /* signature is valid, return it to the application */ wh->cb (wh->cb_cls, &hr, - blind_sig); + &blind_sig); /* make sure callback isn't called again after return */ wh->cb = NULL; GNUNET_JSON_parse_free (spec); |