[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 02/02: -simpilify
From: |
gnunet |
Subject: |
[taler-exchange] 02/02: -simpilify |
Date: |
Wed, 09 Feb 2022 10:03:15 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit b461fc6fc4fa3d83326aa4e7806de973991a99e5
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Feb 9 10:03:10 2022 +0100
-simpilify
---
src/util/crypto.c | 43 ++++++++-----------------------------------
1 file changed, 8 insertions(+), 35 deletions(-)
diff --git a/src/util/crypto.c b/src/util/crypto.c
index ae611901..03c3ea0f 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -411,57 +411,30 @@ TALER_planchet_to_coin (
const struct TALER_ExchangeWithdrawValues *alg_values,
struct TALER_FreshCoin *coin)
{
- struct TALER_DenominationSignature sig;
-
if ( (dk->cipher != blind_sig->cipher) ||
(dk->cipher != alg_values->cipher) )
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
-
- switch (dk->cipher)
+ if (GNUNET_OK !=
+ TALER_denom_sig_unblind (&coin->sig,
+ blind_sig,
+ bks,
+ dk))
{
- case TALER_DENOMINATION_RSA:
- if (GNUNET_OK !=
- TALER_denom_sig_unblind (&sig,
- blind_sig,
- bks,
- dk))
- {
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
- break;
- case TALER_DENOMINATION_CS:
- {
- if (GNUNET_OK !=
- TALER_denom_sig_unblind (&sig,
- blind_sig,
- bks,
- dk))
- {
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
- break;
- }
- default:
- GNUNET_break (0);
+ GNUNET_break_op (0);
return GNUNET_SYSERR;
}
-
if (GNUNET_OK !=
TALER_denom_pub_verify (dk,
- &sig,
+ &coin->sig,
c_hash))
{
GNUNET_break_op (0);
- TALER_denom_sig_free (&sig);
+ TALER_denom_sig_free (&coin->sig);
return GNUNET_SYSERR;
}
-
- coin->sig = sig;
coin->coin_priv = *coin_priv;
return GNUNET_OK;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.