diff options
| author | Christian Grothoff <christian@grothoff.org> | 2019-07-27 20:43:52 +0200 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2019-07-27 20:43:52 +0200 | 
| commit | ccfe99a82d700198b4d5e97a0aad64f8b13d7345 (patch) | |
| tree | cbc6a7254ce282102c4d6b197f747cf364681117 /src/exchangedb | |
| parent | 1057333666ad3aa17568255f0b7ffa1a2d9bcf40 (diff) | |
more denom sig checking in auditor
Diffstat (limited to 'src/exchangedb')
| -rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 28 | ||||
| -rw-r--r-- | src/exchangedb/test_exchangedb.c | 2 | 
2 files changed, 18 insertions, 12 deletions
| diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index d8b019ba..c89e4472 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -1307,6 +1307,7 @@ postgres_prepare (PGconn *db_conn)                              ",denom.fee_deposit_val"                              ",denom.fee_deposit_frac"                              ",denom.fee_deposit_curr" +                            ",denom.denom_pub"                              " FROM aggregation_tracking"                              "    JOIN deposits"                              "      USING (deposit_serial_id)" @@ -4957,12 +4958,14 @@ handle_wt_result (void *cls,      struct GNUNET_TIME_Absolute exec_time;      struct TALER_Amount amount_with_fee;      struct TALER_Amount deposit_fee; +    struct TALER_DenominationPublicKey denom_pub;      json_t *wire;      struct GNUNET_PQ_ResultSpec rs[] = {        GNUNET_PQ_result_spec_uint64 ("aggregation_serial_id", &rowid),        GNUNET_PQ_result_spec_auto_from_type ("h_contract_terms", &h_contract_terms),        TALER_PQ_result_spec_json ("wire", &wire),        GNUNET_PQ_result_spec_auto_from_type ("h_wire", &h_wire), +      GNUNET_PQ_result_spec_rsa_public_key ("denom_pub", &denom_pub.rsa_public_key),        GNUNET_PQ_result_spec_auto_from_type ("coin_pub", &coin_pub),        GNUNET_PQ_result_spec_auto_from_type ("merchant_pub", &merchant_pub),        TALER_PQ_result_spec_absolute_time ("execution_date", &exec_time), @@ -4981,15 +4984,16 @@ handle_wt_result (void *cls,        return;      }      ctx->cb (ctx->cb_cls, -	     rowid, -	     &merchant_pub, -	     &h_wire, +             rowid, +             &merchant_pub, +             &h_wire,               wire, -	     exec_time, -	     &h_contract_terms, -	     &coin_pub, -	     &amount_with_fee, -	     &deposit_fee); +             exec_time, +             &h_contract_terms, +             &denom_pub, +             &coin_pub, +             &amount_with_fee, +             &deposit_fee);      GNUNET_PQ_cleanup_result (rs);    }  } @@ -5025,10 +5029,10 @@ postgres_lookup_wire_transfer (void *cls,    ctx.status = GNUNET_OK;    /* check if the melt record exists and get it */    qs = GNUNET_PQ_eval_prepared_multi_select (session->conn, -					     "lookup_transactions", -					     params, -					     &handle_wt_result, -					     &ctx); +                                             "lookup_transactions", +                                             params, +                                             &handle_wt_result, +                                             &ctx);    if (GNUNET_OK != ctx.status)      return GNUNET_DB_STATUS_HARD_ERROR;    return qs; diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index cab05f08..ef477548 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -749,6 +749,7 @@ cb_wt_never (void *cls,               const json_t *wire,               struct GNUNET_TIME_Absolute exec_time,               const struct GNUNET_HashCode *h_contract_terms, +             const struct TALER_DenominationPublicKey *denom_pub,               const struct TALER_CoinSpendPublicKeyP *coin_pub,               const struct TALER_Amount *coin_value,               const struct TALER_Amount *coin_fee) @@ -793,6 +794,7 @@ cb_wt_check (void *cls,               const json_t *wire,               struct GNUNET_TIME_Absolute exec_time,               const struct GNUNET_HashCode *h_contract_terms, +             const struct TALER_DenominationPublicKey *denom_pub,               const struct TALER_CoinSpendPublicKeyP *coin_pub,               const struct TALER_Amount *coin_value,               const struct TALER_Amount *coin_fee) | 
