diff options
| author | Christian Grothoff <grothoff@gnunet.org> | 2022-07-01 07:22:39 +0200 | 
|---|---|---|
| committer | Christian Grothoff <grothoff@gnunet.org> | 2022-07-01 07:22:39 +0200 | 
| commit | 9e3fb2302d72a285067ccc39038481afcab97dc2 (patch) | |
| tree | 709d884502b5c8499772b93b2c8eeade160885f3 | |
| parent | 085e40bc562343221bceb6fc4dc9aba8e32a27e3 (diff) | |
| parent | 21551bb4c3c887fdcfb3d814c8ab4d1a4ec82945 (diff) | |
-gana merge
| m--------- | contrib/gana | 0 | ||||
| -rwxr-xr-x | contrib/gana-update.sh | 11 | ||||
| -rw-r--r-- | src/auditor/revoke-basedb.conf | 5 | ||||
| -rw-r--r-- | src/exchange/taler-exchange-httpd_common_deposit.c | 8 | ||||
| -rw-r--r-- | src/exchange/taler-exchange-httpd_db.c | 6 | ||||
| -rw-r--r-- | src/exchange/taler-exchange-httpd_wire.c | 1 | ||||
| -rw-r--r-- | src/include/taler_testing_lib.h | 26 | 
7 files changed, 41 insertions, 16 deletions
| diff --git a/contrib/gana b/contrib/gana -Subproject 75c838e74c41bf9a6c02cdfe8109a444056bf26 +Subproject cf9e9f70ae04da02be8d11fde5668e2ef72adc5 diff --git a/contrib/gana-update.sh b/contrib/gana-update.sh index 12198027..b20bbaa1 100755 --- a/contrib/gana-update.sh +++ b/contrib/gana-update.sh @@ -17,13 +17,14 @@ ensure ()      # $2 -- src dir under contrib/      # $3 -- dst dir under ./      fn="$1" -    src="contrib/$2" -    dst="./$3" +    src="contrib/$2/$fn" +    dst="./$3/$fn" -    if ! diff $src/$fn $dst/$fn > /dev/null +    if ! diff $src $dst > /dev/null      then -        cp $src/$fn $dst/$fn -        chmod -w $dst/$fn +        test ! -f $dst || chmod +w $dst +        cp $src $dst +        chmod -w $dst      fi  } diff --git a/src/auditor/revoke-basedb.conf b/src/auditor/revoke-basedb.conf index e1c55523..5209cc2c 100644 --- a/src/auditor/revoke-basedb.conf +++ b/src/auditor/revoke-basedb.conf @@ -1,11 +1,8 @@  [auditor] -DB = postgres +PUBLIC_KEY = CK4P6P5VXR82B1A4C3PY5DCHG8HDZA1HSZR76Z8D6FD57MASFT70  TINY_AMOUNT = TESTKUDOS:0.01  BASE_URL = http://localhost:8083/ -# Where do we store the auditor's private key? -AUDITOR_PRIV_FILE = ${TALER_DATA_HOME}/auditor/offline-keys/auditor.priv -  [exchange-account-1]  PAYTO_URI = payto://x-taler-bank/localhost/Exchange  enable_debit = yes diff --git a/src/exchange/taler-exchange-httpd_common_deposit.c b/src/exchange/taler-exchange-httpd_common_deposit.c index 694dfa41..92e2469f 100644 --- a/src/exchange/taler-exchange-httpd_common_deposit.c +++ b/src/exchange/taler-exchange-httpd_common_deposit.c @@ -224,13 +224,13 @@ TEH_common_deposit_check_purse_deposit (      GNUNET_break_op (0);      return TALER_MHD_reply_with_error (connection,                                         MHD_HTTP_BAD_REQUEST, -                                       /* FIXME: other error code? */ -                                       TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH, +                                       TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT,                                         "mismatch of attest and age_commitment");    }    if (coin->cpi.no_age_commitment)      return GNUNET_OK; /* unrestricted coin */ +    /* age attestation must be valid */    if (GNUNET_OK !=        TALER_age_commitment_verify (&coin->age_commitment, @@ -241,7 +241,7 @@ TEH_common_deposit_check_purse_deposit (      return TALER_MHD_reply_with_error (connection,                                         MHD_HTTP_BAD_REQUEST,                                         /* FIXME: other error code? */ -                                       TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH, +                                       TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE,                                         "invalid attest for minimum age");    }    return GNUNET_OK; @@ -259,7 +259,7 @@ TEH_common_purse_deposit_free_coin (struct TEH_PurseDepositedCoin *coin)  {    TALER_denom_sig_free (&coin->cpi.denom_sig);    if (! coin->cpi.no_age_commitment) -    TALER_age_commitment_free (&coin->age_commitment); +    GNUNET_free (coin->age_commitment.keys); /* Only the keys have been allocated */  } diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index f0c55139..6f0fc41c 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -61,7 +61,8 @@ TEH_make_coin_known (const struct TALER_CoinPublicInfo *coin,                                      NULL);      return GNUNET_DB_STATUS_HARD_ERROR;    case TALER_EXCHANGEDB_CKS_DENOM_CONFLICT: -    /* FIXME-Oec: insufficient_funds != denom conflict! */ +    /* FIXME: insufficient_funds != denom conflict! See issue 0007267, need new +     * strategy for evidence gathering */      *mhd_ret = TEH_RESPONSE_reply_coin_insufficient_funds (        connection,        TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_DENOMINATION_KEY, @@ -69,7 +70,8 @@ TEH_make_coin_known (const struct TALER_CoinPublicInfo *coin,        &coin->coin_pub);      return GNUNET_DB_STATUS_HARD_ERROR;    case TALER_EXCHANGEDB_CKS_AGE_CONFLICT: -    /* FIXME-Oec: insufficient_funds != Age conflict! */ +    /* FIXME: insufficient_funds != Age conflict! See issue 0007267, need new +     * strategy for evidence gathering */      *mhd_ret = TEH_RESPONSE_reply_coin_insufficient_funds (        connection,        TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH, diff --git a/src/exchange/taler-exchange-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c index ce8293c9..7e5f0a91 100644 --- a/src/exchange/taler-exchange-httpd_wire.c +++ b/src/exchange/taler-exchange-httpd_wire.c @@ -482,7 +482,6 @@ build_wire_state (void)                                             MHD_HTTP_HEADER_EXPIRES,                                             wsh->dat));    } -  TALER_MHD_add_global_headers (wsh->wire_reply);    /* Set cache control headers: our response varies depending on these headers */    GNUNET_break (MHD_YES ==                  MHD_add_response_header (wsh->wire_reply, diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index f18816d6..6d3762b1 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -1615,6 +1615,32 @@ TALER_TESTING_cmd_deposit_replay (const char *label,  /** + * Create a "batch deposit" command. + * + * @param label command label. + * @param target_account_payto target account for the "deposit" + *        request. + * @param contract_terms contract terms to be signed over by the + *        coin. + * @param refund_deadline refund deadline, zero means 'no refunds'. + * @param amount how much is going to be deposited. + * @param expected_response_code expected HTTP response code. + * @param ... NULL-terminated list with an even number of + *            strings that alternate referring to coins + *            (possibly with index using label#index notation) + *            and the amount of that coin to deposit + * @return the command. + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_batch_deposit (const char *label, +                                 const char *target_account_payto, +                                 const char *contract_terms, +                                 struct GNUNET_TIME_Relative refund_deadline, +                                 unsigned int expected_response_code, +                                 ...); + + +/**   * Create a "refresh melt" command.   *   * @param label command label. | 
