aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/plugin_rest_openid_connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/plugin_rest_openid_connect.c')
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c156
1 files changed, 83 insertions, 73 deletions
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index 2f44917c9..5b0bb2b6f 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -439,10 +439,14 @@ struct RequestHandle
439 struct GNUNET_RECLAIM_AttributeList *attr_userinfo_list; 439 struct GNUNET_RECLAIM_AttributeList *attr_userinfo_list;
440 440
441 /** 441 /**
442 * Attestation list 442 * Credentials
443 */ 443 */
444 struct GNUNET_RECLAIM_AttestationList *attests_list; 444 struct GNUNET_RECLAIM_CredentialList *credentials;
445 445
446 /**
447 * Presentations
448 */
449 struct GNUNET_RECLAIM_PresentationList *presentations;
446 450
447 /** 451 /**
448 * IDENTITY Operation 452 * IDENTITY Operation
@@ -461,9 +465,9 @@ struct RequestHandle
461 struct GNUNET_RECLAIM_AttributeIterator *attr_it; 465 struct GNUNET_RECLAIM_AttributeIterator *attr_it;
462 466
463 /** 467 /**
464 * Attestation iterator 468 * Credential iterator
465 */ 469 */
466 struct GNUNET_RECLAIM_AttestationIterator *attest_it; 470 struct GNUNET_RECLAIM_CredentialIterator *cred_it;
467 471
468 472
469 /** 473 /**
@@ -561,8 +565,8 @@ cleanup_handle (struct RequestHandle *handle)
561 GNUNET_SCHEDULER_cancel (handle->timeout_task); 565 GNUNET_SCHEDULER_cancel (handle->timeout_task);
562 if (NULL != handle->attr_it) 566 if (NULL != handle->attr_it)
563 GNUNET_RECLAIM_get_attributes_stop (handle->attr_it); 567 GNUNET_RECLAIM_get_attributes_stop (handle->attr_it);
564 if (NULL != handle->attest_it) 568 if (NULL != handle->cred_it)
565 GNUNET_RECLAIM_get_attestations_stop (handle->attest_it); 569 GNUNET_RECLAIM_get_credentials_stop (handle->cred_it);
566 if (NULL != handle->ticket_it) 570 if (NULL != handle->ticket_it)
567 GNUNET_RECLAIM_ticket_iteration_stop (handle->ticket_it); 571 GNUNET_RECLAIM_ticket_iteration_stop (handle->ticket_it);
568 if (NULL != handle->idp_op) 572 if (NULL != handle->idp_op)
@@ -590,8 +594,10 @@ cleanup_handle (struct RequestHandle *handle)
590 GNUNET_RECLAIM_attribute_list_destroy (handle->attr_idtoken_list); 594 GNUNET_RECLAIM_attribute_list_destroy (handle->attr_idtoken_list);
591 if (NULL!=handle->attr_userinfo_list) 595 if (NULL!=handle->attr_userinfo_list)
592 GNUNET_RECLAIM_attribute_list_destroy (handle->attr_userinfo_list); 596 GNUNET_RECLAIM_attribute_list_destroy (handle->attr_userinfo_list);
593 if (NULL!=handle->attests_list) 597 if (NULL!=handle->credentials)
594 GNUNET_RECLAIM_attestation_list_destroy (handle->attests_list); 598 GNUNET_RECLAIM_credential_list_destroy (handle->credentials);
599 if (NULL!=handle->presentations)
600 GNUNET_RECLAIM_presentation_list_destroy (handle->presentations);
595 GNUNET_CONTAINER_DLL_remove (requests_head, 601 GNUNET_CONTAINER_DLL_remove (requests_head,
596 requests_tail, 602 requests_tail,
597 handle); 603 handle);
@@ -934,7 +940,9 @@ oidc_iteration_error (void *cls)
934 * parameter. Otherwise redirects with error 940 * parameter. Otherwise redirects with error
935 */ 941 */
936static void 942static void
937oidc_ticket_issue_cb (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket) 943oidc_ticket_issue_cb (void *cls,
944 const struct GNUNET_RECLAIM_Ticket *ticket,
945 const struct GNUNET_RECLAIM_PresentationList *pres)
938{ 946{
939 struct RequestHandle *handle = cls; 947 struct RequestHandle *handle = cls;
940 struct MHD_Response *resp; 948 struct MHD_Response *resp;
@@ -957,7 +965,7 @@ oidc_ticket_issue_cb (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
957 code_string = OIDC_build_authz_code (&handle->priv_key, 965 code_string = OIDC_build_authz_code (&handle->priv_key,
958 &handle->ticket, 966 &handle->ticket,
959 handle->attr_idtoken_list, 967 handle->attr_idtoken_list,
960 handle->attests_list, 968 pres,
961 handle->oidc->nonce, 969 handle->oidc->nonce,
962 handle->oidc->code_challenge); 970 handle->oidc->code_challenge);
963 if ((NULL != handle->redirect_prefix) && (NULL != handle->redirect_suffix) && 971 if ((NULL != handle->redirect_prefix) && (NULL != handle->redirect_suffix) &&
@@ -1010,13 +1018,13 @@ attribute_list_merge (struct GNUNET_RECLAIM_AttributeList *list_a,
1010 le_m = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); 1018 le_m = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry);
1011 le_m->attribute = GNUNET_RECLAIM_attribute_new (le_a->attribute->name, 1019 le_m->attribute = GNUNET_RECLAIM_attribute_new (le_a->attribute->name,
1012 &le_a->attribute-> 1020 &le_a->attribute->
1013 attestation, 1021 credential,
1014 le_a->attribute->type, 1022 le_a->attribute->type,
1015 le_a->attribute->data, 1023 le_a->attribute->data,
1016 le_a->attribute->data_size); 1024 le_a->attribute->data_size);
1017 le_m->attribute->id = le_a->attribute->id; 1025 le_m->attribute->id = le_a->attribute->id;
1018 le_m->attribute->flag = le_a->attribute->flag; 1026 le_m->attribute->flag = le_a->attribute->flag;
1019 le_m->attribute->attestation = le_a->attribute->attestation; 1027 le_m->attribute->credential = le_a->attribute->credential;
1020 GNUNET_CONTAINER_DLL_insert (merged_list->list_head, 1028 GNUNET_CONTAINER_DLL_insert (merged_list->list_head,
1021 merged_list->list_tail, 1029 merged_list->list_tail,
1022 le_m); 1030 le_m);
@@ -1035,13 +1043,13 @@ attribute_list_merge (struct GNUNET_RECLAIM_AttributeList *list_a,
1035 le_m = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); 1043 le_m = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry);
1036 le_m->attribute = GNUNET_RECLAIM_attribute_new (le_b->attribute->name, 1044 le_m->attribute = GNUNET_RECLAIM_attribute_new (le_b->attribute->name,
1037 &le_b->attribute-> 1045 &le_b->attribute->
1038 attestation, 1046 credential,
1039 le_b->attribute->type, 1047 le_b->attribute->type,
1040 le_b->attribute->data, 1048 le_b->attribute->data,
1041 le_b->attribute->data_size); 1049 le_b->attribute->data_size);
1042 le_m->attribute->id = le_b->attribute->id; 1050 le_m->attribute->id = le_b->attribute->id;
1043 le_m->attribute->flag = le_b->attribute->flag; 1051 le_m->attribute->flag = le_b->attribute->flag;
1044 le_m->attribute->attestation = le_b->attribute->attestation; 1052 le_m->attribute->credential = le_b->attribute->credential;
1045 GNUNET_CONTAINER_DLL_insert (merged_list->list_head, 1053 GNUNET_CONTAINER_DLL_insert (merged_list->list_head,
1046 merged_list->list_tail, 1054 merged_list->list_tail,
1047 le_m); 1055 le_m);
@@ -1051,13 +1059,13 @@ attribute_list_merge (struct GNUNET_RECLAIM_AttributeList *list_a,
1051 1059
1052 1060
1053static void 1061static void
1054oidc_attest_collect_finished_cb (void *cls) 1062oidc_cred_collect_finished_cb (void *cls)
1055{ 1063{
1056 struct RequestHandle *handle = cls; 1064 struct RequestHandle *handle = cls;
1057 struct GNUNET_RECLAIM_AttributeList *merged_list; 1065 struct GNUNET_RECLAIM_AttributeList *merged_list;
1058 struct GNUNET_RECLAIM_AttributeListEntry *le_m; 1066 struct GNUNET_RECLAIM_AttributeListEntry *le_m;
1059 1067
1060 handle->attest_it = NULL; 1068 handle->cred_it = NULL;
1061 merged_list = attribute_list_merge (handle->attr_idtoken_list, 1069 merged_list = attribute_list_merge (handle->attr_idtoken_list,
1062 handle->attr_userinfo_list); 1070 handle->attr_userinfo_list);
1063 for (le_m = merged_list->list_head; NULL != le_m; le_m = le_m->next) 1071 for (le_m = merged_list->list_head; NULL != le_m; le_m = le_m->next)
@@ -1078,40 +1086,40 @@ oidc_attest_collect_finished_cb (void *cls)
1078 * Collects all attributes for an ego if in scope parameter 1086 * Collects all attributes for an ego if in scope parameter
1079 */ 1087 */
1080static void 1088static void
1081oidc_attest_collect (void *cls, 1089oidc_cred_collect (void *cls,
1082 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 1090 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
1083 const struct GNUNET_RECLAIM_Attestation *attest) 1091 const struct GNUNET_RECLAIM_Credential *cred)
1084{ 1092{
1085 struct RequestHandle *handle = cls; 1093 struct RequestHandle *handle = cls;
1086 struct GNUNET_RECLAIM_AttributeListEntry *le; 1094 struct GNUNET_RECLAIM_AttributeListEntry *le;
1087 struct GNUNET_RECLAIM_AttestationListEntry *ale; 1095 struct GNUNET_RECLAIM_CredentialListEntry *ale;
1088 1096
1089 for (ale = handle->attests_list->list_head; NULL != ale; ale = ale->next) 1097 for (ale = handle->credentials->list_head; NULL != ale; ale = ale->next)
1090 { 1098 {
1091 if (GNUNET_NO == GNUNET_RECLAIM_id_is_equal (&ale->attestation->id, 1099 if (GNUNET_NO == GNUNET_RECLAIM_id_is_equal (&ale->credential->id,
1092 &attest->id)) 1100 &cred->id))
1093 continue; 1101 continue;
1094 /** Attestation already in list **/ 1102 /** Credential already in list **/
1095 GNUNET_RECLAIM_get_attestations_next (handle->attest_it); 1103 GNUNET_RECLAIM_get_credentials_next (handle->cred_it);
1096 return; 1104 return;
1097 } 1105 }
1098 1106
1099 for (le = handle->attr_idtoken_list->list_head; NULL != le; le = le->next) 1107 for (le = handle->attr_idtoken_list->list_head; NULL != le; le = le->next)
1100 { 1108 {
1101 if (GNUNET_NO == GNUNET_RECLAIM_id_is_equal (&le->attribute->attestation, 1109 if (GNUNET_NO == GNUNET_RECLAIM_id_is_equal (&le->attribute->credential,
1102 &attest->id)) 1110 &cred->id))
1103 continue; 1111 continue;
1104 /** Attestation matches for attribute, add **/ 1112 /** Credential matches for attribute, add **/
1105 ale = GNUNET_new (struct GNUNET_RECLAIM_AttestationListEntry); 1113 ale = GNUNET_new (struct GNUNET_RECLAIM_CredentialListEntry);
1106 ale->attestation = GNUNET_RECLAIM_attestation_new (attest->name, 1114 ale->credential = GNUNET_RECLAIM_credential_new (cred->name,
1107 attest->type, 1115 cred->type,
1108 attest->data, 1116 cred->data,
1109 attest->data_size); 1117 cred->data_size);
1110 GNUNET_CONTAINER_DLL_insert (handle->attests_list->list_head, 1118 GNUNET_CONTAINER_DLL_insert (handle->credentials->list_head,
1111 handle->attests_list->list_tail, 1119 handle->credentials->list_tail,
1112 ale); 1120 ale);
1113 } 1121 }
1114 GNUNET_RECLAIM_get_attestations_next (handle->attest_it); 1122 GNUNET_RECLAIM_get_credentials_next (handle->cred_it);
1115} 1123}
1116 1124
1117 1125
@@ -1129,16 +1137,16 @@ oidc_attr_collect_finished_cb (void *cls)
1129 GNUNET_SCHEDULER_add_now (&do_redirect_error, handle); 1137 GNUNET_SCHEDULER_add_now (&do_redirect_error, handle);
1130 return; 1138 return;
1131 } 1139 }
1132 handle->attests_list = GNUNET_new (struct GNUNET_RECLAIM_AttestationList); 1140 handle->credentials = GNUNET_new (struct GNUNET_RECLAIM_CredentialList);
1133 handle->attest_it = 1141 handle->cred_it =
1134 GNUNET_RECLAIM_get_attestations_start (idp, 1142 GNUNET_RECLAIM_get_credentials_start (idp,
1135 &handle->priv_key, 1143 &handle->priv_key,
1136 &oidc_iteration_error, 1144 &oidc_iteration_error,
1137 handle, 1145 handle,
1138 &oidc_attest_collect, 1146 &oidc_cred_collect,
1139 handle, 1147 handle,
1140 &oidc_attest_collect_finished_cb, 1148 &oidc_cred_collect_finished_cb,
1141 handle); 1149 handle);
1142 1150
1143} 1151}
1144 1152
@@ -1212,13 +1220,13 @@ oidc_attr_collect (void *cls,
1212 { 1220 {
1213 le = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); 1221 le = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry);
1214 le->attribute = GNUNET_RECLAIM_attribute_new (attr->name, 1222 le->attribute = GNUNET_RECLAIM_attribute_new (attr->name,
1215 &attr->attestation, 1223 &attr->credential,
1216 attr->type, 1224 attr->type,
1217 attr->data, 1225 attr->data,
1218 attr->data_size); 1226 attr->data_size);
1219 le->attribute->id = attr->id; 1227 le->attribute->id = attr->id;
1220 le->attribute->flag = attr->flag; 1228 le->attribute->flag = attr->flag;
1221 le->attribute->attestation = attr->attestation; 1229 le->attribute->credential = attr->credential;
1222 GNUNET_CONTAINER_DLL_insert (handle->attr_idtoken_list->list_head, 1230 GNUNET_CONTAINER_DLL_insert (handle->attr_idtoken_list->list_head,
1223 handle->attr_idtoken_list->list_tail, 1231 handle->attr_idtoken_list->list_tail,
1224 le); 1232 le);
@@ -1227,13 +1235,13 @@ oidc_attr_collect (void *cls,
1227 { 1235 {
1228 le = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); 1236 le = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry);
1229 le->attribute = GNUNET_RECLAIM_attribute_new (attr->name, 1237 le->attribute = GNUNET_RECLAIM_attribute_new (attr->name,
1230 &attr->attestation, 1238 &attr->credential,
1231 attr->type, 1239 attr->type,
1232 attr->data, 1240 attr->data,
1233 attr->data_size); 1241 attr->data_size);
1234 le->attribute->id = attr->id; 1242 le->attribute->id = attr->id;
1235 le->attribute->flag = attr->flag; 1243 le->attribute->flag = attr->flag;
1236 le->attribute->attestation = attr->attestation; 1244 le->attribute->credential = attr->credential;
1237 GNUNET_CONTAINER_DLL_insert (handle->attr_userinfo_list->list_head, 1245 GNUNET_CONTAINER_DLL_insert (handle->attr_userinfo_list->list_head,
1238 handle->attr_userinfo_list->list_tail, 1246 handle->attr_userinfo_list->list_tail,
1239 le); 1247 le);
@@ -1982,7 +1990,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
1982 const struct EgoEntry *ego_entry; 1990 const struct EgoEntry *ego_entry;
1983 struct GNUNET_TIME_Relative expiration_time; 1991 struct GNUNET_TIME_Relative expiration_time;
1984 struct GNUNET_RECLAIM_AttributeList *cl = NULL; 1992 struct GNUNET_RECLAIM_AttributeList *cl = NULL;
1985 struct GNUNET_RECLAIM_AttestationList *al = NULL; 1993 struct GNUNET_RECLAIM_PresentationList *pl = NULL;
1986 struct GNUNET_RECLAIM_Ticket ticket; 1994 struct GNUNET_RECLAIM_Ticket ticket;
1987 struct GNUNET_CRYPTO_EcdsaPublicKey cid; 1995 struct GNUNET_CRYPTO_EcdsaPublicKey cid;
1988 struct GNUNET_HashCode cache_key; 1996 struct GNUNET_HashCode cache_key;
@@ -2068,7 +2076,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
2068 2076
2069 // decode code 2077 // decode code
2070 if (GNUNET_OK != OIDC_parse_authz_code (&cid, code, code_verifier, &ticket, 2078 if (GNUNET_OK != OIDC_parse_authz_code (&cid, code, code_verifier, &ticket,
2071 &cl, &al, &nonce)) 2079 &cl, &pl, &nonce))
2072 { 2080 {
2073 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_REQUEST); 2081 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_REQUEST);
2074 handle->edesc = GNUNET_strdup ("invalid code"); 2082 handle->edesc = GNUNET_strdup ("invalid code");
@@ -2108,7 +2116,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
2108 id_token = OIDC_generate_id_token (&ticket.audience, 2116 id_token = OIDC_generate_id_token (&ticket.audience,
2109 &ticket.identity, 2117 &ticket.identity,
2110 cl, 2118 cl,
2111 al, 2119 pl,
2112 &expiration_time, 2120 &expiration_time,
2113 (NULL != nonce) ? nonce : NULL, 2121 (NULL != nonce) ? nonce : NULL,
2114 jwt_secret); 2122 jwt_secret);
@@ -2124,7 +2132,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
2124 MHD_add_response_header (resp, "Content-Type", "application/json"); 2132 MHD_add_response_header (resp, "Content-Type", "application/json");
2125 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 2133 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
2126 GNUNET_RECLAIM_attribute_list_destroy (cl); 2134 GNUNET_RECLAIM_attribute_list_destroy (cl);
2127 GNUNET_RECLAIM_attestation_list_destroy (al); 2135 GNUNET_RECLAIM_presentation_list_destroy (pl);
2128 GNUNET_free (access_token); 2136 GNUNET_free (access_token);
2129 GNUNET_free (json_response); 2137 GNUNET_free (json_response);
2130 GNUNET_free (id_token); 2138 GNUNET_free (id_token);
@@ -2139,11 +2147,11 @@ static void
2139consume_ticket (void *cls, 2147consume_ticket (void *cls,
2140 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity, 2148 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
2141 const struct GNUNET_RECLAIM_Attribute *attr, 2149 const struct GNUNET_RECLAIM_Attribute *attr,
2142 const struct GNUNET_RECLAIM_Attestation *attest) 2150 const struct GNUNET_RECLAIM_Presentation *pres)
2143{ 2151{
2144 struct RequestHandle *handle = cls; 2152 struct RequestHandle *handle = cls;
2145 struct GNUNET_RECLAIM_AttributeListEntry *ale; 2153 struct GNUNET_RECLAIM_AttributeListEntry *ale;
2146 struct GNUNET_RECLAIM_AttestationListEntry *atle; 2154 struct GNUNET_RECLAIM_PresentationListEntry *atle;
2147 struct MHD_Response *resp; 2155 struct MHD_Response *resp;
2148 char *result_str; 2156 char *result_str;
2149 handle->idp_op = NULL; 2157 handle->idp_op = NULL;
@@ -2152,7 +2160,7 @@ consume_ticket (void *cls,
2152 { 2160 {
2153 result_str = OIDC_generate_userinfo (&handle->ticket.identity, 2161 result_str = OIDC_generate_userinfo (&handle->ticket.identity,
2154 handle->attr_userinfo_list, 2162 handle->attr_userinfo_list,
2155 handle->attests_list); 2163 handle->presentations);
2156 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Userinfo: %s\n", result_str); 2164 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Userinfo: %s\n", result_str);
2157 resp = GNUNET_REST_create_response (result_str); 2165 resp = GNUNET_REST_create_response (result_str);
2158 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 2166 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
@@ -2162,35 +2170,35 @@ consume_ticket (void *cls,
2162 } 2170 }
2163 ale = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry); 2171 ale = GNUNET_new (struct GNUNET_RECLAIM_AttributeListEntry);
2164 ale->attribute = GNUNET_RECLAIM_attribute_new (attr->name, 2172 ale->attribute = GNUNET_RECLAIM_attribute_new (attr->name,
2165 &attr->attestation, 2173 &attr->credential,
2166 attr->type, 2174 attr->type,
2167 attr->data, 2175 attr->data,
2168 attr->data_size); 2176 attr->data_size);
2169 ale->attribute->id = attr->id; 2177 ale->attribute->id = attr->id;
2170 ale->attribute->flag = attr->flag; 2178 ale->attribute->flag = attr->flag;
2171 ale->attribute->attestation = attr->attestation; 2179 ale->attribute->credential = attr->credential;
2172 GNUNET_CONTAINER_DLL_insert (handle->attr_userinfo_list->list_head, 2180 GNUNET_CONTAINER_DLL_insert (handle->attr_userinfo_list->list_head,
2173 handle->attr_userinfo_list->list_tail, 2181 handle->attr_userinfo_list->list_tail,
2174 ale); 2182 ale);
2175 if (NULL == attest) 2183 if (NULL == pres)
2176 return; 2184 return;
2177 for (atle = handle->attests_list->list_head; NULL != atle; atle = atle->next) 2185 for (atle = handle->presentations->list_head;
2186 NULL != atle; atle = atle->next)
2178 { 2187 {
2179 if (GNUNET_NO == GNUNET_RECLAIM_id_is_equal (&atle->attestation->id, 2188 if (GNUNET_NO == GNUNET_RECLAIM_id_is_equal (&atle->presentation->credential_id,
2180 &attest->id)) 2189 &pres->credential_id))
2181 continue; 2190 continue;
2182 break; /** already in list **/ 2191 break; /** already in list **/
2183 } 2192 }
2184 if (NULL == atle) 2193 if (NULL == atle)
2185 { 2194 {
2186 /** Attestation matches for attribute, add **/ 2195 /** Credential matches for attribute, add **/
2187 atle = GNUNET_new (struct GNUNET_RECLAIM_AttestationListEntry); 2196 atle = GNUNET_new (struct GNUNET_RECLAIM_PresentationListEntry);
2188 atle->attestation = GNUNET_RECLAIM_attestation_new (attest->name, 2197 atle->presentation = GNUNET_RECLAIM_presentation_new (pres->type,
2189 attest->type, 2198 pres->data,
2190 attest->data, 2199 pres->data_size);
2191 attest->data_size); 2200 GNUNET_CONTAINER_DLL_insert (handle->presentations->list_head,
2192 GNUNET_CONTAINER_DLL_insert (handle->attests_list->list_head, 2201 handle->presentations->list_tail,
2193 handle->attests_list->list_tail,
2194 atle); 2202 atle);
2195 } 2203 }
2196} 2204}
@@ -2289,8 +2297,8 @@ userinfo_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
2289 privkey = GNUNET_IDENTITY_ego_get_private_key (aud_ego->ego); 2297 privkey = GNUNET_IDENTITY_ego_get_private_key (aud_ego->ego);
2290 handle->attr_userinfo_list = 2298 handle->attr_userinfo_list =
2291 GNUNET_new (struct GNUNET_RECLAIM_AttributeList); 2299 GNUNET_new (struct GNUNET_RECLAIM_AttributeList);
2292 handle->attests_list = 2300 handle->presentations =
2293 GNUNET_new (struct GNUNET_RECLAIM_AttestationList); 2301 GNUNET_new (struct GNUNET_RECLAIM_PresentationList);
2294 2302
2295 handle->idp_op = GNUNET_RECLAIM_ticket_consume (idp, 2303 handle->idp_op = GNUNET_RECLAIM_ticket_consume (idp,
2296 privkey, 2304 privkey,
@@ -2611,6 +2619,7 @@ libgnunet_plugin_rest_openid_connect_init (void *cls)
2611 return api; 2619 return api;
2612} 2620}
2613 2621
2622
2614static int 2623static int
2615cleanup_hashmap (void *cls, const struct GNUNET_HashCode *key, void *value) 2624cleanup_hashmap (void *cls, const struct GNUNET_HashCode *key, void *value)
2616{ 2625{
@@ -2618,6 +2627,7 @@ cleanup_hashmap (void *cls, const struct GNUNET_HashCode *key, void *value)
2618 return GNUNET_YES; 2627 return GNUNET_YES;
2619} 2628}
2620 2629
2630
2621/** 2631/**
2622 * Exit point from the plugin. 2632 * Exit point from the plugin.
2623 * 2633 *