aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/identity-attribute/identity_attribute.c11
-rw-r--r--src/identity-provider/gnunet-service-identity-provider.c18
-rw-r--r--src/identity-provider/test_idp.conf2
3 files changed, 21 insertions, 10 deletions
diff --git a/src/identity-attribute/identity_attribute.c b/src/identity-attribute/identity_attribute.c
index 0111668fe..dc2753fca 100644
--- a/src/identity-attribute/identity_attribute.c
+++ b/src/identity-attribute/identity_attribute.c
@@ -336,18 +336,15 @@ GNUNET_IDENTITY_ATTRIBUTE_list_dup (const struct GNUNET_IDENTITY_ATTRIBUTE_Claim
336 struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le; 336 struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *le;
337 struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *result_le; 337 struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry *result_le;
338 struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *result; 338 struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList *result;
339 size_t len;
340 339
341 result = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList); 340 result = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimList);
342 for (le = attrs->list_head; NULL != le; le = le->next) 341 for (le = attrs->list_head; NULL != le; le = le->next)
343 { 342 {
344 result_le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry); 343 result_le = GNUNET_new (struct GNUNET_IDENTITY_ATTRIBUTE_ClaimListEntry);
345 len = sizeof (struct GNUNET_IDENTITY_ATTRIBUTE_Claim) + le->claim->data_size; 344 result_le->claim = GNUNET_IDENTITY_ATTRIBUTE_claim_new (le->claim->name,
346 result_le->claim = GNUNET_malloc (len); 345 le->claim->type,
347 GNUNET_memcpy (result_le->claim, 346 le->claim->data,
348 le->claim, 347 le->claim->data_size);
349 len);
350 result_le->claim->name = (const char*)&result_le->claim[1];
351 GNUNET_CONTAINER_DLL_insert (result->list_head, 348 GNUNET_CONTAINER_DLL_insert (result->list_head,
352 result->list_tail, 349 result->list_tail,
353 result_le); 350 result_le);
diff --git a/src/identity-provider/gnunet-service-identity-provider.c b/src/identity-provider/gnunet-service-identity-provider.c
index a518d00ae..b738ffc82 100644
--- a/src/identity-provider/gnunet-service-identity-provider.c
+++ b/src/identity-provider/gnunet-service-identity-provider.c
@@ -1325,6 +1325,14 @@ check_attr_error (void *cls)
1325 cleanup_revoke_ticket_handle (rh); 1325 cleanup_revoke_ticket_handle (rh);
1326} 1326}
1327 1327
1328
1329/**
1330 * Revoke next attribte by reencryption with
1331 * new ABE master
1332 */
1333static void
1334reenc_next_attribute (void *cls);
1335
1328/** 1336/**
1329 * Check for existing attribute and overwrite 1337 * Check for existing attribute and overwrite
1330 */ 1338 */
@@ -1344,7 +1352,12 @@ check_attr_cb (void *cls,
1344 size_t buf_size; 1352 size_t buf_size;
1345 char* policy; 1353 char* policy;
1346 uint32_t attr_ver; 1354 uint32_t attr_ver;
1347 1355
1356 if (1 != rd_count) {
1357 GNUNET_SCHEDULER_add_now (&reenc_next_attribute,
1358 rh);
1359 return;
1360 }
1348 1361
1349 buf_size = GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (rh->attrs->list_head->claim); 1362 buf_size = GNUNET_IDENTITY_ATTRIBUTE_serialize_get_size (rh->attrs->list_head->claim);
1350 buf = GNUNET_malloc (buf_size); 1363 buf = GNUNET_malloc (buf_size);
@@ -1407,8 +1420,9 @@ check_attr_cb (void *cls,
1407 * new ABE master 1420 * new ABE master
1408 */ 1421 */
1409static void 1422static void
1410reenc_next_attribute (struct TicketRevocationHandle *rh) 1423reenc_next_attribute (void *cls)
1411{ 1424{
1425 struct TicketRevocationHandle *rh = cls;
1412 if (NULL == rh->attrs->list_head) 1426 if (NULL == rh->attrs->list_head)
1413 { 1427 {
1414 revocation_reissue_tickets (rh); 1428 revocation_reissue_tickets (rh);
diff --git a/src/identity-provider/test_idp.conf b/src/identity-provider/test_idp.conf
index b11b43ae2..5480e4975 100644
--- a/src/identity-provider/test_idp.conf
+++ b/src/identity-provider/test_idp.conf
@@ -30,4 +30,4 @@ DNS_ROOT=PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0
30[identity-rest-plugin] 30[identity-rest-plugin]
31address = http://localhost:8000/#/login 31address = http://localhost:8000/#/login
32psw = mysupersecretpassword 32psw = mysupersecretpassword
33expiration_time = 3600 \ No newline at end of file 33expiration_time = 3600