-fixes for test
This commit is contained in:
parent
016551dbb4
commit
77bab62560
@ -1 +1 @@
|
|||||||
Subproject commit 8c7d9be40ba627348da3e01b91b4f1d3cc78631f
|
Subproject commit fbd2bf1c8a39ff334b2ae52d7be44416490848bd
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of TALER
|
This file is part of TALER
|
||||||
Copyright (C) 2019-2020 Taler Systems SA
|
Copyright (C) 2019-2021 Taler Systems SA
|
||||||
|
|
||||||
TALER is free software; you can redistribute it and/or modify it
|
TALER is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License as published
|
under the terms of the GNU General Public License as published
|
||||||
@ -24,9 +24,6 @@
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "taler_curl_lib.h"
|
#include "taler_curl_lib.h"
|
||||||
|
|
||||||
// FIXME-workaround: without this, we somehow sometimes forget the header
|
|
||||||
// that indicates compression and then the exchange 400s us!
|
|
||||||
#undef TALER_CURL_COMPRESS_BODIES
|
|
||||||
|
|
||||||
#if TALER_CURL_COMPRESS_BODIES
|
#if TALER_CURL_COMPRESS_BODIES
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
|
@ -119,7 +119,31 @@ TEH_handler_kyc_check (
|
|||||||
TALER_EC_GENERIC_PARAMETER_MALFORMED,
|
TALER_EC_GENERIC_PARAMETER_MALFORMED,
|
||||||
"payment_target_uuid");
|
"payment_target_uuid");
|
||||||
}
|
}
|
||||||
/* FIXME: write long polling logic ... */
|
{
|
||||||
|
const char *ts;
|
||||||
|
|
||||||
|
ts = MHD_lookup_connection_value (rc->connection,
|
||||||
|
MHD_GET_ARGUMENT_KIND,
|
||||||
|
"timeout_ms");
|
||||||
|
if (NULL != ts)
|
||||||
|
{
|
||||||
|
unsigned long long tms;
|
||||||
|
|
||||||
|
if (1 !=
|
||||||
|
sscanf (ts,
|
||||||
|
"%llu%c",
|
||||||
|
&tms,
|
||||||
|
&dummy))
|
||||||
|
{
|
||||||
|
GNUNET_break_op (0);
|
||||||
|
return TALER_MHD_reply_with_error (rc->connection,
|
||||||
|
MHD_HTTP_BAD_REQUEST,
|
||||||
|
TALER_EC_GENERIC_PARAMETER_MALFORMED,
|
||||||
|
"timeout_ms");
|
||||||
|
}
|
||||||
|
/* FIXME: write long polling logic ... */
|
||||||
|
}
|
||||||
|
}
|
||||||
{
|
{
|
||||||
const char *hps;
|
const char *hps;
|
||||||
|
|
||||||
@ -176,8 +200,8 @@ TEH_handler_kyc_check (
|
|||||||
{
|
{
|
||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
return TALER_MHD_reply_with_error (rc->connection,
|
return TALER_MHD_reply_with_error (rc->connection,
|
||||||
MHD_HTTP_FORBIDDEN,
|
MHD_HTTP_UNAUTHORIZED,
|
||||||
42, /* FIXME: EC! */
|
TALER_EC_EXCHANGE_KYC_CHECK_AUTHORIZATION_FAILED,
|
||||||
"h_payto");
|
"h_payto");
|
||||||
}
|
}
|
||||||
if (! kcc.kyc.ok)
|
if (! kcc.kyc.ok)
|
||||||
|
@ -209,10 +209,11 @@ TALER_EXCHANGE_kyc_wallet (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
json_decref (req);
|
json_decref (req);
|
||||||
kwh->job = GNUNET_CURL_job_add (ctx,
|
kwh->job = GNUNET_CURL_job_add2 (ctx,
|
||||||
eh,
|
eh,
|
||||||
&handle_kyc_wallet_finished,
|
kwh->ctx.headers,
|
||||||
kwh);
|
&handle_kyc_wallet_finished,
|
||||||
|
kwh);
|
||||||
return kwh;
|
return kwh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,10 +226,8 @@ run (void *cls,
|
|||||||
track),
|
track),
|
||||||
TALER_TESTING_cmd_batch ("withdraw-kyc",
|
TALER_TESTING_cmd_batch ("withdraw-kyc",
|
||||||
withdraw_kyc),
|
withdraw_kyc),
|
||||||
#if 0
|
|
||||||
TALER_TESTING_cmd_batch ("wallet-kyc",
|
TALER_TESTING_cmd_batch ("wallet-kyc",
|
||||||
wallet_kyc),
|
wallet_kyc),
|
||||||
#endif
|
|
||||||
TALER_TESTING_cmd_end ()
|
TALER_TESTING_cmd_end ()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -167,11 +167,11 @@ wallet_kyc_run (void *cls,
|
|||||||
{
|
{
|
||||||
GNUNET_CRYPTO_eddsa_key_create (&kwg->reserve_priv.eddsa_priv);
|
GNUNET_CRYPTO_eddsa_key_create (&kwg->reserve_priv.eddsa_priv);
|
||||||
}
|
}
|
||||||
|
GNUNET_CRYPTO_eddsa_key_get_public (&kwg->reserve_priv.eddsa_priv,
|
||||||
|
&kwg->reserve_pub.eddsa_pub);
|
||||||
kwg->reserve_payto_uri
|
kwg->reserve_payto_uri
|
||||||
= TALER_payto_from_reserve (TALER_EXCHANGE_get_base_url (is->exchange),
|
= TALER_payto_from_reserve (TALER_EXCHANGE_get_base_url (is->exchange),
|
||||||
&kwg->reserve_pub);
|
&kwg->reserve_pub);
|
||||||
GNUNET_CRYPTO_eddsa_key_get_public (&kwg->reserve_priv.eddsa_priv,
|
|
||||||
&kwg->reserve_pub.eddsa_pub);
|
|
||||||
kwg->kwh = TALER_EXCHANGE_kyc_wallet (is->exchange,
|
kwg->kwh = TALER_EXCHANGE_kyc_wallet (is->exchange,
|
||||||
&kwg->reserve_priv,
|
&kwg->reserve_priv,
|
||||||
&wallet_kyc_cb,
|
&wallet_kyc_cb,
|
||||||
|
Loading…
Reference in New Issue
Block a user