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_esign.c | |
parent | c898ff53a24aa469bf7958081f7835bd515d7dc3 (diff) | |
download | exchange-8170e1e9abaf00b9c27c8758998c4df37d77e757.tar.gz exchange-8170e1e9abaf00b9c27c8758998c4df37d77e757.tar.bz2 exchange-8170e1e9abaf00b9c27c8758998c4df37d77e757.zip |
move all TALER_SIGNATURE_SM_-operations to secmod_signatures.c
Diffstat (limited to 'src/util/crypto_helper_esign.c')
-rw-r--r-- | src/util/crypto_helper_esign.c | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/src/util/crypto_helper_esign.c b/src/util/crypto_helper_esign.c index f21d013f1..fde7f48ee 100644 --- a/src/util/crypto_helper_esign.c +++ b/src/util/crypto_helper_esign.c @@ -258,31 +258,23 @@ handle_mt_avail (struct TALER_CRYPTO_ExchangeSignHelper *esh, GNUNET_break_op (0); return GNUNET_SYSERR; } + if (GNUNET_OK != + TALER_exchange_secmod_eddsa_verify ( + &kan->exchange_pub, + GNUNET_TIME_absolute_ntoh (kan->anchor_time), + GNUNET_TIME_relative_ntoh (kan->duration), + &kan->secm_pub, + &kan->secm_sig)) { - struct TALER_SigningKeyAnnouncementPS ska = { - .purpose.purpose = htonl (TALER_SIGNATURE_SM_SIGNING_KEY), - .purpose.size = htonl (sizeof (ska)), - .exchange_pub = kan->exchange_pub, - .anchor_time = kan->anchor_time, - .duration = kan->duration - }; - - if (GNUNET_OK != - GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_SM_SIGNING_KEY, - &ska, - &kan->secm_sig.eddsa_signature, - &kan->secm_pub.eddsa_pub)) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } - esh->ekc (esh->ekc_cls, - GNUNET_TIME_absolute_ntoh (kan->anchor_time), - GNUNET_TIME_relative_ntoh (kan->duration), - &kan->exchange_pub, - &kan->secm_pub, - &kan->secm_sig); + GNUNET_break_op (0); + return GNUNET_SYSERR; } + esh->ekc (esh->ekc_cls, + GNUNET_TIME_absolute_ntoh (kan->anchor_time), + GNUNET_TIME_relative_ntoh (kan->duration), + &kan->exchange_pub, + &kan->secm_pub, + &kan->secm_sig); return GNUNET_OK; } |