diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-14 14:26:00 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-14 14:26:00 +0100 |
commit | afe3f70d336e151598e02ebedb6498e13122530e (patch) | |
tree | 16b28b9fec850465e963dd1eb2acee796d86d9f2 /src/util | |
parent | 437e6ec86a1cd3a391de437999ad21ac5e256e68 (diff) | |
download | exchange-afe3f70d336e151598e02ebedb6498e13122530e.tar.xz |
begin API change to allow AML officers to trigger KYC process
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/aml_signatures.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util/aml_signatures.c b/src/util/aml_signatures.c index cad2e7488..6d90b25c2 100644 --- a/src/util/aml_signatures.c +++ b/src/util/aml_signatures.c @@ -57,6 +57,12 @@ struct TALER_AmlDecisionPS struct TALER_PaytoHashP h_payto GNUNET_PACKED; /** + * Hash over JSON array with KYC requirements that were imposed. All zeros + * for none. + */ + struct GNUNET_HashCode h_kyc_requirements; + + /** * What is the new AML status? */ uint32_t new_state GNUNET_PACKED; @@ -72,6 +78,7 @@ TALER_officer_aml_decision_sign ( const struct TALER_Amount *new_threshold, const struct TALER_PaytoHashP *h_payto, enum TALER_AmlDecisionState new_state, + const json_t *kyc_requirements, const struct TALER_AmlOfficerPrivateKeyP *officer_priv, struct TALER_AmlOfficerSignatureP *officer_sig) { @@ -87,6 +94,9 @@ TALER_officer_aml_decision_sign ( &ad.h_justification); TALER_amount_hton (&ad.new_threshold, new_threshold); + if (NULL != kyc_requirements) + TALER_json_hash (kyc_requirements, + &ad.h_kyc_requirements); GNUNET_CRYPTO_eddsa_sign (&officer_priv->eddsa_priv, &ad, &officer_sig->eddsa_signature); @@ -100,6 +110,7 @@ TALER_officer_aml_decision_verify ( const struct TALER_Amount *new_threshold, const struct TALER_PaytoHashP *h_payto, enum TALER_AmlDecisionState new_state, + const json_t *kyc_requirements, const struct TALER_AmlOfficerPublicKeyP *officer_pub, const struct TALER_AmlOfficerSignatureP *officer_sig) { @@ -115,6 +126,9 @@ TALER_officer_aml_decision_verify ( &ad.h_justification); TALER_amount_hton (&ad.new_threshold, new_threshold); + if (NULL != kyc_requirements) + TALER_json_hash (kyc_requirements, + &ad.h_kyc_requirements); return GNUNET_CRYPTO_eddsa_verify ( TALER_SIGNATURE_AML_DECISION, &ad, |