summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-05-05 10:39:51 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-05-05 10:39:51 +0200
commitb1e0f7d53b6d5b42477c173929041dcf52c8b03d (patch)
treef4d385995ae85339cf507c79ccc518b2454ab36e
parent067059ee3b632dcc0fe872de72c1964bca941742 (diff)
propery deserialize attests
-rw-r--r--src/reclaim/oidc_helper.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index 5d04ef6b2..a5287c26d 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -596,6 +596,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv,
char *ptr;
char *plaintext;
char *attrs_ser;
+ char *attests_ser;
char *expected_code_challenge;
char *code_challenge;
char *code_verifier_hash;
@@ -605,6 +606,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv,
struct GNUNET_CRYPTO_EcdhePublicKey *ecdh_pub;
uint32_t code_challenge_len;
uint32_t attrs_ser_len;
+ uint32_t attests_ser_len;
size_t plaintext_len;
size_t code_payload_len;
uint32_t nonce = 0;
@@ -710,7 +712,10 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv,
attrs_ser = ((char *) &params[1]) + code_challenge_len;
attrs_ser_len = ntohl (params->attr_list_len);
*attrs = GNUNET_RECLAIM_attribute_list_deserialize (attrs_ser, attrs_ser_len);
- *attests = GNUNET_new (struct GNUNET_RECLAIM_AttestationList);
+ attests_ser = ((char*) attrs_ser) + attrs_ser_len;
+ attests_ser_len = ntohl (params->attest_list_len);
+ *attests = GNUNET_RECLAIM_attestation_list_deserialize (attests_ser,
+ attests_ser_len);
*nonce_str = NULL;
if (nonce != 0)