From 2d84d7f6ddce69b5c1d4d44a16a9aa0663fd4eba Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 7 May 2022 23:27:56 +0200 Subject: add function for purse status signing --- src/include/taler_crypto_lib.h | 19 +++++++++++++++++++ src/include/taler_signatures.h | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index 1ee080abc..cf160c689 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -3976,6 +3976,25 @@ TALER_exchange_online_purse_merged_verify ( const struct TALER_ExchangeSignatureP *sig); +enum TALER_ErrorCode +TALER_exchange_purse_status_sign ( + TALER_ExchangeSignCallback scb, + struct GNUNET_TIME_Timestamp merge_timestamp, + struct GNUNET_TIME_Timestamp deposit_timestamp, + const struct TALER_Amount *balance, + struct TALER_ExchangePublicKeyP *pub, + struct TALER_ExchangeSignatureP *sig); + + +enum GNUNET_GenericReturnValue +TALER_exchange_purse_status_verify ( + struct GNUNET_TIME_Timestamp merge_timestamp, + struct GNUNET_TIME_Timestamp deposit_timestamp, + const struct TALER_Amount *balance, + const struct TALER_ExchangePublicKeyP *exchange_pub, + const struct TALER_ExchangeSignatureP *exchange_sig); + + /* ********************* offline signing ************************** */ diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 9897082d8..57c84b50b 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -189,6 +189,13 @@ */ #define TALER_SIGNATURE_EXCHANGE_CONFIRM_PURSE_MERGED 1046 +/** + * Purpose for the state of a purse, signed by the exchange's signing + * key. + */ +#define TALER_SIGNATURE_EXCHANGE_PURSE_STATUS 1047 + + /**********************/ /* Auditor signatures */ /**********************/ @@ -383,5 +390,4 @@ #define TALER_SIGNATURE_SYNC_BACKUP_UPLOAD 1450 - #endif -- cgit v1.2.3