diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-12-23 01:32:06 +0800 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-12-23 01:32:06 +0800 |
commit | ba71c18526cb8adf3ac69b5df919bb1f3c92488f (patch) | |
tree | 8c35f2ff8f324ad42283d3946e85eb4974bc0a3f /src/json | |
parent | ad09066a8ef65c054b8bd2718b74c038ab139886 (diff) | |
download | exchange-ba71c18526cb8adf3ac69b5df919bb1f3c92488f.tar.xz |
-use singleton for RSA
Diffstat (limited to 'src/json')
-rw-r--r-- | src/json/json_helper.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c index 9f57c56fc..01ca45f2b 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c @@ -1174,6 +1174,7 @@ parse_exchange_withdraw_values (void *cls, }; const char *emsg; unsigned int eline; + enum GNUNET_CRYPTO_BlindSignatureAlgorithm ci; (void) cls; if (GNUNET_OK != @@ -1185,17 +1186,18 @@ parse_exchange_withdraw_values (void *cls, GNUNET_break_op (0); return GNUNET_SYSERR; } - bi = GNUNET_new (struct GNUNET_CRYPTO_BlindingInputValues); - bi->cipher = string_to_cipher (cipher); - bi->rc = 1; - switch (bi->cipher) + ci = string_to_cipher (cipher); + switch (ci) { case GNUNET_CRYPTO_BSA_INVALID: break; case GNUNET_CRYPTO_BSA_RSA: - ewv->blinding_inputs = bi; + ewv->blinding_inputs = TALER_denom_ewv_rsa_singleton ()->blinding_inputs; return GNUNET_OK; case GNUNET_CRYPTO_BSA_CS: + bi = GNUNET_new (struct GNUNET_CRYPTO_BlindingInputValues); + bi->cipher = GNUNET_CRYPTO_BSA_CS; + bi->rc = 1; { struct GNUNET_JSON_Specification ispec[] = { GNUNET_JSON_spec_fixed ( @@ -1224,7 +1226,6 @@ parse_exchange_withdraw_values (void *cls, } } GNUNET_break_op (0); - GNUNET_free (bi); return GNUNET_SYSERR; } |