summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_test.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-08-05 16:08:19 +0200
committerChristian Grothoff <christian@grothoff.org>2016-08-05 16:08:19 +0200
commit745719dbc1482734ab3ca7a20541ee8a12ecb69c (patch)
tree68ca6a1f328f59351a69064c72dc87b92756b689 /src/exchange/taler-exchange-httpd_test.c
parente800772c85e1e1399c756162921c3f557794ffea (diff)
downloadexchange-745719dbc1482734ab3ca7a20541ee8a12ecb69c.tar.gz
exchange-745719dbc1482734ab3ca7a20541ee8a12ecb69c.tar.bz2
exchange-745719dbc1482734ab3ca7a20541ee8a12ecb69c.zip
first half of changing refresh protocol to derive all key data from DH
Diffstat (limited to 'src/exchange/taler-exchange-httpd_test.c')
-rw-r--r--src/exchange/taler-exchange-httpd_test.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/exchange/taler-exchange-httpd_test.c b/src/exchange/taler-exchange-httpd_test.c
index d8849d310..b371bd215 100644
--- a/src/exchange/taler-exchange-httpd_test.c
+++ b/src/exchange/taler-exchange-httpd_test.c
@@ -535,16 +535,14 @@ TMH_TEST_handler_test_transfer (struct TMH_RequestHandler *rh,
{
json_t *json;
int res;
- struct TALER_EncryptedLinkSecretP secret_enc;
struct TALER_TransferPrivateKeyP trans_priv;
struct TALER_CoinSpendPublicKeyP coin_pub;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_fixed_auto ("secret_enc", &secret_enc),
GNUNET_JSON_spec_fixed_auto ("trans_priv", &trans_priv),
GNUNET_JSON_spec_fixed_auto ("coin_pub", &coin_pub),
GNUNET_JSON_spec_end ()
};
- struct TALER_LinkSecretP secret;
+ struct TALER_TransferSecretP secret;
res = TMH_PARSE_post_json (connection,
connection_cls,
@@ -561,16 +559,9 @@ TMH_TEST_handler_test_transfer (struct TMH_RequestHandler *rh,
json_decref (json);
if (GNUNET_YES != res)
return (GNUNET_NO == res) ? MHD_YES : MHD_NO;
- if (GNUNET_OK !=
- TALER_link_decrypt_secret (&secret_enc,
- &trans_priv,
- &coin_pub,
- &secret))
- {
- GNUNET_JSON_parse_free (spec);
- return TMH_RESPONSE_reply_internal_error (connection,
- "Failed to decrypt secret");
- }
+ TALER_link_reveal_transfer_secret (&trans_priv,
+ &coin_pub,
+ &secret);
return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
"{s:o}",