diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-12-05 19:47:54 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-12-05 19:47:54 +0100 |
commit | 8170e1e9abaf00b9c27c8758998c4df37d77e757 (patch) | |
tree | d8dba0a93e22056b3b1410f9a3a824a829550312 /src/util/crypto_helper_denom.c | |
parent | c898ff53a24aa469bf7958081f7835bd515d7dc3 (diff) |
move all TALER_SIGNATURE_SM_-operations to secmod_signatures.c
Diffstat (limited to 'src/util/crypto_helper_denom.c')
-rw-r--r-- | src/util/crypto_helper_denom.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/util/crypto_helper_denom.c b/src/util/crypto_helper_denom.c index 547336e7c..fa8a820b5 100644 --- a/src/util/crypto_helper_denom.c +++ b/src/util/crypto_helper_denom.c @@ -277,12 +277,7 @@ handle_mt_avail (struct TALER_CRYPTO_DenominationHelper *dh, { struct TALER_DenominationPublicKey denom_pub; - struct TALER_DenominationKeyAnnouncementPS dka = { - .purpose.purpose = htonl (TALER_SIGNATURE_SM_DENOMINATION_KEY), - .purpose.size = htonl (sizeof (dka)), - .anchor_time = kan->anchor_time, - .duration_withdraw = kan->duration_withdraw - }; + struct GNUNET_HashCode h_denom_pub; denom_pub.rsa_public_key = GNUNET_CRYPTO_rsa_public_key_decode (buf, @@ -293,15 +288,15 @@ handle_mt_avail (struct TALER_CRYPTO_DenominationHelper *dh, return GNUNET_SYSERR; } GNUNET_CRYPTO_rsa_public_key_hash (denom_pub.rsa_public_key, - &dka.h_denom_pub); - GNUNET_CRYPTO_hash (section_name, - strlen (section_name) + 1, - &dka.h_section_name); + &h_denom_pub); if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_SM_DENOMINATION_KEY, - &dka, - &kan->secm_sig.eddsa_signature, - &kan->secm_pub.eddsa_pub)) + TALER_exchange_secmod_rsa_verify ( + &h_denom_pub, + section_name, + GNUNET_TIME_absolute_ntoh (kan->anchor_time), + GNUNET_TIME_relative_ntoh (kan->duration_withdraw), + &kan->secm_pub, + &kan->secm_sig)) { GNUNET_break_op (0); GNUNET_CRYPTO_rsa_public_key_free (denom_pub.rsa_public_key); @@ -311,7 +306,7 @@ handle_mt_avail (struct TALER_CRYPTO_DenominationHelper *dh, section_name, GNUNET_TIME_absolute_ntoh (kan->anchor_time), GNUNET_TIME_relative_ntoh (kan->duration_withdraw), - &dka.h_denom_pub, + &h_denom_pub, &denom_pub, &kan->secm_pub, &kan->secm_sig); |