diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-12-14 15:42:32 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-12-14 15:42:32 +0100 |
commit | b5d88fc2d1832fd27bdd7df0860c07ae3c61312c (patch) | |
tree | bc279533511c65d9f5dabdb1d03d7ee0bf156888 /src/exchange/taler-exchange-httpd_transfers_get.c | |
parent | 468fc9d1a1bcf3eb771519a746c5e3218ee121e3 (diff) | |
download | exchange-b5d88fc2d1832fd27bdd7df0860c07ae3c61312c.tar.gz exchange-b5d88fc2d1832fd27bdd7df0860c07ae3c61312c.tar.bz2 exchange-b5d88fc2d1832fd27bdd7df0860c07ae3c61312c.zip |
activating implementation of #6175
Diffstat (limited to 'src/exchange/taler-exchange-httpd_transfers_get.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_transfers_get.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/exchange/taler-exchange-httpd_transfers_get.c b/src/exchange/taler-exchange-httpd_transfers_get.c index b5237df25..b7f24f23f 100644 --- a/src/exchange/taler-exchange-httpd_transfers_get.c +++ b/src/exchange/taler-exchange-httpd_transfers_get.c @@ -24,6 +24,7 @@ #include <microhttpd.h> #include <pthread.h> #include "taler_signatures.h" +#include "taler-exchange-httpd_keys.h" #include "taler-exchange-httpd_keystate.h" #include "taler-exchange-httpd_transfers_get.h" #include "taler-exchange-httpd_responses.h" @@ -99,6 +100,7 @@ reply_transfer_details (struct MHD_Connection *connection, struct TALER_ExchangePublicKeyP pub; struct TALER_ExchangeSignatureP sig; + GNUNET_TIME_round_abs (&exec_time); deposits = json_array (); if (NULL == deposits) @@ -158,16 +160,19 @@ reply_transfer_details (struct MHD_Connection *connection, wdp.h_wire = *h_wire; GNUNET_CRYPTO_hash_context_finish (hash_context, &wdp.h_details); - if (GNUNET_OK != - TEH_KS_sign (&wdp, - &pub, - &sig)) { - json_decref (deposits); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_EXCHANGE_GENERIC_BAD_CONFIGURATION, - "no keys"); + enum TALER_ErrorCode ec; + + if (TALER_EC_NONE != + (ec = TEH_keys_exchange_sign (&wdp, + &pub, + &sig))) + { + json_decref (deposits); + return TALER_MHD_reply_with_ec (connection, + ec, + NULL); + } } return TALER_MHD_reply_json_pack (connection, |