aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_helpers_exchange.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-02-04 19:29:52 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-02-04 19:30:15 +0100
commit03fd154a69212df740cf3b09567a1bb081b64873 (patch)
tree0441bff7f146771a04162d587bc995240a8b5b22 /src/testing/testing_api_helpers_exchange.c
parent7d2a1a596a8502dd040ed47eb0dd17bb0610cc08 (diff)
downloadexchange-03fd154a69212df740cf3b09567a1bb081b64873.tar.xz
messing with CS/RSA fixes
Diffstat (limited to 'src/testing/testing_api_helpers_exchange.c')
-rw-r--r--src/testing/testing_api_helpers_exchange.c34
1 files changed, 1 insertions, 33 deletions
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; i<keys->num_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; i<keys->num_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; i<keys->num_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);