aboutsummaryrefslogtreecommitdiff
path: root/src/identity-provider
diff options
context:
space:
mode:
authorSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-04-10 13:20:05 +0200
committerSchanzenbach, Martin <martin.schanzenbach@aisec.fraunhofer.de>2018-04-10 13:20:05 +0200
commita51a4c0462cef9e0bf172164837f1c1b4f73b08c (patch)
tree92be2ef88622a9e1953e63b05351abfc17bea646 /src/identity-provider
parent3eae3e43d6f94449cb89998a676e6696438cc604 (diff)
downloadgnunet-a51a4c0462cef9e0bf172164837f1c1b4f73b08c.tar.gz
gnunet-a51a4c0462cef9e0bf172164837f1c1b4f73b08c.zip
fix mem corruption
Diffstat (limited to 'src/identity-provider')
-rw-r--r--src/identity-provider/gnunet-service-identity-provider.c18
-rw-r--r--src/identity-provider/test_idp.conf2
2 files changed, 17 insertions, 3 deletions
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