summaryrefslogtreecommitdiff
path: root/src/include/taler_json_lib.h
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-01-08 14:40:20 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2022-01-08 14:40:20 +0100
commitcc7d7707ab2bd43bc9e95c0eeec9ce95cdc0c523 (patch)
tree472e895b321e539f4675f016a285d6f6e6436b76 /src/include/taler_json_lib.h
parentb49fac3d5892f75a2eb7fbfbca0056965c6967c7 (diff)
downloadexchange-cc7d7707ab2bd43bc9e95c0eeec9ce95cdc0c523.tar.gz
exchange-cc7d7707ab2bd43bc9e95c0eeec9ce95cdc0c523.tar.bz2
exchange-cc7d7707ab2bd43bc9e95c0eeec9ce95cdc0c523.zip
[age restriction] progress 10/n
More work towards support for extensions: - Prepared statements and DB-plugin-functions for setting and retrieving configurations from the database added. - primitive "registry" of extensions for age restrictions and peer2peer (stub) - TALER_Extensions now with FP for parsing, setting and converting a configuration. - /management/extensions handler now verifies signature of the (opaque) json object for all extensions. - /management/extensions handler calls the FP in the corrensponding TALER_Extension for parsing and setting the configuration of a particular extension More work towards age restriction: - TALER_Extensions interfaces for config-parser, -setter and converter implemented for age restriction - DB event handler now retrieves config from database, parses it and sets it (the age mask) in the global extension. - load_age_mask now loads age mask from the global extension (and not from the config file) - add age_restricted_denoms to /keys response
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r--src/include/taler_json_lib.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index ac8793ebc..102b3a6ff 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -532,7 +532,7 @@ TALER_JSON_wire_to_payto (const json_t *wire_s);
/**
- * Hash @a extensions.
+ * Hash @a extensions in deposits.
*
* @param extensions contract extensions to hash
* @param[out] ech where to write the extension hash
@@ -541,6 +541,16 @@ void
TALER_deposit_extension_hash (const json_t *extensions,
struct TALER_ExtensionContractHash *ech);
+/**
+ * Hash the @a config of an extension, given as JSON
+ *
+ * @param config configuration of the extension
+ * @param[out] eh where to write the extension hash
+ * @return GNUNET_OK on success, GNUNET_SYSERR on failure
+ */
+enum GNUNET_GenericReturnValue
+TALER_extension_config_hash (const json_t *config,
+ struct TALER_ExtensionConfigHash *eh);
/**
* Parses a JSON object { "extension": "age_restriction", "mask": <uint32> }.
@@ -553,7 +563,6 @@ enum GNUNET_GenericReturnValue
TALER_agemask_parse_json (const json_t *root,
struct TALER_AgeMask *mask);
-
#endif /* TALER_JSON_LIB_H_ */
/* End of taler_json_lib.h */