From: Schanzenbach, Martin Date: Tue, 5 May 2020 08:27:56 +0000 (+0200) Subject: fix attestations X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=067059ee3b632dcc0fe872de72c1964bca941742;p=oweals%2Fgnunet.git fix attestations --- diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index 29e8cb2ef..5d04ef6b2 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c @@ -710,6 +710,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv, attrs_ser = ((char *) ¶ms[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); *nonce_str = NULL; if (nonce != 0) diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c index 295de0d97..c6fa40687 100644 --- a/src/reclaim/plugin_rest_openid_connect.c +++ b/src/reclaim/plugin_rest_openid_connect.c @@ -549,6 +549,8 @@ cleanup_handle (struct RequestHandle *handle) GNUNET_RECLAIM_get_attestations_stop (handle->attest_it); if (NULL != handle->ticket_it) GNUNET_RECLAIM_ticket_iteration_stop (handle->ticket_it); + if (NULL != handle->idp_op) + GNUNET_RECLAIM_cancel (handle->idp_op); if (NULL != handle->idp) GNUNET_RECLAIM_disconnect (handle->idp); GNUNET_free_non_null (handle->url); @@ -1784,8 +1786,8 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle, struct RequestHandle *handle = cls; const struct EgoEntry *ego_entry; struct GNUNET_TIME_Relative expiration_time; - struct GNUNET_RECLAIM_AttributeList *cl; - struct GNUNET_RECLAIM_AttestationList *al; + struct GNUNET_RECLAIM_AttributeList *cl = NULL; + struct GNUNET_RECLAIM_AttestationList *al = NULL; struct GNUNET_RECLAIM_Ticket ticket; struct GNUNET_CRYPTO_EcdsaPublicKey cid; const struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; @@ -1948,6 +1950,8 @@ consume_ticket (void *cls, const struct GNUNET_RECLAIM_Attestation *attest) { struct RequestHandle *handle = cls; + handle->idp_op = NULL; + if (NULL == identity) { GNUNET_SCHEDULER_add_now (&return_userinfo_response, handle);