From 32fac55f7ea4d29a459310851cfc955204d3f79f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 27 Jan 2023 14:43:25 +0100 Subject: update GET attest logic now that it is clear that we must store KYC attributes locally: --- src/exchange/taler-exchange-httpd.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/exchange/taler-exchange-httpd.c') diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 5501687fa..7f49955dc 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -132,6 +132,11 @@ struct GNUNET_TIME_Relative TEH_reserve_closing_delay; */ struct TALER_MasterPublicKeyP TEH_master_public_key; +/** + * Key used to encrypt KYC attribute data in our database. + */ +struct TALER_AttributeEncryptionKeyP TEH_attribute_key; + /** * Our DB plugin. (global) */ @@ -1862,6 +1867,26 @@ exchange_serve_process_config (void) } GNUNET_free (master_public_key_str); } + + { + char *attr_enc_key_str; + + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (TEH_cfg, + "exchange", + "ATTRIBUTE_ENCRYPTION_KEY", + &attr_enc_key_str)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "ATTRIBUTE_ENCRYPTION_KEY"); + return GNUNET_SYSERR; + } + GNUNET_CRYPTO_hash (attr_enc_key_str, + strlen (attr_enc_key_str), + &TEH_attribute_key.hash); + GNUNET_free (attr_enc_key_str); + } GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Launching exchange with public key `%s'...\n", GNUNET_p2s (&TEH_master_public_key.eddsa_pub)); -- cgit v1.2.3