src/pq/pq_query_helper.c
src/pq/pq_result_helper.c
src/pt/gnunet-daemon-pt.c
-src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c
+src/reclaim-attribute/plugin_reclaim_attestation_jwt.c
+src/reclaim-attribute/plugin_reclaim_attribute_basic.c
+src/reclaim-attribute/reclaim_attestation.c
src/reclaim-attribute/reclaim_attribute.c
src/reclaim/gnunet-reclaim.c
src/reclaim/gnunet-service-reclaim.c
src/util/bandwidth.c
src/util/benchmark.c
src/util/bio.c
+src/util/buffer.c
src/util/client.c
src/util/common_allocation.c
src/util/common_endian.c
src/util/getopt_helpers.c
src/util/gnunet-config-diff.c
src/util/gnunet-config.c
+src/util/gnunet-crypto-tvg.c
src/util/gnunet-ecc.c
src/util/gnunet-qr.c
src/util/gnunet-resolver.c
struct GNUNET_RECLAIM_AttestationListEntry *ale;
struct GNUNET_RECLAIM_AttestationListEntry *tmp_ale;
- for (ale = al->list_head; NULL != ale; ale = ale->next)
+ for (ale = al->list_head; NULL != ale;)
{
if (NULL != ale->attestation)
GNUNET_free (ale->attestation);
struct GNUNET_RECLAIM_AttributeListEntry *ale;
struct GNUNET_RECLAIM_AttributeListEntry *tmp_ale;
- for (ale = al->list_head; NULL != ale; ale = ale->next)
+ for (ale = al->list_head; NULL != ale;)
{
if (NULL != ale->attribute)
GNUNET_free (ale->attribute);
const struct GNUNET_RECLAIM_AttributeList *attrs)
{
char *attest_str;
+ char *attr_str;
char *id;
const char *attest_type;
+ struct GNUNET_RECLAIM_AttributeListEntry *ale;
if (GNUNET_YES == GNUNET_RECLAIM_id_is_equal (&attestation,
&attest->id))
attest_type,
attest->flag,
id);
+ if (NULL != attrs)
+ {
+ fprintf (stdout,
+ "\t Attributes:\n");
+ for (ale = attrs->list_head; NULL != ale; ale = ale->next)
+ {
+ attr_str = GNUNET_RECLAIM_attribute_value_to_string (ale->attribute->type,
+ ale->attribute->data,
+ ale->attribute->data_size);
+
+ fprintf (stdout,
+ "\t %s: %s\n", ale->attribute->name, attr_str);
+ GNUNET_free (attr_str);
+ }
+ }
GNUNET_free (id);
}
GNUNET_RECLAIM_get_attestations_next (attest_iterator);
env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT);
arm->id = htonl (ai->request_id);
arm->attestation_len = htons (0);
+ arm->attributes_len = htons (0);
GNUNET_MQ_send (ai->client->mq, env);
GNUNET_CONTAINER_DLL_remove (ai->client->attest_iter_head,
ai->client->attest_iter_tail,
{
struct Iterator *ai = cls;
struct GNUNET_MQ_Envelope *env;
+ struct AttestationResultMessage *arm;
struct GNUNET_RECLAIM_AttributeList *attrs;
struct GNUNET_RECLAIM_Attestation *att;
char *data_tmp;
- char *attrs_size;
+ size_t attrs_size;
if ((rd_count != 1) ||
(GNUNET_GNSRECORD_TYPE_RECLAIM_ATTESTATION != rd->record_type))
rd->data_size);
attrs = GNUNET_RECLAIM_attestation_get_attributes (att);
attrs_size = GNUNET_RECLAIM_attribute_list_serialize_get_size (attrs);
-
- struct AttestationResultMessage *arm;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attestation under: %s\n",
label);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT);
arm->id = htonl (ai->request_id);
arm->attestation_len = htons (rd->data_size);
+ arm->attributes_len = htons (attrs_size);
GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity);
data_tmp = (char *) &arm[1];
GNUNET_memcpy (data_tmp, rd->data, rd->data_size);
GNUNET_free (handle->url);
if (NULL != handle->emsg)
GNUNET_free (handle->emsg);
- GNUNET_RECLAIM_attribute_list_destroy (handle->attr_list);
+ if (NULL != handle->attr_list)
+ GNUNET_RECLAIM_attribute_list_destroy (handle->attr_list);
for (ego_entry = handle->ego_head; NULL != ego_entry;)
{
ego_tmp = ego_entry;
json_array_append (handle->resp_object, attr_obj);
json_decref (attr_obj);
GNUNET_free (tmp_value);
+ GNUNET_RECLAIM_get_attributes_next (handle->attr_it);
}
&ale->attestation->id))
{
op->atr_cb (op->cls, &msg->identity,
- le->attribute, ale->attestation);
+ le->attribute, ale->attestation);
break;
}
else // No attestations
{
op->atr_cb (op->cls, &msg->identity,
- le->attribute, NULL);
+ le->attribute, NULL);
}
}
- GNUNET_RECLAIM_attribute_list_destroy (attrs);
- GNUNET_RECLAIM_attestation_list_destroy (attests);
+ if (NULL != attrs)
+ GNUNET_RECLAIM_attribute_list_destroy (attrs);
+ if (NULL != attests)
+ GNUNET_RECLAIM_attestation_list_destroy (attests);
attrs = NULL;
attests = NULL;
}
{
size_t msg_len;
size_t attr_len;
+ size_t attest_len;
msg_len = ntohs (msg->header.size);
- attr_len = ntohs (msg->attestation_len);
- if (msg_len != sizeof(struct AttestationResultMessage) + attr_len)
+ attest_len = ntohs (msg->attestation_len);
+ attr_len = ntohs (msg->attributes_len);
+ if (msg_len != sizeof(struct AttestationResultMessage)
+ + attr_len + attest_len)
{
GNUNET_break (0);
return GNUNET_SYSERR;
att = GNUNET_RECLAIM_attestation_deserialize ((char *) &msg[1], att_len);
char *read_ptr = ((char *) &msg[1]) + att_len;
attrs = GNUNET_RECLAIM_attribute_list_deserialize (read_ptr, attrs_len);
+
if (NULL != it)
{
if (NULL != it->proc)
op->at_cb (op->cls, &msg->identity, att, attrs);
}
GNUNET_free (att);
- GNUNET_RECLAIM_attribute_list_destroy (attrs);
+ if (NULL != attrs)
+ GNUNET_RECLAIM_attribute_list_destroy (attrs);
return;
}
GNUNET_assert (0);
ait->identity = *identity;
GNUNET_CONTAINER_DLL_insert_tail (h->ait_head, h->ait_tail, ait);
env =
- GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_ITERATION_START);
+ GNUNET_MQ_msg (msg,
+ GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_ITERATION_START);
msg->id = htonl (rid);
msg->identity = *identity;
if (NULL == h->mq)
* @param it the iterator
*/
void
-GNUNET_RECLAIM_get_attestations_next (struct GNUNET_RECLAIM_AttestationIterator *ait)
+GNUNET_RECLAIM_get_attestations_next (struct
+ GNUNET_RECLAIM_AttestationIterator *ait)
{
struct GNUNET_RECLAIM_Handle *h = ait->h;
struct AttestationIterationNextMessage *msg;
* @param it the iterator
*/
void
-GNUNET_RECLAIM_get_attestations_stop (struct GNUNET_RECLAIM_AttestationIterator *ait)
+GNUNET_RECLAIM_get_attestations_stop (struct
+ GNUNET_RECLAIM_AttestationIterator *ait)
{
struct GNUNET_RECLAIM_Handle *h = ait->h;
struct GNUNET_MQ_Envelope *env;
if (NULL != h->mq)
{
env =
- GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_ITERATION_STOP);
+ GNUNET_MQ_msg (msg,
+ GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_ITERATION_STOP);
msg->id = htonl (ait->r_id);
GNUNET_MQ_send (h->mq, env);
}
}
-
/**
* Issues a ticket to another relying party. The identity may use
* @GNUNET_RECLAIM_ticket_consume to consume the ticket