-fix FTBFS
This commit is contained in:
parent
831e32b7ad
commit
5147c8b788
@ -1 +1 @@
|
|||||||
Subproject commit b799c63db9beda99e9151e7611a1ac4e810786ab
|
Subproject commit 8e5eda9507f42af6a394d218a65082b3294855b7
|
@ -128,11 +128,13 @@ handle_purse_create_deposit_finished (void *cls,
|
|||||||
const struct TALER_EXCHANGE_Keys *key_state;
|
const struct TALER_EXCHANGE_Keys *key_state;
|
||||||
struct GNUNET_TIME_Timestamp etime;
|
struct GNUNET_TIME_Timestamp etime;
|
||||||
struct TALER_Amount total_deposited;
|
struct TALER_Amount total_deposited;
|
||||||
|
struct TALER_ExchangeSignatureP exchange_sig;
|
||||||
|
struct TALER_ExchangePublicKeyP exchange_pub;
|
||||||
struct GNUNET_JSON_Specification spec[] = {
|
struct GNUNET_JSON_Specification spec[] = {
|
||||||
GNUNET_JSON_spec_fixed_auto ("exchange_sig",
|
GNUNET_JSON_spec_fixed_auto ("exchange_sig",
|
||||||
&pch->exchange_sig),
|
&exchange_sig),
|
||||||
GNUNET_JSON_spec_fixed_auto ("exchange_pub",
|
GNUNET_JSON_spec_fixed_auto ("exchange_pub",
|
||||||
&pch->exchange_pub),
|
&exchange_pub),
|
||||||
GNUNET_JSON_spec_timestamp ("exchange_timestamp",
|
GNUNET_JSON_spec_timestamp ("exchange_timestamp",
|
||||||
&etime),
|
&etime),
|
||||||
TALER_JSON_spec_amount ("total_deposited",
|
TALER_JSON_spec_amount ("total_deposited",
|
||||||
@ -158,26 +160,24 @@ handle_purse_create_deposit_finished (void *cls,
|
|||||||
{
|
{
|
||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
dr.hr.http_status = 0;
|
dr.hr.http_status = 0;
|
||||||
dr.hr.ec =
|
dr.hr.ec = TALER_EC_EXCHANGE_PURSE_CREATE_EXCHANGE_SIGNATURE_INVALID;
|
||||||
TALER_EC_EXCHANGE_PURSE_CREATE_WITH_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_exchange_online_purse_created_verify (
|
TALER_exchange_online_purse_created_verify (
|
||||||
etime,
|
etime,
|
||||||
pcc->purse_expiration,
|
pch->purse_expiration,
|
||||||
&pcc->purse_value_after_fees,
|
&pch->purse_value_after_fees,
|
||||||
&total_deposited,
|
&total_deposited,
|
||||||
&pcc->purse_pub,
|
&pch->purse_pub,
|
||||||
&pcc->merge_pub,
|
&pch->merge_pub,
|
||||||
&pcc->h_contract_terms,
|
&pch->h_contract_terms,
|
||||||
&exchange_pub,
|
&exchange_pub,
|
||||||
&exchange_sig))
|
&exchange_sig))
|
||||||
{
|
{
|
||||||
GNUNET_break_op (0);
|
GNUNET_break_op (0);
|
||||||
dr.hr.http_status = 0;
|
dr.hr.http_status = 0;
|
||||||
dr.hr.ec =
|
dr.hr.ec = TALER_EC_EXCHANGE_PURSE_CREATE_EXCHANGE_SIGNATURE_INVALID;
|
||||||
TALER_EC_EXCHANGE_PURSE_CREATE_WITH_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
struct TALER_PurseContractSignatureP purse_sig;
|
struct TALER_PurseContractSignatureP purse_sig;
|
||||||
struct TALER_PurseContractSignatureP econtract_sig;
|
struct TALER_PurseContractSignatureP econtract_sig;
|
||||||
struct TALER_ContractDiffiePublicP contract_pub;
|
struct TALER_ContractDiffiePublicP contract_pub;
|
||||||
char arg_str[sizeof (purse_pub) * 2 + 32];
|
char arg_str[sizeof (pch->purse_pub) * 2 + 32];
|
||||||
char *url;
|
char *url;
|
||||||
uint32_t min_age;
|
uint32_t min_age;
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
pch->exchange = exchange;
|
pch->exchange = exchange;
|
||||||
pch->cb = cb;
|
pch->cb = cb;
|
||||||
pch->cb_cls = cb_cls;
|
pch->cb_cls = cb_cls;
|
||||||
pcc->purse_expiration = purse_expiration;
|
pch->purse_expiration = purse_expiration;
|
||||||
{
|
{
|
||||||
struct GNUNET_JSON_Specification spec[] = {
|
struct GNUNET_JSON_Specification spec[] = {
|
||||||
TALER_JSON_spec_amount_any ("amount",
|
TALER_JSON_spec_amount_any ("amount",
|
||||||
@ -289,20 +289,20 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
TEAH_handle_is_ready (exchange));
|
TEAH_handle_is_ready (exchange));
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_JSON_contract_hash (contract_terms,
|
TALER_JSON_contract_hash (contract_terms,
|
||||||
&pcc->h_contract_terms))
|
&pch->h_contract_terms))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
GNUNET_CRYPTO_eddsa_key_get_public (&purse_priv->eddsa_priv,
|
GNUNET_CRYPTO_eddsa_key_get_public (&purse_priv->eddsa_priv,
|
||||||
&pcc->purse_pub.eddsa_pub);
|
&pch->purse_pub.eddsa_pub);
|
||||||
{
|
{
|
||||||
char pub_str[sizeof (purse_pub) * 2];
|
char pub_str[sizeof (pch->purse_pub) * 2];
|
||||||
char *end;
|
char *end;
|
||||||
|
|
||||||
end = GNUNET_STRINGS_data_to_string (
|
end = GNUNET_STRINGS_data_to_string (
|
||||||
&pcc->purse_pub,
|
&pch->purse_pub,
|
||||||
sizeof (pcc->purse_pub),
|
sizeof (pch->purse_pub),
|
||||||
pub_str,
|
pub_str,
|
||||||
sizeof (pub_str));
|
sizeof (pub_str));
|
||||||
*end = '\0';
|
*end = '\0';
|
||||||
@ -314,7 +314,7 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
GNUNET_CRYPTO_ecdhe_key_get_public (&contract_priv->ecdhe_priv,
|
GNUNET_CRYPTO_ecdhe_key_get_public (&contract_priv->ecdhe_priv,
|
||||||
&contract_pub.ecdhe_pub);
|
&contract_pub.ecdhe_pub);
|
||||||
GNUNET_CRYPTO_eddsa_key_get_public (&merge_priv->eddsa_priv,
|
GNUNET_CRYPTO_eddsa_key_get_public (&merge_priv->eddsa_priv,
|
||||||
&pcc->merge_pub.eddsa_pub);
|
&pch->merge_pub.eddsa_pub);
|
||||||
pch->url = TEAH_path_to_url (exchange,
|
pch->url = TEAH_path_to_url (exchange,
|
||||||
arg_str);
|
arg_str);
|
||||||
if (NULL == pch->url)
|
if (NULL == pch->url)
|
||||||
@ -354,7 +354,7 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
#endif
|
#endif
|
||||||
TALER_wallet_purse_deposit_sign (
|
TALER_wallet_purse_deposit_sign (
|
||||||
url,
|
url,
|
||||||
&pcc->purse_pub,
|
&pch->purse_pub,
|
||||||
&deposit->amount,
|
&deposit->amount,
|
||||||
&deposit->coin_priv,
|
&deposit->coin_priv,
|
||||||
&coin_sig);
|
&coin_sig);
|
||||||
@ -381,10 +381,10 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
}
|
}
|
||||||
GNUNET_free (url);
|
GNUNET_free (url);
|
||||||
TALER_wallet_purse_create_sign (purse_expiration,
|
TALER_wallet_purse_create_sign (purse_expiration,
|
||||||
&pcc->h_contract_terms,
|
&pch->h_contract_terms,
|
||||||
&pcc->merge_pub,
|
&pch->merge_pub,
|
||||||
min_age,
|
min_age,
|
||||||
&pcc->purse_value_after_fees,
|
&pch->purse_value_after_fees,
|
||||||
purse_priv,
|
purse_priv,
|
||||||
&purse_sig);
|
&purse_sig);
|
||||||
{
|
{
|
||||||
@ -393,7 +393,7 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
|
|
||||||
if (upload_contract)
|
if (upload_contract)
|
||||||
{
|
{
|
||||||
TALER_CRYPTO_contract_encrypt_for_merge (&purse_pub,
|
TALER_CRYPTO_contract_encrypt_for_merge (&pch->purse_pub,
|
||||||
contract_priv,
|
contract_priv,
|
||||||
merge_priv,
|
merge_priv,
|
||||||
contract_terms,
|
contract_terms,
|
||||||
@ -407,7 +407,7 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
}
|
}
|
||||||
create_obj = GNUNET_JSON_PACK (
|
create_obj = GNUNET_JSON_PACK (
|
||||||
TALER_JSON_pack_amount ("amount",
|
TALER_JSON_pack_amount ("amount",
|
||||||
&pcc->purse_value_after_fees),
|
&pch->purse_value_after_fees),
|
||||||
GNUNET_JSON_pack_uint64 ("min_age",
|
GNUNET_JSON_pack_uint64 ("min_age",
|
||||||
min_age),
|
min_age),
|
||||||
GNUNET_JSON_pack_allow_null (
|
GNUNET_JSON_pack_allow_null (
|
||||||
@ -429,9 +429,9 @@ TALER_EXCHANGE_purse_create_with_deposit (
|
|||||||
GNUNET_JSON_pack_data_auto ("purse_sig",
|
GNUNET_JSON_pack_data_auto ("purse_sig",
|
||||||
&purse_sig),
|
&purse_sig),
|
||||||
GNUNET_JSON_pack_data_auto ("merge_pub",
|
GNUNET_JSON_pack_data_auto ("merge_pub",
|
||||||
&pcc->merge_pub),
|
&pch->merge_pub),
|
||||||
GNUNET_JSON_pack_data_auto ("h_contract_terms",
|
GNUNET_JSON_pack_data_auto ("h_contract_terms",
|
||||||
&pcc->h_contract_terms),
|
&pch->h_contract_terms),
|
||||||
GNUNET_JSON_pack_timestamp ("purse_expiration",
|
GNUNET_JSON_pack_timestamp ("purse_expiration",
|
||||||
purse_expiration),
|
purse_expiration),
|
||||||
GNUNET_JSON_pack_array_steal ("deposits",
|
GNUNET_JSON_pack_array_steal ("deposits",
|
||||||
|
Loading…
Reference in New Issue
Block a user