summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-09 16:43:36 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-09 16:43:36 +0100
commit1777db292e6e0d653e5e1e103317f2cc5ac241b6 (patch)
tree8be88489e754a53de87c55c0824bc749befa8132 /src/util
parentd05c561e4f95a845e3c8793a752369365f307d5f (diff)
downloadexchange-1777db292e6e0d653e5e1e103317f2cc5ac241b6.tar.gz
exchange-1777db292e6e0d653e5e1e103317f2cc5ac241b6.tar.bz2
exchange-1777db292e6e0d653e5e1e103317f2cc5ac241b6.zip
-fix withdraw logic
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto_helper_cs.c13
-rw-r--r--src/util/denom.c6
2 files changed, 10 insertions, 9 deletions
diff --git a/src/util/crypto_helper_cs.c b/src/util/crypto_helper_cs.c
index 6374a5a7d..f772c39f5 100644
--- a/src/util/crypto_helper_cs.c
+++ b/src/util/crypto_helper_cs.c
@@ -633,13 +633,14 @@ TALER_CRYPTO_helper_cs_r_derive (struct TALER_CRYPTO_CsDenominationHelper *dh,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Requesting R\n");
{
- struct TALER_CRYPTO_CsRDeriveRequest rdr;
+ struct TALER_CRYPTO_CsRDeriveRequest rdr = {
+ .header.size = htons (sizeof (rdr)),
+ .header.type = htons (TALER_HELPER_CS_MT_REQ_RDERIVE),
+ .reserved = htonl (0),
+ .h_cs = *h_cs,
+ .nonce = *nonce
+ };
- rdr.header.size = htons (sizeof (rdr));
- rdr.header.type = htons (TALER_HELPER_CS_MT_REQ_RDERIVE);
- rdr.reserved = htonl (0);
- rdr.h_cs = *h_cs;
- rdr.nonce = *nonce;
if (GNUNET_OK !=
TALER_crypto_helper_send_all (dh->sock,
&rdr,
diff --git a/src/util/denom.c b/src/util/denom.c
index b0982c008..df5035d1e 100644
--- a/src/util/denom.c
+++ b/src/util/denom.c
@@ -364,15 +364,15 @@ TALER_denom_blind (
struct TALER_DenominationCSPublicRPairP blinded_r_pub;
struct GNUNET_CRYPTO_CsBlindingSecret bs[2];
- blinded_planchet->cipher = dk->cipher;
+ blinded_planchet->cipher = TALER_DENOMINATION_CS;
GNUNET_CRYPTO_cs_blinding_secrets_derive (&coin_bks->nonce,
bs);
GNUNET_CRYPTO_cs_calc_blinded_c (
bs,
alg_values->details.cs_values.r_pub_pair.r_pub,
&dk->details.cs_public_key,
- &c_hash->hash,
- sizeof(struct GNUNET_HashCode),
+ c_hash,
+ sizeof(*c_hash),
blinded_planchet->details.cs_blinded_planchet.c,
blinded_r_pub.r_pub);
return GNUNET_OK;