#define GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT 65553
/**
- * Record type for reclaim attestation records
+ * Record type for reclaim identity attestation
*/
#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR 65554
/**
- * Record type for reclaim attestation references
+ * Record type for reclaim identity references
+ */
+#define GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE 65555
+
+/**
+ * Record type for reclaim attestation records
+ */
+#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF 65556
+
+/**
+ * Record type for reclaim reference records
*/
-#define GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF 65555
+#define GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE_REF 65557
/**
* Flags that can be set for a record.
}
rd_new[rd_count].data_size = buf_size;
rd_new[rd_count].data = buf;
- rd_new[rd_count].record_type = GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF;
+ rd_new[rd_count].record_type = GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE;
rd_new[rd_count].flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
rd_new[rd_count].expiration_time = ash->exp.rel_value_us;
ash->ns_qe = GNUNET_NAMESTORE_records_store (nsh,
struct AttributeDeleteHandle *adh = cls;
struct TicketRecordsEntry *le;
int has_changed = GNUNET_NO;
-
for (int i = 0; i < rd_count; i++)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Next Zone Iteration %u and record type is %u\n", rd_count,
+ rd[i].record_type);
if ((GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR_REF != rd[i].record_type) &&
- (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR != rd[i].record_type) &&
+ (GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE_REF != rd[i].record_type) &&
(GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF != rd[i].record_type))
continue;
- if (0 != memcmp (rd[i].data, &adh->claim->id, sizeof(uint64_t)))
- continue;
- if (0 != memcmp (rd[i].data, (&adh->attest->id), sizeof(uint64_t)))
- continue;
- if (0 != memcmp (rd[i].data, &adh->reference->id, sizeof(uint64_t)))
- continue;
+ if (&adh->claim != NULL)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Claim is existend: %u \n", adh->claim->id);
+ if (0 != memcmp (rd[i].data, &adh->claim->id, sizeof(uint64_t)))
+ continue;
+ }
+ if (&adh->attest != NULL)
+ if (0 != memcmp (rd[i].data, &adh->attest->id, sizeof(uint64_t)))
+ continue;
+ if (&adh->reference != NULL)
+ if (0 != memcmp (rd[i].data, &adh->reference->id, sizeof(uint64_t)))
+ continue;
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Attribute or Attestation/Reference to delete found (%s)\n",
adh->tickets_to_update_tail,
le);
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Next Zone Iteration \n");
GNUNET_NAMESTORE_zone_iterator_next (adh->ns_it, 1);
}
if ((GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR_REF == rd[i].record_type)
&& (0 == memcmp (rd[i].data, &adh->claim->id, sizeof(uint64_t))))
continue;
- if ((GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR == rd[i].record_type)
+ if ((GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE_REF == rd[i].record_type)
&& (0 == memcmp (rd[i].data, &adh->attest->id, sizeof(uint64_t))))
continue;
if ((GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF == rd[i].record_type)
adh = GNUNET_new (struct AttributeDeleteHandle);
adh->claim = GNUNET_RECLAIM_ATTRIBUTE_deserialize ((char *) &dam[1],
data_len);
+ adh->reference = NULL;
+ adh->attest = NULL;
adh->r_id = ntohl (dam->id);
adh->identity = dam->identity;
adh = GNUNET_new (struct AttributeDeleteHandle);
adh->attest = GNUNET_RECLAIM_ATTESTATION_deserialize ((char *) &dam[1],
data_len);
+ adh->reference = NULL;
+ adh->claim = NULL;
adh->r_id = ntohl (dam->id);
adh->identity = dam->identity;
adh = GNUNET_new (struct AttributeDeleteHandle);
adh->reference = GNUNET_RECLAIM_ATTESTATION_REF_deserialize ((char *) &dam[1],
data_len);
+ adh->attest = NULL;
+ adh->claim = NULL;
+
adh->r_id = ntohl (dam->id);
adh->identity = dam->identity;
adh->label
case GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET:
case GNUNET_GNSRECORD_TYPE_RECLAIM_MASTER:
case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR:
- case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF:
+ case GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE:
return GNUNET_STRINGS_data_to_string_alloc (data, data_size);
default:
case GNUNET_GNSRECORD_TYPE_RECLAIM_MASTER:
case GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET:
case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR:
- case GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF:
+ case GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE:
return GNUNET_STRINGS_string_to_data (s, strlen (s), *data, *data_size);
default:
{ "RECLAIM_OIDC_CLIENT", GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_CLIENT },
{ "RECLAIM_OIDC_REDIRECT", GNUNET_GNSRECORD_TYPE_RECLAIM_OIDC_REDIRECT },
{ "RECLAIM_TICKET", GNUNET_GNSRECORD_TYPE_RECLAIM_TICKET },
+ { "RECLAIM_REFERENCE", GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE },
+ { "RECLAIM_REFERENCE_REF", GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE_REF },
{ "RECLAIM_ATTEST_REF", GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF },
{ NULL, UINT32_MAX }
};