diff options
author | Gian Demarmels <gian@demarmels.org> | 2022-01-09 16:49:27 +0100 |
---|---|---|
committer | Gian Demarmels <gian@demarmels.org> | 2022-02-04 15:36:08 +0100 |
commit | 9c2aefaa515ce8d493bfe4de4eab9edc09d5447e (patch) | |
tree | a12da09f8fedb383be5baa9bc1e8f597e4071448 /src/util/crypto.c | |
parent | 9074e66ebc8b73ecc98500f32af52088fd7f0722 (diff) | |
download | exchange-9c2aefaa515ce8d493bfe4de4eab9edc09d5447e.tar.xz |
removed varargs
Diffstat (limited to 'src/util/crypto.c')
-rw-r--r-- | src/util/crypto.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/util/crypto.c b/src/util/crypto.c index 445b820aa..664d75aa6 100644 --- a/src/util/crypto.c +++ b/src/util/crypto.c @@ -208,9 +208,8 @@ TALER_cs_withdraw_nonce_derive (const struct void -TALER_blinding_secret_create (union TALER_DenominationBlindingKeyP *bs, - enum TALER_DenominationCipher cipher, - ...) +TALER_planchet_blinding_secret_create (struct TALER_PlanchetSecretsP *ps, + enum TALER_DenominationCipher cipher) { switch (cipher) { @@ -219,23 +218,15 @@ TALER_blinding_secret_create (union TALER_DenominationBlindingKeyP *bs, return; case TALER_DENOMINATION_RSA: GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_STRONG, - &bs->rsa_bks, + &ps->blinding_key.rsa_bks, sizeof (struct GNUNET_CRYPTO_RsaBlindingKeySecret)); return; case TALER_DENOMINATION_CS: { - va_list ap; - va_start (ap, cipher); - struct TALER_CoinSpendPrivateKeyP *coin_priv; - struct TALER_DenominationCsPublicR *r_pub; - coin_priv = va_arg (ap, struct TALER_CoinSpendPrivateKeyP *); - r_pub = va_arg (ap, struct TALER_DenominationCsPublicR *); - - cs_blinding_seed_derive (coin_priv, - r_pub->r_pub, - &bs->nonce); - va_end (ap); + cs_blinding_seed_derive (&ps->coin_priv, + ps->cs_r_pub.r_pub, + &ps->blinding_key.nonce); return; } default: @@ -262,7 +253,7 @@ TALER_planchet_setup_random (struct TALER_PlanchetSecretsP *ps, GNUNET_break (0); return; case TALER_DENOMINATION_RSA: - TALER_blinding_secret_create (&ps->blinding_key, cipher); + TALER_planchet_blinding_secret_create (ps, TALER_DENOMINATION_RSA); return; case TALER_DENOMINATION_CS: // Will be set in a later stage for Clause Blind Schnorr Scheme |