aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto_helper_cs.c
diff options
context:
space:
mode:
authorGian Demarmels <gian@demarmels.org>2022-01-03 23:38:31 +0100
committerGian Demarmels <gian@demarmels.org>2022-02-04 15:33:12 +0100
commit9d9d4413dfdfc91ebafde9f8dca81b0f03705766 (patch)
tree4a9b5be7e24c2acdae67757c98efc785ea4854fd /src/util/crypto_helper_cs.c
parent18db69be2d2bbacc6b9f4de2e9e8f8db2df4febe (diff)
downloadexchange-9d9d4413dfdfc91ebafde9f8dca81b0f03705766.tar.xz
setup_key for cs secmod helper
Diffstat (limited to 'src/util/crypto_helper_cs.c')
-rw-r--r--src/util/crypto_helper_cs.c25
1 files changed, 14 insertions, 11 deletions
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),