aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_handle.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 707e5cf5..add37a80 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -902,16 +902,19 @@ decode_keys_json (const json_t *resp_obj,
{
struct TALER_MasterSignatureP extensions_sig = {0};
json_t *extensions = NULL;
+ bool no_extensions = false;
+ bool no_signature = false;
+
struct GNUNET_JSON_Specification ext_spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_json ("extensions",
&extensions),
- NULL),
+ &no_extensions),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_fixed_auto (
"extensions_sig",
&extensions_sig),
- NULL),
+ &no_signature),
GNUNET_JSON_spec_end ()
};
@@ -921,7 +924,12 @@ decode_keys_json (const json_t *resp_obj,
ext_spec,
NULL, NULL));
- if (NULL != extensions)
+
+ if (! no_extensions && no_signature)
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "found extensions without signature\n");
+
+ if (! no_extensions && ! no_signature)
{
/* 2. We have an extensions object. Verify its signature. */
EXITIF (GNUNET_OK !=
@@ -936,7 +944,7 @@ decode_keys_json (const json_t *resp_obj,
}
/* 4. assuming we might have now a new value for age_mask, set it in key_data */
- key_data->age_mask = TALER_extensions_age_restriction_ageMask ();
+ key_data->age_mask = TALER_extensions_get_age_restriction_mask ();
}
/**