diff options
author | Lucien Heuzeveldt <lucienclaude.heuzeveldt@students.bfh.ch> | 2022-01-04 17:46:36 +0100 |
---|---|---|
committer | Gian Demarmels <gian@demarmels.org> | 2022-02-04 15:33:14 +0100 |
commit | 36f551ff33ac0974788aff28d4b19390ca484f4b (patch) | |
tree | 399ecd848f129b73cc8302bdd8811f1c315e1879 /src/util/crypto.c | |
parent | 106664ed0c50621bd20568c948ad30fccd0689ea (diff) | |
download | exchange-36f551ff33ac0974788aff28d4b19390ca484f4b.tar.xz |
set planchet detail cipher, add cipher checks
Diffstat (limited to 'src/util/crypto.c')
-rw-r--r-- | src/util/crypto.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c index 84d20d6ba..445b820aa 100644 --- a/src/util/crypto.c +++ b/src/util/crypto.c @@ -319,6 +319,7 @@ TALER_planchet_prepare (const struct TALER_DenominationPublicKey *dk, return GNUNET_SYSERR; } + pd->blinded_planchet.cipher = dk->cipher; TALER_denom_pub_hash (dk, &pd->denom_pub_hash); return GNUNET_OK; @@ -335,6 +336,12 @@ TALER_planchet_to_coin (const struct TALER_DenominationPublicKey *dk, { struct TALER_DenominationSignature sig; + if (dk->cipher != blind_sig->cipher) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + switch (dk->cipher) { case TALER_DENOMINATION_RSA: |