[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: implement 'lookup_salt()'
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: implement 'lookup_salt()' |
Date: |
Fri, 19 Feb 2021 12:03:00 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new ce5ad77 implement 'lookup_salt()'
ce5ad77 is described below
commit ce5ad77b364572fac296de6e03f9a3ed77bf04a5
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Feb 19 12:02:58 2021 +0100
implement 'lookup_salt()'
---
src/reducer/anastasis_api_backup_redux.c | 33 ++++++++++++++++++++++++++++++--
src/restclient/anastasis_api_config.c | 2 +-
2 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/src/reducer/anastasis_api_backup_redux.c
b/src/reducer/anastasis_api_backup_redux.c
index a0edab0..de152ad 100644
--- a/src/reducer/anastasis_api_backup_redux.c
+++ b/src/reducer/anastasis_api_backup_redux.c
@@ -2623,8 +2623,37 @@ lookup_salt (const json_t *state,
const char *provider_url,
struct ANASTASIS_CRYPTO_PowSalt *salt)
{
- GNUNET_break (0); // FIXME: not implemented
- return GNUNET_SYSERR;
+ const json_t *aps;
+ const json_t *cfg;
+ struct GNUNET_JSON_Specification spec[] = {
+ GNUNET_JSON_spec_fixed_auto ("salt",
+ salt),
+ GNUNET_JSON_spec_end ()
+ };
+
+ aps = json_object_get (state,
+ "authentication_providers");
+ if (NULL == aps)
+ {
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
+ cfg = json_object_get (aps,
+ provider_url);
+ if (NULL == cfg)
+ {
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
+ if (GNUNET_OK !=
+ GNUNET_JSON_parse (cfg,
+ spec,
+ NULL, NULL))
+ {
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
+ return GNUNET_OK;
}
diff --git a/src/restclient/anastasis_api_config.c
b/src/restclient/anastasis_api_config.c
index d039aa0..9eb6444 100644
--- a/src/restclient/anastasis_api_config.c
+++ b/src/restclient/anastasis_api_config.c
@@ -103,7 +103,7 @@ handle_config_finished (void *cls,
&acfg.storage_limit_in_megabytes),
TALER_JSON_spec_amount ("annual_fee",
&acfg.annual_fee),
- TALER_JSON_spec_amount ("annual_fee",
+ TALER_JSON_spec_amount ("truth_upload_fee",
&acfg.truth_upload_fee),
TALER_JSON_spec_relative_time ("truth_lifetime",
&acfg.truth_lifetime),
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: implement 'lookup_salt()',
gnunet <=