diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-11-06 22:29:51 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-11-06 22:29:51 +0100 |
commit | f8e9241a3d4adb3e31e8691782136aaed88b41da (patch) | |
tree | 0c7e34c8b6db55e42294e843e3f9363d4d754b98 /src/util/exchange_signatures.c | |
parent | 6d59c19f363d0eb7a0ba94646914624df56bd14a (diff) | |
download | exchange-f8e9241a3d4adb3e31e8691782136aaed88b41da.tar.xz |
fix #7427
Diffstat (limited to 'src/util/exchange_signatures.c')
-rw-r--r-- | src/util/exchange_signatures.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/util/exchange_signatures.c b/src/util/exchange_signatures.c index 1762d5a50..c2a841839 100644 --- a/src/util/exchange_signatures.c +++ b/src/util/exchange_signatures.c @@ -449,18 +449,20 @@ struct TALER_ExchangeAccountSetupSuccessPS struct GNUNET_CRYPTO_EccSignaturePurpose purpose; /** - * Hash over the payto for which the signature was - * made. + * Hash over the payto for which the signature was made. */ struct TALER_PaytoHashP h_payto; - /* FIXME: include details on *which* KYC process was satisfied! #7427 */ + /** + * Hash over details on *which* KYC obligations were discharged! + */ + struct GNUNET_HashCode h_kyc; /** * When was the signature made. - * FIXME: replace by *expiration* time! #7427 */ struct GNUNET_TIME_TimestampNBO timestamp; + }; GNUNET_NETWORK_STRUCT_END @@ -470,6 +472,7 @@ enum TALER_ErrorCode TALER_exchange_online_account_setup_success_sign ( TALER_ExchangeSignCallback scb, const struct TALER_PaytoHashP *h_payto, + const json_t *kyc, struct GNUNET_TIME_Timestamp timestamp, struct TALER_ExchangePublicKeyP *pub, struct TALER_ExchangeSignatureP *sig) @@ -479,10 +482,11 @@ TALER_exchange_online_account_setup_success_sign ( .purpose.purpose = htonl ( TALER_SIGNATURE_EXCHANGE_ACCOUNT_SETUP_SUCCESS), .h_payto = *h_payto, - .timestamp = GNUNET_TIME_timestamp_hton ( - timestamp) + .timestamp = GNUNET_TIME_timestamp_hton (timestamp) }; + TALER_json_hash (kyc, + &kyc_purpose.h_kyc); return scb (&kyc_purpose.purpose, pub, sig); @@ -492,6 +496,7 @@ TALER_exchange_online_account_setup_success_sign ( enum GNUNET_GenericReturnValue TALER_exchange_online_account_setup_success_verify ( const struct TALER_PaytoHashP *h_payto, + const json_t *kyc, struct GNUNET_TIME_Timestamp timestamp, const struct TALER_ExchangePublicKeyP *pub, const struct TALER_ExchangeSignatureP *sig) @@ -501,10 +506,11 @@ TALER_exchange_online_account_setup_success_verify ( .purpose.purpose = htonl ( TALER_SIGNATURE_EXCHANGE_ACCOUNT_SETUP_SUCCESS), .h_payto = *h_payto, - .timestamp = GNUNET_TIME_timestamp_hton ( - timestamp) + .timestamp = GNUNET_TIME_timestamp_hton (timestamp) }; + TALER_json_hash (kyc, + &kyc_purpose.h_kyc); return GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_EXCHANGE_ACCOUNT_SETUP_SUCCESS, &kyc_purpose, |