donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit da49bcc1c33ab09ad9f1a756b886a83c1ce147e1
parent a6f2a29acd0e90bdb368a0773eb63b4c41d4e789
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date:   Wed, 13 Mar 2024 15:31:11 +0100

working on keys path

Diffstat:
Msrc/donau/donau-httpd_config.h | 2+-
Msrc/donau/donau-httpd_keys.c | 45+++++++++++++++++++++++----------------------
2 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/src/donau/donau-httpd_config.h b/src/donau/donau-httpd_config.h @@ -41,7 +41,7 @@ * * Returned via both /config and /keys endpoints. */ -#define DONAU_PROTOCOL_VERSION "17:0:0" +#define DONAU_PROTOCOL_VERSION "0:0:0" /** diff --git a/src/donau/donau-httpd_keys.c b/src/donau/donau-httpd_keys.c @@ -627,12 +627,12 @@ insert_donation_unit_cb (void *cls, GNUNET_JSON_PACK ( GNUNET_JSON_pack_data_auto ("donation_unit_pub", &hd->donation_unit_pub), - GNUNET_JSON_pack_uint64 ("validity_year", - du->validity_year), + // GNUNET_JSON_pack_uint64 ("validity_year", + // du->validity_year), // TALER_JSON_pack_amount ("value", // &du->value), - GNUNET_JSON_pack_data_auto ("donation_unit_secmod_sig", - &hd->sm_sig), + // GNUNET_JSON_pack_data_auto ("donation_unit_secmod_sig", + // &hd->sm_sig), GNUNET_JSON_pack_string ("section_name", hd->section_name) ))); @@ -664,8 +664,8 @@ create_krd (struct DH_KeyStateHandle *ksh, json_t *keys; - GNUNET_assert (! GNUNET_TIME_absolute_is_zero ( - last_cherry_pick_date.abs_time)); + // GNUNET_assert (! GNUNET_TIME_absolute_is_zero ( + // last_cherry_pick_date.abs_time)); GNUNET_assert (NULL != signkeys); GNUNET_assert (NULL != grouped_donation_units); GNUNET_assert (NULL != DH_currency); @@ -695,16 +695,16 @@ create_krd (struct DH_KeyStateHandle *ksh, // } // } - { - const struct SigningKey *sk; - - sk = GNUNET_CONTAINER_multipeermap_get (ksh->signkey_map, - (const struct GNUNET_PeerIdentity *) - &donau_pub); - - ksh->signature_expires = GNUNET_TIME_timestamp_min (sk->meta.expire_sign, - ksh->signature_expires); - } + // { + // const struct SigningKey *sk; +// +// sk = GNUNET_CONTAINER_multipeermap_get (ksh->signkey_map, +// (const struct GNUNET_PeerIdentity *) +// &donau_pub); +// +// ksh->signature_expires = GNUNET_TIME_timestamp_min (sk->meta.expire_sign, +// ksh->signature_expires); +// } keys = GNUNET_JSON_PACK ( GNUNET_JSON_pack_string ("version", @@ -713,8 +713,8 @@ create_krd (struct DH_KeyStateHandle *ksh, DH_base_url), GNUNET_JSON_pack_string ("currency", DH_currency), - GNUNET_JSON_pack_array_incref ("signkeys", - signkeys), + // GNUNET_JSON_pack_array_incref ("signkeys", + // signkeys), GNUNET_JSON_pack_array_incref ("donation_units", grouped_donation_units), GNUNET_JSON_pack_data_auto ("donau_pub", @@ -941,7 +941,7 @@ finish_keys_response (struct DH_KeyStateHandle *ksh) } } - // last_cherry_pick_date = dk->meta.start; + // last_cherry_pick_date = dk->meta.validity_year; /* * Group the donation_units by {cipher, value, fees, age_mask}. @@ -1941,6 +1941,7 @@ add_signkey_cb (void *cls, struct KeysBuilderContext *kbc = cls; struct HelperSignkey *hsk = value; struct SigningKey *sk; + // struct GNUNET_TIME_Timestamp stamp_expire; // struct GNUNET_TIME_Timestamp legal_end; @@ -1958,11 +1959,11 @@ add_signkey_cb (void *cls, GNUNET_assert ( 0 == json_array_append_new (kbc->signkeys, GNUNET_JSON_PACK ( GNUNET_JSON_pack_data_auto ("key", - &hsk->donau_pub), + &hsk->donau_pub) // , // GNUNET_JSON_pack_timestamp ("stamp_end", // legal_end), - GNUNET_JSON_pack_data_auto ("year", - &hsk->year) // , + // GNUNET_JSON_pack_data_auto ("year", + // &hsk->year) // , // GNUNET_JSON_pack_data_auto ("signkey_secmod_sig", // &hsk->sm_sig) )));