summaryrefslogtreecommitdiff
path: root/src/exchange-lib/exchange_api_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-17 16:11:47 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-17 16:11:47 +0100
commitcf1ce4786356cba7d3f84a74fab282650f612db9 (patch)
tree744790593dd70e5338dd53e4e450364e53158999 /src/exchange-lib/exchange_api_common.c
parent4d058c4eb7283b1a77a877d583daaefa847213ec (diff)
downloadexchange-cf1ce4786356cba7d3f84a74fab282650f612db9.tar.gz
exchange-cf1ce4786356cba7d3f84a74fab282650f612db9.tar.bz2
exchange-cf1ce4786356cba7d3f84a74fab282650f612db9.zip
more work towards testing deposit confirmations
Diffstat (limited to 'src/exchange-lib/exchange_api_common.c')
-rw-r--r--src/exchange-lib/exchange_api_common.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/exchange-lib/exchange_api_common.c b/src/exchange-lib/exchange_api_common.c
index de05348f3..6b0aa6ff6 100644
--- a/src/exchange-lib/exchange_api_common.c
+++ b/src/exchange-lib/exchange_api_common.c
@@ -325,4 +325,29 @@ TALER_EXCHANGE_verify_coin_history (const char *currency,
}
+/**
+ * Obtain meta data about an exchange (online) signing
+ * key.
+ *
+ * @param keys from where to obtain the meta data
+ * @param exchange_pub public key to lookup
+ * @return NULL on error (@a exchange_pub not known)
+ */
+const struct TALER_EXCHANGE_SigningPublicKey *
+TALER_EXCHANGE_get_exchange_signing_key_info (const struct TALER_EXCHANGE_Keys *keys,
+ const struct TALER_ExchangePublicKeyP *exchange_pub)
+{
+ for (unsigned int i=0;i<keys->num_sign_keys;i++)
+ {
+ const struct TALER_EXCHANGE_SigningPublicKey *spk;
+
+ spk = &keys->sign_keys[i];
+ if (0 == memcmp (exchange_pub,
+ &spk->key,
+ sizeof (struct TALER_ExchangePublicKeyP)))
+ return spk;
+ }
+ return NULL;
+}
+
/* end of exchange_api_common.c */