aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-09 10:09:01 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-09 10:09:01 +0100
commit88b84d01cbad3065465d9934ac2a80f8b3c2d764 (patch)
tree29babafde0254939fe69295f910ac7a063745212
parentb461fc6fc4fa3d83326aa4e7806de973991a99e5 (diff)
-simpilify
-rw-r--r--src/util/crypto.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c
index 03c3ea0fc..293ba9688 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -331,46 +331,20 @@ TALER_planchet_prepare (const struct TALER_DenominationPublicKey *dk,
struct TALER_CoinSpendPublicKeyP coin_pub;
GNUNET_assert (alg_values->cipher == dk->cipher);
-
GNUNET_CRYPTO_eddsa_key_get_public (&coin_priv->eddsa_priv,
&coin_pub.eddsa_pub);
-
- switch (dk->cipher)
+ if (GNUNET_OK !=
+ TALER_denom_blind (dk,
+ bks,
+ NULL, /* FIXME-Oec */
+ &coin_pub,
+ alg_values,
+ c_hash,
+ &pd->blinded_planchet))
{
- case TALER_DENOMINATION_RSA:
- if (GNUNET_OK !=
- TALER_denom_blind (dk,
- bks,
- NULL, /* FIXME-Oec */
- &coin_pub,
- alg_values,
- c_hash,
- &pd->blinded_planchet))
- {
- GNUNET_break (0);
- return GNUNET_SYSERR;
- }
- break;
- case TALER_DENOMINATION_CS:
- if (GNUNET_OK !=
- TALER_denom_blind (dk,
- bks,
- NULL, /* FIXME-Oec */
- &coin_pub,
- alg_values,
- c_hash,
- &pd->blinded_planchet))
- {
- GNUNET_break (0);
- return GNUNET_SYSERR;
- }
- break;
- default:
GNUNET_break (0);
return GNUNET_SYSERR;
}
-
- pd->blinded_planchet.cipher = dk->cipher;
TALER_denom_pub_hash (dk,
&pd->denom_pub_hash);
return GNUNET_OK;