diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-06-21 20:43:54 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-06-21 20:43:54 +0200 |
commit | 8f6e911308c717ffbd9bc1a2f955ffc42c6ea784 (patch) | |
tree | 787a2c12d9ca1e4fb731846afe8b3a41b5c9d885 /src/mint-lib/mint_api_handle.c | |
parent | 5caa52aa4cf7eb4e59cef34195f61d088a28a622 (diff) | |
download | exchange-8f6e911308c717ffbd9bc1a2f955ffc42c6ea784.tar.xz |
-implement signature checking on /deposit
Diffstat (limited to 'src/mint-lib/mint_api_handle.c')
-rw-r--r-- | src/mint-lib/mint_api_handle.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/mint-lib/mint_api_handle.c b/src/mint-lib/mint_api_handle.c index abd4d0db7..530cd6062 100644 --- a/src/mint-lib/mint_api_handle.c +++ b/src/mint-lib/mint_api_handle.c @@ -752,7 +752,7 @@ TALER_MINT_disconnect (struct TALER_MINT_Handle *mint) * @return sk current online signing key for the mint, NULL on error */ const struct TALER_MintPublicKeyP * -TALER_MINT_get_signing_key (struct TALER_MINT_Keys *keys) +TALER_MINT_get_signing_key (const struct TALER_MINT_Keys *keys) { struct GNUNET_TIME_Absolute now; unsigned int i; @@ -766,4 +766,38 @@ TALER_MINT_get_signing_key (struct TALER_MINT_Keys *keys) } +/** + * Obtain the denomination key details from the mint. + * + * @param keys the mint's key set + * @param pk public key of the denomination to lookup + * @return details about the given denomination key + */ +const struct TALER_MINT_DenomPublicKey * +TALER_MINT_get_denomination_key (const struct TALER_MINT_Keys *keys, + const struct TALER_DenominationPublicKey *pk) +{ + unsigned int i; + + for (i=0;i<keys->num_denom_keys;i++) + if (0 == GNUNET_CRYPTO_rsa_public_key_cmp (pk->rsa_public_key, + keys->denom_keys[i].key.rsa_public_key)) + return &keys->denom_keys[i]; + return NULL; +} + + +/** + * Obtain the keys from the mint. + * + * @param mint the mint handle + * @return the mint's key set + */ +const struct TALER_MINT_Keys * +TALER_MINT_get_keys (const struct TALER_MINT_Handle *mint) +{ + return &mint->key_data; +} + + /* end of mint_api_handle.c */ |