[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated (a316e20ba -> 275b6d032)
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated (a316e20ba -> 275b6d032) |
Date: |
Tue, 10 Dec 2024 19:27:22 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository exchange.
from a316e20ba -better logging
new 53fe1523d more convenience functions
new 275b6d032 fix AM_TESTS_ENVIRONMENT to use latest variable names
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/auditor/Makefile.am | 2 ++
src/auditordb/Makefile.am | 3 ++-
src/bank-lib/Makefile.am | 2 ++
src/exchangedb/Makefile.am | 2 +-
src/include/taler_json_lib.h | 16 +++++++++++++++-
src/json/json_helper.c | 8 +++++---
src/json/json_pack.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
src/testing/Makefile.am | 2 +-
8 files changed, 70 insertions(+), 9 deletions(-)
diff --git a/src/auditor/Makefile.am b/src/auditor/Makefile.am
index 7c7c2f130..7cfb06e9b 100644
--- a/src/auditor/Makefile.am
+++ b/src/auditor/Makefile.am
@@ -262,6 +262,8 @@ check_SCRIPTS = \
test-revocation.sh \
test-sync.sh
+AM_TESTS_ENVIRONMENT=export
TALER_EXCHANGE_PREFIX=$${TALER_EXCHANGE_PREFIX:-@libdir@};export
PATH=$${TALER_EXCHANGE_PREFIX:-@prefix@}/bin:$$PATH;export
TALER_AUDITOR_PREFIX=$${TALER_AUDITOR_PREFIX:-@libdir@};
+
TESTS = \
test-revocation.sh \
test-sync.sh \
diff --git a/src/auditordb/Makefile.am b/src/auditordb/Makefile.am
index 9910f73c3..ae78ed847 100644
--- a/src/auditordb/Makefile.am
+++ b/src/auditordb/Makefile.am
@@ -176,7 +176,8 @@ check_PROGRAMS = \
test_auditordb_checkpoints-postgres \
test_auditordb-postgres
-AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export
PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
+AM_TESTS_ENVIRONMENT=export
TALER_EXCHANGE_PREFIX=$${TALER_EXCHANGE_PREFIX:-@libdir@};export
PATH=$${TALER_EXCHANGE_PREFIX:-@prefix@}/bin:$$PATH;export
TALER_AUDITOR_PREFIX=$${TALER_AUDITOR_PREFIX:-@libdir@};
+
TESTS = \
test_auditordb_checkpoints-postgres \
test_auditordb-postgres
diff --git a/src/bank-lib/Makefile.am b/src/bank-lib/Makefile.am
index 9c86410b5..355852239 100644
--- a/src/bank-lib/Makefile.am
+++ b/src/bank-lib/Makefile.am
@@ -106,6 +106,8 @@ libtalerfakebank_la_LIBADD = \
check_SCRIPTS = \
test_bank.sh
+AM_TESTS_ENVIRONMENT=export
TALER_EXCHANGE_PREFIX=$${TALER_EXCHANGE_PREFIX:-@libdir@};export
PATH=$${TALER_EXCHANGE_PREFIX:-@prefix@}/bin:$$PATH;export
TALER_AUDITOR_PREFIX=$${TALER_AUDITOR_PREFIX:-@libdir@};export
TALER_BANK_PREFIX=$${TALER_BANK_PREFIX:-@libdir@};
+
TESTS = \
$(check_SCRIPTS)
diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am
index 2755c7e70..ab78ae576 100644
--- a/src/exchangedb/Makefile.am
+++ b/src/exchangedb/Makefile.am
@@ -373,7 +373,7 @@ noinst_PROGRAMS = \
perf_reserves_in_insert-postgres \
perf_deposits_get_ready-postgres
-AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export
PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
+AM_TESTS_ENVIRONMENT=export
TALER_EXCHANGE_PREFIX=$${TALER_EXCHANGE_PREFIX:-@libdir@};export
PATH=$${TALER_EXCHANGE_PREFIX:-@prefix@}/bin:$$PATH;
TESTS = \
$(check_SCRIPTS) \
$(check_PROGRAMS)
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index 8c06e7122..f66773573 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -141,6 +141,19 @@ TALER_JSON_pack_token_issue_sig (
const struct TALER_TokenIssueSignature *sig);
+/**
+ * Generate packer instruction for a JSON field of type
+ * token family public key.
+ *
+ * @param name name of the field to add to the object
+ * @param pk public key
+ * @return json pack specification
+ */
+struct GNUNET_JSON_PackSpec
+TALER_JSON_pack_token_pub (
+ const char *name,
+ const struct TALER_TokenIssuePublicKey *pk);
+
/**
* Generate packer instruction for a JSON field of type token envelope.
*
@@ -451,7 +464,8 @@ TALER_JSON_spec_denom_pub (const char *field,
* @return corresponding field spec
*/
struct GNUNET_JSON_Specification
-TALER_JSON_spec_token_pub (struct TALER_TokenIssuePublicKey *pk);
+TALER_JSON_spec_token_pub (const char *field,
+ struct TALER_TokenIssuePublicKey *pk);
/**
diff --git a/src/json/json_helper.c b/src/json/json_helper.c
index 6a6e8c908..ff1b3c345 100644
--- a/src/json/json_helper.c
+++ b/src/json/json_helper.c
@@ -616,7 +616,7 @@ parse_denom_pub (void *cls,
{
struct GNUNET_JSON_Specification ispec[] = {
GNUNET_JSON_spec_rsa_public_key (
- "rsa_public_key",
+ "rsa_pub",
&bsign_pub->details.rsa_public_key),
GNUNET_JSON_spec_end ()
};
@@ -637,7 +637,7 @@ parse_denom_pub (void *cls,
case GNUNET_CRYPTO_BSA_CS:
{
struct GNUNET_JSON_Specification ispec[] = {
- GNUNET_JSON_spec_fixed ("cs_public_key",
+ GNUNET_JSON_spec_fixed ("cs_pub",
&bsign_pub->details.cs_public_key,
sizeof (bsign_pub->details.cs_public_key)),
GNUNET_JSON_spec_end ()
@@ -807,9 +807,11 @@ clean_token_pub (void *cls,
struct GNUNET_JSON_Specification
-TALER_JSON_spec_token_pub (struct TALER_TokenIssuePublicKey *pk)
+TALER_JSON_spec_token_pub (const char *field,
+ struct TALER_TokenIssuePublicKey *pk)
{
struct GNUNET_JSON_Specification ret = {
+ .field = field,
.parser = &parse_token_pub,
.cleaner = &clean_token_pub,
.ptr = pk
diff --git a/src/json/json_pack.c b/src/json/json_pack.c
index 90fa300f5..84267cfaf 100644
--- a/src/json/json_pack.c
+++ b/src/json/json_pack.c
@@ -161,7 +161,7 @@ TALER_JSON_pack_denom_pub (
"RSA"),
GNUNET_JSON_pack_uint64 ("age_mask",
pk->age_mask.bits),
- GNUNET_JSON_pack_rsa_public_key ("rsa_public_key",
+ GNUNET_JSON_pack_rsa_public_key ("rsa_pub",
bsp->details.rsa_public_key));
return ps;
case GNUNET_CRYPTO_BSA_CS:
@@ -171,7 +171,47 @@ TALER_JSON_pack_denom_pub (
"CS"),
GNUNET_JSON_pack_uint64 ("age_mask",
pk->age_mask.bits),
- GNUNET_JSON_pack_data_varsize ("cs_public_key",
+ GNUNET_JSON_pack_data_varsize ("cs_pub",
+ &bsp->details.cs_public_key,
+ sizeof (bsp->details.cs_public_key)));
+ return ps;
+ }
+ GNUNET_assert (0);
+ return ps;
+}
+
+
+struct GNUNET_JSON_PackSpec
+TALER_JSON_pack_token_pub (
+ const char *name,
+ const struct TALER_TokenIssuePublicKey *pk)
+{
+ const struct GNUNET_CRYPTO_BlindSignPublicKey *bsp;
+ struct GNUNET_JSON_PackSpec ps = {
+ .field_name = name,
+ };
+
+ if (NULL == pk)
+ return ps;
+ bsp = pk->public_key;
+ switch (bsp->cipher)
+ {
+ case GNUNET_CRYPTO_BSA_INVALID:
+ break;
+ case GNUNET_CRYPTO_BSA_RSA:
+ ps.object
+ = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("cipher",
+ "RSA"),
+ GNUNET_JSON_pack_rsa_public_key ("rsa_pub",
+ bsp->details.rsa_public_key));
+ return ps;
+ case GNUNET_CRYPTO_BSA_CS:
+ ps.object
+ = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("cipher",
+ "CS"),
+ GNUNET_JSON_pack_data_varsize ("cs_pub",
&bsp->details.cs_public_key,
sizeof (bsp->details.cs_public_key)));
return ps;
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index c9a5e6a7d..497bac327 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -145,7 +145,7 @@ libtalertesting_la_LIBADD = \
# Test cases
-AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export
PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
+AM_TESTS_ENVIRONMENT=export
TALER_EXCHANGE_PREFIX=$${TALER_EXCHANGE_PREFIX:-@libdir@};export
PATH=$${TALER_EXCHANGE_PREFIX:-@prefix@}/bin:$$PATH;export
TALER_AUDITOR_PREFIX=$${TALER_AUDITOR_PREFIX:-@libdir@};
check_PROGRAMS = \
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] branch master updated (a316e20ba -> 275b6d032),
gnunet <=