From 9d9d4413dfdfc91ebafde9f8dca81b0f03705766 Mon Sep 17 00:00:00 2001 From: Gian Demarmels Date: Mon, 3 Jan 2022 23:38:31 +0100 Subject: setup_key for cs secmod helper --- src/util/crypto_helper_cs.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/util/crypto_helper_cs.c') diff --git a/src/util/crypto_helper_cs.c b/src/util/crypto_helper_cs.c index 94d98f13c..95050a1f5 100644 --- a/src/util/crypto_helper_cs.c +++ b/src/util/crypto_helper_cs.c @@ -206,17 +206,20 @@ handle_mt_avail (struct TALER_CRYPTO_CsDenominationHelper *dh, struct TALER_DenominationPublicKey denom_pub; struct TALER_CsPubHashP h_cs; - denom_pub.cipher = TALER_DENOMINATION_RSA; - denom_pub.details.rsa_public_key - = GNUNET_CRYPTO_rsa_public_key_decode (buf, - ntohs (kan->pub_size)); - if (NULL == denom_pub.details.rsa_public_key) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - GNUNET_CRYPTO_rsa_public_key_hash (denom_pub.details.rsa_public_key, - &h_cs.hash); + denom_pub.cipher = TALER_DENOMINATION_CS; + + memcpy (&denom_pub.details.cs_public_key, buf, ntohs (kan->pub_size)); + TALER_cs_pub_hash (&denom_pub.details.cs_public_key, &h_cs); + // enom_pub.details.rsa_public_key + // = GNUNET_CRYPTO_rsa_public_key_decode (buf, + // ntohs (kan->pub_size)); + // if (NULL == denom_pub.details.rsa_public_key) + // { + // GNUNET_break_op (0); + // return GNUNET_SYSERR; + // } + // GNUNET_CRYPTO_rsa_public_key_hash (denom_pub.details.rsa_public_key, + // &h_cs.hash); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Received CS key %s (%s)\n", GNUNET_h2s (&h_cs.hash), -- cgit v1.2.3