aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-05-29 17:28:28 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-05-29 17:28:28 +0200
commit535a6566259370d992a29f0d29c05b045ff93afc (patch)
tree06e7b02e0a2590c4fd13381ac90fd5b809d81841 /src
parent6096c1387cd97f1fd654520b765af93a040c9fa5 (diff)
improve error message for wire response files
Diffstat (limited to 'src')
-rw-r--r--src/exchange/taler-exchange-httpd_validation.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_validation.c b/src/exchange/taler-exchange-httpd_validation.c
index aa97af2f2..ba34de80c 100644
--- a/src/exchange/taler-exchange-httpd_validation.c
+++ b/src/exchange/taler-exchange-httpd_validation.c
@@ -157,6 +157,17 @@ load_account (void *cls,
return;
}
GNUNET_free (url);
+ /* Provide friendly error message if user forgot to sign wire response. */
+ if (NULL == json_object_get (wire_s, "master_sig"))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Wire response file `%s' has not been signed."
+ " Use taler-exchange-wire to sign it.\n",
+ ai->wire_response_filename);
+ json_decref (wire_s);
+ *ret = GNUNET_SYSERR;
+ return;
+ }
if (GNUNET_OK !=
TALER_JSON_exchange_wire_signature_check (wire_s,
&TEH_master_public_key))