summaryrefslogtreecommitdiff
path: root/src/json/json_pack.c
diff options
context:
space:
mode:
authorLucien Heuzeveldt <lucienclaude.heuzeveldt@students.bfh.ch>2022-01-08 20:41:01 +0100
committerGian Demarmels <gian@demarmels.org>2022-02-04 15:35:31 +0100
commit9074e66ebc8b73ecc98500f32af52088fd7f0722 (patch)
treee5e270bea1e2b3de44e915b428df01866a93203e /src/json/json_pack.c
parent4c7aa097840eb3254a6823177abcc90fa7ccf0d0 (diff)
downloadexchange-9074e66ebc8b73ecc98500f32af52088fd7f0722.tar.gz
exchange-9074e66ebc8b73ecc98500f32af52088fd7f0722.tar.bz2
exchange-9074e66ebc8b73ecc98500f32af52088fd7f0722.zip
implement withdraw (nonce reuse check missing)
Diffstat (limited to 'src/json/json_pack.c')
-rw-r--r--src/json/json_pack.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/json/json_pack.c b/src/json/json_pack.c
index 86986718..cc147c4c 100644
--- a/src/json/json_pack.c
+++ b/src/json/json_pack.c
@@ -125,14 +125,21 @@ TALER_JSON_pack_blinded_denom_sig (
switch (sig->cipher)
{
case TALER_DENOMINATION_RSA:
- ps.object
- = GNUNET_JSON_PACK (
- GNUNET_JSON_pack_uint64 ("cipher",
- TALER_DENOMINATION_RSA),
- GNUNET_JSON_pack_rsa_signature ("blinded_rsa_signature",
- sig->details.blinded_rsa_signature));
+ ps.object = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_uint64 ("cipher",
+ TALER_DENOMINATION_RSA),
+ GNUNET_JSON_pack_rsa_signature ("blinded_rsa_signature",
+ sig->details.blinded_rsa_signature));
+ break;
+ case TALER_DENOMINATION_CS:
+ ps.object = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_uint64 ("cipher",
+ TALER_DENOMINATION_CS),
+ GNUNET_JSON_pack_uint64 ("b",
+ sig->details.blinded_cs_answer.b),
+ GNUNET_JSON_pack_data_auto ("s",
+ &sig->details.blinded_cs_answer.s_scalar));
break;
- // TODO: case TALER_DENOMINATION_CS:
default:
GNUNET_assert (0);
}