From 03fd154a69212df740cf3b09567a1bb081b64873 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 4 Feb 2022 19:29:52 +0100 Subject: messing with CS/RSA fixes --- src/testing/testing_api_helpers_exchange.c | 34 +----------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'src/testing/testing_api_helpers_exchange.c') diff --git a/src/testing/testing_api_helpers_exchange.c b/src/testing/testing_api_helpers_exchange.c index a30db0336..9414af662 100644 --- a/src/testing/testing_api_helpers_exchange.c +++ b/src/testing/testing_api_helpers_exchange.c @@ -411,18 +411,9 @@ TALER_TESTING_prepare_exchange (const char *config_filename, } -/** - * Find denomination key matching the given amount. - * - * @param keys array of keys to search - * @param amount coin value to look for - * @param cipher denomination cipher - * @return NULL if no matching key was found - */ const struct TALER_EXCHANGE_DenomPublicKey * TALER_TESTING_find_pk (const struct TALER_EXCHANGE_Keys *keys, - const struct TALER_Amount *amount, - const enum TALER_DenominationCipher cipher) + const struct TALER_Amount *amount) { struct GNUNET_TIME_Timestamp now; struct TALER_EXCHANGE_DenomPublicKey *pk; @@ -432,8 +423,6 @@ TALER_TESTING_find_pk (const struct TALER_EXCHANGE_Keys *keys, for (unsigned int i = 0; inum_denom_keys; i++) { pk = &keys->denom_keys[i]; - if (cipher != pk->key.cipher) - continue; if ( (0 == TALER_amount_cmp (amount, &pk->value)) && (GNUNET_TIME_timestamp_cmp (now, @@ -450,8 +439,6 @@ TALER_TESTING_find_pk (const struct TALER_EXCHANGE_Keys *keys, for (unsigned int i = 0; inum_denom_keys; i++) { pk = &keys->denom_keys[i]; - if (cipher != pk->key.cipher) - continue; if ( (0 == TALER_amount_cmp (amount, &pk->value)) && (GNUNET_TIME_timestamp_cmp (now, @@ -473,25 +460,6 @@ TALER_TESTING_find_pk (const struct TALER_EXCHANGE_Keys *keys, return NULL; } } - // do 3rd pass to check if cipher type is to blame for failure - for (unsigned int i = 0; inum_denom_keys; i++) - { - pk = &keys->denom_keys[i]; - if ( (0 == TALER_amount_cmp (amount, - &pk->value)) && - (cipher != pk->key.cipher) ) - { - GNUNET_log - (GNUNET_ERROR_TYPE_WARNING, - "Have denomination key for `%s', but with wrong" - " cipher type %d vs %d\n", - str, - cipher, - pk->key.cipher); - GNUNET_free (str); - return NULL; - } - } GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "No denomination key for amount %s found\n", str); -- cgit v1.2.3