From cf1ce4786356cba7d3f84a74fab282650f612db9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 17 Nov 2018 16:11:47 +0100 Subject: more work towards testing deposit confirmations --- src/exchange-lib/exchange_api_common.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/exchange-lib/exchange_api_common.c') diff --git a/src/exchange-lib/exchange_api_common.c b/src/exchange-lib/exchange_api_common.c index de05348f..6b0aa6ff 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;inum_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 */ -- cgit v1.2.3