diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-01-10 00:04:23 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-01-10 00:04:23 +0100 |
commit | e30989c9303105770504f1bdbf26d843adf19468 (patch) | |
tree | 53f2ec2ec7b2d7f069cfe5f65268d019e3e3b124 /src/include | |
parent | d91750ca0fa635379deaf6d6641981e6d449bc1d (diff) |
[age restriction] progress 11/n
Parse age restriction information from "/keys"
- parse "age_restriction" extension, extract mask for age groups
- parse denominations from "age_restricted_denoms", too, if available
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_exchange_service.h | 10 | ||||
-rw-r--r-- | src/include/taler_extensions.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 04b731b32..6976293cb 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -159,6 +159,11 @@ struct TALER_EXCHANGE_DenomPublicKey * revoked by the exchange. */ bool revoked; + + /** + * Is the denomination age-restricted? + */ + bool age_restricted; }; @@ -283,6 +288,11 @@ struct TALER_EXCHANGE_Keys struct GNUNET_TIME_Timestamp last_denom_issue_date; /** + * If age restriction is enabled on the exchange, we get an non-zero age_mask + */ + struct TALER_AgeMask age_mask; + + /** * Length of the @e sign_keys array (number of valid entries). */ unsigned int num_sign_keys; diff --git a/src/include/taler_extensions.h b/src/include/taler_extensions.h index 199776eb7..243811eb5 100644 --- a/src/include/taler_extensions.h +++ b/src/include/taler_extensions.h @@ -110,7 +110,7 @@ TALER_extension_get_by_name (const char *name, * @return Error, if age groups were invalid, OK otherwise. */ enum TALER_Extension_ReturnValue -TALER_parse_age_group_string (char *groups, +TALER_parse_age_group_string (const char *groups, struct TALER_AgeMask *mask); /** |