diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/crypto_helper_cs.c | 13 | ||||
-rw-r--r-- | src/util/denom.c | 6 |
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; |