commit 736fafe3f5195eeb8184e7a7289e30e2a2d6583f
parent 04241527782b71c669c349f64b8bb6a6fe6c7010
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 7 May 2025 20:42:33 +0200
one more case of merchant_sig not being set in tests
Diffstat:
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/exchangedb/pg_do_deposit.c b/src/exchangedb/pg_do_deposit.c
@@ -47,9 +47,7 @@ TEH_PG_do_deposit (
/* data for batch_deposits */
GNUNET_PQ_query_param_uint64 (&deposit_shard),
GNUNET_PQ_query_param_auto_from_type (&bd->merchant_pub),
- GNUNET_is_zero (&bd->merchant_sig)
- ? GNUNET_PQ_query_param_null ()
- : GNUNET_PQ_query_param_auto_from_type (&bd->merchant_sig),
+ GNUNET_PQ_query_param_auto_from_type (&bd->merchant_sig),
GNUNET_PQ_query_param_timestamp (&bd->wallet_timestamp),
GNUNET_PQ_query_param_timestamp (exchange_timestamp),
GNUNET_PQ_query_param_timestamp (&bd->refund_deadline),
diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c
@@ -199,6 +199,16 @@ insert_deposit_run (void *cls,
strlen (ids->merchant_name),
NULL,
0));
+ GNUNET_assert (
+ GNUNET_YES ==
+ GNUNET_CRYPTO_kdf (&bd.merchant_sig,
+ sizeof (struct TALER_MerchantSignatureP),
+ "merchant-sig",
+ strlen ("merchant-sig"),
+ ids->merchant_name,
+ strlen (ids->merchant_name),
+ NULL,
+ 0));
GNUNET_CRYPTO_eddsa_key_get_public (&merchant_priv.eddsa_priv,
&bd.merchant_pub.eddsa_pub);
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK,