diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2022-03-22 02:33:51 +0100 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2022-03-22 02:33:51 +0100 |
commit | e200e860321abdff235863bd83e663ae57cf037a (patch) | |
tree | dd0c3429a3e0438fad970bfa2eee303b5c3c9ec5 /src/util/age_restriction.c | |
parent | bdc797a5830983e22b42bf8d97c25d80ad9f6346 (diff) | |
download | exchange-e200e860321abdff235863bd83e663ae57cf037a.tar.xz |
implement helper functions for p2p signatures, clean up existing signature logic
Diffstat (limited to 'src/util/age_restriction.c')
-rw-r--r-- | src/util/age_restriction.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c index 92143ad09..a9e066c85 100644 --- a/src/util/age_restriction.c +++ b/src/util/age_restriction.c @@ -217,6 +217,28 @@ TALER_age_commitment_derive ( } +/** + * Used for attestation of a particular age + */ +struct TALER_AgeAttestationPS +{ + /** + * Purpose must be #TALER_SIGNATURE_WALLET_AGE_ATTESTATION. + */ + struct GNUNET_CRYPTO_EccSignaturePurpose purpose; + + /** + * Age mask that defines the underlying age groups + */ + struct TALER_AgeMask mask; + + /** + * The particular age that this attestation is for + */ + uint8_t age; +}; + + enum GNUNET_GenericReturnValue TALER_age_commitment_attest ( const struct TALER_AgeCommitmentProof *cp, |