exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit fb153cb474a6d87d44f83603efafd7a0c73332ae
parent b88d3fff420704ca39141ff1f836f5ffde0b1b8a
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 29 Dec 2024 09:44:14 +0100

load environment via systemd

Diffstat:
Mdebian/taler-exchange.taler-exchange-httpd.service | 2++
Msrc/exchange/taler-exchange-httpd_keys.c | 10+++++-----
Msrc/kyclogic/taler-exchange-helper-measure-enable-deposits | 3---
Msrc/kyclogic/taler-exchange-helper-measure-tops-postal-check | 3---
Msrc/kyclogic/taler-exchange-helper-measure-tops-sms-check | 3---
Msrc/util/crypto_helper_cs.c | 4++--
Msrc/util/crypto_helper_rsa.c | 4++--
7 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/debian/taler-exchange.taler-exchange-httpd.service b/debian/taler-exchange.taler-exchange-httpd.service @@ -9,6 +9,8 @@ PartOf=taler-exchange.target User=taler-exchange-httpd Type=simple +EnvironmentFile=/etc/taler-exchange/taler-exchange.env + # Depending on the configuration, the service process kills itself and then # needs to be restarted. Thus no significant delay on restarts. Restart=always diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c @@ -848,7 +848,7 @@ build_wire_state (void) return wsh; } GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Build wire data with %u accounts\n", + "Built wire data with %u accounts\n", (unsigned int) json_array_size (wire_accounts_array)); wire_fee_object = json_object (); GNUNET_assert (NULL != wire_fee_object); @@ -1430,7 +1430,7 @@ helper_rsa_cb ( struct HelperState *hs = cls; struct HelperDenomination *hd; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "RSA helper announces key %s for denomination type %s with validity %s\n", GNUNET_h2s (&h_rsa->hash), section_name, @@ -1510,7 +1510,7 @@ helper_cs_cb ( struct HelperState *hs = cls; struct HelperDenomination *hd; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "CS helper announces key %s for denomination type %s with validity %s\n", GNUNET_h2s (&h_cs->hash), section_name, @@ -1586,7 +1586,7 @@ helper_esign_cb ( struct HelperSignkey *hsk; struct GNUNET_PeerIdentity pid; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "EdDSA helper announces signing key %s with validity %s\n", TALER_B2S (exchange_pub), GNUNET_STRINGS_relative_time_to_string (validity_duration, @@ -2363,7 +2363,7 @@ create_krd (struct TEH_KeyStateHandle *ksh, GNUNET_assert (NULL != grouped_denominations); GNUNET_assert (NULL != ksh->auditors); GNUNET_assert (NULL != TEH_currency); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Creating /keys at cherry pick date %s\n", GNUNET_TIME_timestamp2s (last_cherry_pick_date)); diff --git a/src/kyclogic/taler-exchange-helper-measure-enable-deposits b/src/kyclogic/taler-exchange-helper-measure-enable-deposits @@ -99,9 +99,6 @@ CURRENT_RULES=$(echo "$INPUTS" | jq '.current_rules // null') EXPIRATION_TIME=$(echo "$INPUTS" | jq '.context.expiration_time // .current_rules.expiration_time // null') SUCCESSOR_MEASURE=$(echo "$INPUTS" | jq '.context.successor_measure // .current_rules.successor_measure // null') -# FIXME: maybe do this via systemd once instead of in every script run? -. /etc/taler-exchange/taler-exchange.env - # Validate accepted ToS version if $(echo "$TOS_ACCEPTED" | grep "${EXCHANGE_TERMS_ETAG}" > /dev/null) then diff --git a/src/kyclogic/taler-exchange-helper-measure-tops-postal-check b/src/kyclogic/taler-exchange-helper-measure-tops-postal-check @@ -102,9 +102,6 @@ EXPIRATION_TIME=$(echo "$INPUTS" | jq '.context.expiration_time // .current_rule SUCCESSOR_MEASURE=$(echo "$INPUTS" | jq '.context.successor_measure // .current_rules.successor_measure // null') CUSTOM_MEASURES=$(echo "$INPUTS" | jq '.context.custom_measures // null') -# FIXME: maybe do this via systemd once instead of in every script run? -. /etc/taler-exchange/taler-exchange.env - # FIXME: should we check that BUSINESS_NAME *or* FULL_NAME are provided? # Validate country diff --git a/src/kyclogic/taler-exchange-helper-measure-tops-sms-check b/src/kyclogic/taler-exchange-helper-measure-tops-sms-check @@ -100,9 +100,6 @@ EXPIRATION_TIME=$(echo "$INPUTS" | jq '.context.expiration_time // .current_rule SUCCESSOR_MEASURE=$(echo "$INPUTS" | jq '.context.successor_measure // .current_rules.successor_measure // null') CUSTOM_MEASURES=$(echo "$INPUTS" | jq '.context.custom_measures // null') -# FIXME: maybe do this via systemd once instead of in every script run? -. /etc/taler-exchange/taler-exchange.env - # Validate phone number if $(echo "$PHONE_NUMBER" | grep -E -e ${EXCHANGE_AML_PROGRAM_TOPS_SMS_CHECK_REGEX} > /dev/null) then diff --git a/src/util/crypto_helper_cs.c b/src/util/crypto_helper_cs.c @@ -221,7 +221,7 @@ handle_mt_avail (struct TALER_CRYPTO_CsDenominationHelper *dh, sizeof (bsign_pub->details.cs_public_key), &bsign_pub->pub_key_hash); h_cs.hash = bsign_pub->pub_key_hash; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CS key %s (%s)\n", GNUNET_h2s (&h_cs.hash), section_name); @@ -342,7 +342,7 @@ more: msize = ntohs (hdr->size); if (off < msize) continue; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received message of type %u and length %u\n", (unsigned int) ntohs (hdr->type), (unsigned int) msize); diff --git a/src/util/crypto_helper_rsa.c b/src/util/crypto_helper_rsa.c @@ -230,7 +230,7 @@ handle_mt_avail (struct TALER_CRYPTO_RsaDenominationHelper *dh, GNUNET_CRYPTO_rsa_public_key_hash (bs_pub->details.rsa_public_key, &bs_pub->pub_key_hash); h_rsa.hash = bs_pub->pub_key_hash; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received RSA key %s (%s)\n", GNUNET_h2s (&bs_pub->pub_key_hash), section_name); @@ -351,7 +351,7 @@ more: msize = ntohs (hdr->size); if (off < msize) continue; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received message of type %u and length %u\n", (unsigned int) ntohs (hdr->type), (unsigned int) msize);