summaryrefslogtreecommitdiff
path: root/src/util/test_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/test_crypto.c')
-rw-r--r--src/util/test_crypto.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c
index 142dc31b6..b15e65745 100644
--- a/src/util/test_crypto.c
+++ b/src/util/test_crypto.c
@@ -148,9 +148,10 @@ test_planchets_cs (void)
struct TALER_CoinPubHash c_hash;
struct TALER_WithdrawNonce nonce;
struct TALER_DenominationCsPublicR r_pub;
+ struct TALER_DenominationCsPublicR r_pub_blind;
struct TALER_DenominationCsPrivateR priv_r;
- // struct TALER_BlindedDenominationSignature blind_sig;
- // struct TALER_FreshCoin coin;
+ struct TALER_BlindedDenominationSignature blind_sig;
+ struct TALER_FreshCoin coin;
GNUNET_assert (GNUNET_OK ==
TALER_denom_priv_create (&dk_priv,
@@ -175,12 +176,25 @@ test_planchets_cs (void)
&pd,
&nonce,
&r_pub));
+ // TODO: Remove r_secret if not needed
GNUNET_assert (GNUNET_OK ==
TALER_denom_cs_derive_r_secret (&nonce,
&dk_priv,
&priv_r));
+ GNUNET_assert (GNUNET_OK ==
+ TALER_denom_sign_blinded (&blind_sig,
+ &dk_priv,
+ &pd.blinded_planchet,
+ &nonce));
+
+ // GNUNET_assert (GNUNET_OK ==
+ // TALER_planchet_to_coin (&dk_pub,
+ // &blind_sig,
+ // &ps,
+ // &c_hash,
+ // &coin));
- // TALER_blinded_denom_sig_free (&blind_sig);
+ TALER_blinded_denom_sig_free (&blind_sig);
// TALER_denom_sig_free (&coin.sig);
TALER_denom_priv_free (&dk_priv);
TALER_denom_pub_free (&dk_pub);