summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_track_transfer.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-07 15:10:24 +0200
committerChristian Grothoff <christian@grothoff.org>2017-10-07 15:10:24 +0200
commitcc5d09cf1d28e31ca8eca054b7da2c3873e2efe7 (patch)
treeeb843f228165457fa066038058df380fc5652405 /src/exchange/taler-exchange-httpd_track_transfer.c
parent7935349d35611901d42d088f0e6dbd5ec8c47272 (diff)
downloadexchange-cc5d09cf1d28e31ca8eca054b7da2c3873e2efe7.tar.gz
exchange-cc5d09cf1d28e31ca8eca054b7da2c3873e2efe7.tar.bz2
exchange-cc5d09cf1d28e31ca8eca054b7da2c3873e2efe7.zip
properly handle signing errors if httpd lacks signing keys by returning internal errors (and handling new return value from TEH_KS_sign)
Diffstat (limited to 'src/exchange/taler-exchange-httpd_track_transfer.c')
-rw-r--r--src/exchange/taler-exchange-httpd_track_transfer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd_track_transfer.c b/src/exchange/taler-exchange-httpd_track_transfer.c
index 57b621e48..4d28096be 100644
--- a/src/exchange/taler-exchange-httpd_track_transfer.c
+++ b/src/exchange/taler-exchange-httpd_track_transfer.c
@@ -131,9 +131,17 @@ reply_track_transfer_details (struct MHD_Connection *connection,
wdp.h_wire = *h_wire;
GNUNET_CRYPTO_hash_context_finish (hash_context,
&wdp.h_details);
- TEH_KS_sign (&wdp.purpose,
- &pub,
- &sig);
+ if (GNUNET_OK !=
+ TEH_KS_sign (&wdp.purpose,
+ &pub,
+ &sig))
+ {
+ json_decref (deposits);
+ return TEH_RESPONSE_reply_internal_error (connection,
+ TALER_EC_EXCHANGE_BAD_CONFIGURATION,
+ "no keys");
+ }
+
return TEH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
"{s:o, s:o, s:o, s:o, s:o, s:o, s:o, s:o}",