summaryrefslogtreecommitdiff
path: root/src/util/age_restriction.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-03-22 02:33:51 +0100
committerChristian Grothoff <grothoff@gnunet.org>2022-03-22 02:33:51 +0100
commite200e860321abdff235863bd83e663ae57cf037a (patch)
treedd0c3429a3e0438fad970bfa2eee303b5c3c9ec5 /src/util/age_restriction.c
parentbdc797a5830983e22b42bf8d97c25d80ad9f6346 (diff)
downloadexchange-e200e860321abdff235863bd83e663ae57cf037a.tar.gz
exchange-e200e860321abdff235863bd83e663ae57cf037a.tar.bz2
exchange-e200e860321abdff235863bd83e663ae57cf037a.zip
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.c22
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,