summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-12-29 11:48:57 +0100
committerChristian Grothoff <christian@grothoff.org>2022-12-29 11:48:57 +0100
commit26aa9d985e2f9ba6ce3895e7e2625226e2008bfb (patch)
tree951a3d49375a225103c363f005bd0399a195eed4 /src/util
parentfa840f7071da56c4794c887b813ca2a6f491f836 (diff)
downloadexchange-26aa9d985e2f9ba6ce3895e7e2625226e2008bfb.tar.gz
exchange-26aa9d985e2f9ba6ce3895e7e2625226e2008bfb.tar.bz2
exchange-26aa9d985e2f9ba6ce3895e7e2625226e2008bfb.zip
expand DB API with AML functions, fix purse refund calculations in libtalerexchange
Diffstat (limited to 'src/util')
-rw-r--r--src/util/offline_signatures.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/offline_signatures.c b/src/util/offline_signatures.c
index d6638998b..b1e3b93a3 100644
--- a/src/util/offline_signatures.c
+++ b/src/util/offline_signatures.c
@@ -54,7 +54,7 @@ struct TALER_MasterAmlOfficerStatusPS
struct GNUNET_HashCode h_officer_name GNUNET_PACKED;
/**
- * 1 if enabled, 0 if disabled, in NBO.
+ * Bitmask: 1 if enabled; 2 for read-only access. in NBO.
*/
uint32_t is_active GNUNET_PACKED;
};
@@ -67,6 +67,7 @@ TALER_exchange_offline_aml_officer_status_sign (
const char *officer_name,
struct GNUNET_TIME_Timestamp change_date,
bool is_active,
+ bool read_only,
const struct TALER_MasterPrivateKeyP *master_priv,
struct TALER_MasterSignatureP *master_sig)
{
@@ -75,7 +76,7 @@ TALER_exchange_offline_aml_officer_status_sign (
.purpose.size = htonl (sizeof (as)),
.change_date = GNUNET_TIME_timestamp_hton (change_date),
.officer_pub = *officer_pub,
- .is_active = htonl (is_active ? 1 : 0)
+ .is_active = htonl ((is_active ? 1 : 0) + (read_only ? 2 : 0))
};
GNUNET_CRYPTO_hash (officer_name,
@@ -93,6 +94,7 @@ TALER_exchange_offline_aml_officer_status_verify (
const char *officer_name,
struct GNUNET_TIME_Timestamp change_date,
bool is_active,
+ bool read_only,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_MasterSignatureP *master_sig)
{
@@ -101,7 +103,7 @@ TALER_exchange_offline_aml_officer_status_verify (
.purpose.size = htonl (sizeof (as)),
.change_date = GNUNET_TIME_timestamp_hton (change_date),
.officer_pub = *officer_pub,
- .is_active = htonl (is_active ? 1 : 0)
+ .is_active = htonl ((is_active ? 1 : 0) + (read_only ? 2 : 0))
};
GNUNET_CRYPTO_hash (officer_name,