diff options
author | Lucien Heuzeveldt <lucienclaude.heuzeveldt@students.bfh.ch> | 2022-01-08 20:41:01 +0100 |
---|---|---|
committer | Gian Demarmels <gian@demarmels.org> | 2022-02-04 15:35:31 +0100 |
commit | 9074e66ebc8b73ecc98500f32af52088fd7f0722 (patch) | |
tree | e5e270bea1e2b3de44e915b428df01866a93203e /src/pq | |
parent | 4c7aa097840eb3254a6823177abcc90fa7ccf0d0 (diff) |
implement withdraw (nonce reuse check missing)
Diffstat (limited to 'src/pq')
-rw-r--r-- | src/pq/pq_query_helper.c | 20 | ||||
-rw-r--r-- | src/pq/pq_result_helper.c | 11 |
2 files changed, 26 insertions, 5 deletions
diff --git a/src/pq/pq_query_helper.c b/src/pq/pq_query_helper.c index c04161d0e..ca1e94efb 100644 --- a/src/pq/pq_query_helper.c +++ b/src/pq/pq_query_helper.c @@ -290,7 +290,9 @@ qconv_denom_sig (void *cls, denom_sig->details.rsa_signature, &tbuf); break; - // TODO: add case for Clause-Schnorr + case TALER_DENOMINATION_CS: + tlen = sizeof (denom_sig->details.cs_signature); + break; default: GNUNET_assert (0); } @@ -307,7 +309,11 @@ qconv_denom_sig (void *cls, tlen); GNUNET_free (tbuf); break; - // TODO: add case for Clause-Schnorr + case TALER_DENOMINATION_CS: + memcpy (&buf[sizeof (be)], + &denom_sig->details.cs_signature, + tlen); + break; default: GNUNET_assert (0); } @@ -380,7 +386,9 @@ qconv_blinded_denom_sig (void *cls, denom_sig->details.blinded_rsa_signature, &tbuf); break; - // TODO: add case for Clause-Schnorr + case TALER_DENOMINATION_CS: + tlen = sizeof (denom_sig->details.blinded_cs_answer); + break; default: GNUNET_assert (0); } @@ -397,7 +405,11 @@ qconv_blinded_denom_sig (void *cls, tlen); GNUNET_free (tbuf); break; - // TODO: add case for Clause-Schnorr + case TALER_DENOMINATION_CS: + memcpy (&buf[sizeof (be)], + &denom_sig->details.blinded_cs_answer, + tlen); + break; default: GNUNET_assert (0); } diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index d6b0eb7bb..2009f0e33 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c @@ -670,7 +670,16 @@ extract_blinded_denom_sig (void *cls, return GNUNET_SYSERR; } return GNUNET_OK; - // FIXME: add CS case! + case TALER_DENOMINATION_CS: + if (sizeof (sig->details.blinded_cs_answer) != len) + { + GNUNET_break (0); + return GNUNET_SYSERR; + } + memcpy (&sig->details.blinded_cs_answer, + res, + len); + return GNUNET_OK; default: GNUNET_break (0); } |