From 33877b2c55be2d9a4deaf56c709a7943dd00b62c Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 17 Jan 2020 20:50:09 +0100 Subject: address fixme, fix use-after-free in testing traits --- src/include/taler_exchange_service.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/include/taler_exchange_service.h') diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 972b94aa1..de1daf1ef 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -530,6 +530,28 @@ TALER_EXCHANGE_get_denomination_key (const struct TALER_EXCHANGE_Keys *keys, TALER_DenominationPublicKey *pk); +/** + * Create a copy of a denomination public key. + * + * @param key key to copy + * @returns a copy, must be freed with #TALER_EXCHANGE_destroy_denomination_key + */ +struct TALER_EXCHANGE_DenomPublicKey * +TALER_EXCHANGE_copy_denomination_key (const struct + TALER_EXCHANGE_DenomPublicKey *key); + + +/** + * Destroy a denomination public key. + * Should only be called with keys created by #TALER_EXCHANGE_copy_denomination_key. + * + * @param key key to destroy. + */ +void +TALER_EXCHANGE_destroy_denomination_key (struct + TALER_EXCHANGE_DenomPublicKey *key); + + /** * Obtain the denomination key details from the exchange. * -- cgit v1.2.3