diff options
| -rw-r--r-- | src/exchange/taler-exchange-httpd_keys.c | 6 | ||||
| -rw-r--r-- | src/exchange/taler-exchange-httpd_purses_create.c | 3 | ||||
| -rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 5 | ||||
| -rw-r--r-- | src/lib/exchange_api_purse_create_with_deposit.c | 10 | ||||
| -rw-r--r-- | src/util/wallet_signatures.c | 2 | 
5 files changed, 22 insertions, 4 deletions
| diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c index e0ca24a6..7aff0903 100644 --- a/src/exchange/taler-exchange-httpd_keys.c +++ b/src/exchange/taler-exchange-httpd_keys.c @@ -2257,6 +2257,9 @@ global_fee_info_cb (    struct TEH_KeyStateHandle *ksh = cls;    struct TEH_GlobalFee *gf; +  GNUNET_log (GNUNET_ERROR_TYPE_INFO, +              "Found global fees with %u purses\n", +              purse_account_limit);    gf = GNUNET_new (struct TEH_GlobalFee);    gf->start_date = start_date;    gf->end_date = end_date; @@ -2343,6 +2346,9 @@ build_key_state (struct HelperState *hs,    qs = TEH_plugin->get_global_fees (TEH_plugin->cls,                                      &global_fee_info_cb,                                      ksh); +  GNUNET_log (GNUNET_ERROR_TYPE_INFO, +              "Loading global fees from DB: %d\n", +              qs);    if (qs < 0)    {      GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs); diff --git a/src/exchange/taler-exchange-httpd_purses_create.c b/src/exchange/taler-exchange-httpd_purses_create.c index f4f00bb2..ef118953 100644 --- a/src/exchange/taler-exchange-httpd_purses_create.c +++ b/src/exchange/taler-exchange-httpd_purses_create.c @@ -496,7 +496,8 @@ parse_coin (struct MHD_Connection *connection,                                           &coin->cpi.coin_pub,                                           &coin->coin_sig))    { -    TALER_LOG_WARNING ("Invalid signature on /purses/$PID/create request\n"); +    TALER_LOG_WARNING ( +      "Invalid coin signature on /purses/$PID/create request\n");      GNUNET_JSON_parse_free (spec);      return (MHD_YES ==              TALER_MHD_reply_with_error (connection, diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index ff2dcbf4..93d71e59 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -8535,7 +8535,10 @@ postgres_get_global_fees (void *cls,  {    struct PostgresClosure *pg = cls;    struct GNUNET_TIME_Timestamp date -    = GNUNET_TIME_timestamp_get (); +    = GNUNET_TIME_absolute_to_timestamp ( +        GNUNET_TIME_absolute_subtract ( +          GNUNET_TIME_absolute_get (), +          GNUNET_TIME_UNIT_YEARS));    struct GNUNET_PQ_QueryParam params[] = {      GNUNET_PQ_query_param_timestamp (&date),      GNUNET_PQ_query_param_end diff --git a/src/lib/exchange_api_purse_create_with_deposit.c b/src/lib/exchange_api_purse_create_with_deposit.c index 48b9aad7..f6f8c2d8 100644 --- a/src/lib/exchange_api_purse_create_with_deposit.c +++ b/src/lib/exchange_api_purse_create_with_deposit.c @@ -329,11 +329,15 @@ TALER_EXCHANGE_purse_create_with_deposit (    GNUNET_assert (NULL != deposit_arr);    url = TEAH_path_to_url (exchange,                            "/"); +  GNUNET_log (GNUNET_ERROR_TYPE_INFO, +              "Signing with URL `%s'\n", +              url);    for (unsigned int i = 0; i<num_deposits; i++)    {      const struct TALER_EXCHANGE_PurseDeposit *deposit = &deposits[i];      json_t *jdeposit;      struct TALER_CoinSpendSignatureP coin_sig; +    struct TALER_CoinSpendPublicKeyP coin_pub;  #if FIXME_OEC      struct TALER_AgeCommitmentHash agh;      struct TALER_AgeCommitmentHash *aghp = NULL; @@ -354,6 +358,8 @@ TALER_EXCHANGE_purse_create_with_deposit (        return NULL;      }  #endif +    GNUNET_CRYPTO_eddsa_key_get_public (&deposit->coin_priv.eddsa_priv, +                                        &coin_pub.eddsa_pub);      TALER_wallet_purse_deposit_sign (        url,        &pch->purse_pub, @@ -376,7 +382,9 @@ TALER_EXCHANGE_purse_create_with_deposit (        TALER_JSON_pack_denom_sig ("ub_sig",                                   &deposit->denom_sig),        GNUNET_JSON_pack_data_auto ("coin_sig", -                                  &coin_sig)); +                                  &coin_sig), +      GNUNET_JSON_pack_data_auto ("coin_pub", +                                  &coin_pub));      GNUNET_assert (0 ==                     json_array_append_new (deposit_arr,                                            jdeposit)); diff --git a/src/util/wallet_signatures.c b/src/util/wallet_signatures.c index 5b98f46e..f0ff2dc8 100644 --- a/src/util/wallet_signatures.c +++ b/src/util/wallet_signatures.c @@ -1251,7 +1251,7 @@ TALER_wallet_econtract_upload_verify (    GNUNET_CRYPTO_hash (econtract,                        econtract_size,                        &pc.h_econtract); -  return GNUNET_CRYPTO_eddsa_verify_ (TALER_SIGNATURE_WALLET_RESERVE_CLOSE, +  return GNUNET_CRYPTO_eddsa_verify_ (TALER_SIGNATURE_WALLET_PURSE_ECONTRACT,                                        &pc.purpose,                                        &purse_sig->eddsa_signature,                                        &purse_pub->eddsa_pub); | 
