Prepared Listing of References
authorMarkus Voggenreiter <Markus.Voggenreiter@tum.de>
Thu, 31 Oct 2019 16:47:22 +0000 (17:47 +0100)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Mon, 13 Jan 2020 12:31:04 +0000 (13:31 +0100)
src/include/gnunet_protocols.h
src/include/gnunet_reclaim_attribute_lib.h
src/include/gnunet_reclaim_service.h
src/reclaim-attribute/reclaim_attribute.c
src/reclaim/gnunet-reclaim.c
src/reclaim/gnunet-service-reclaim.c
src/reclaim/plugin_rest_openid_connect.c
src/reclaim/plugin_rest_reclaim.c
src/reclaim/reclaim_api.c

index 367f6fd80c4c74a41797ae79343610328f686ef4..8091fb3671af8ba01503ba119d19614cd3566b64 100644 (file)
@@ -3311,6 +3311,8 @@ extern "C" {
  */
 #define GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_DELETE 1500
 
+#define GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT 1501
+
 
 /**
  * Type used to match 'all' message types.
index cfdecae7924b3f3d8c5f2d18eae796f2c0a2a451..c761d20ed56ea4c15423be0b63239b27a8cd6baf 100644 (file)
@@ -76,9 +76,9 @@ struct GNUNET_RECLAIM_ATTRIBUTE_Claim
   uint32_t type;
 
   /**
-   * Version
+   * Flags
    */
-  uint32_t version;
+  uint32_t flag;
   /**
    * The name of the attribute. Note "name" must never be individually
    * free'd
index f839123e5f1701bd1e8b893b500944302ff6187d..214cdba690dc7ff2f4979e779bd7dfcd681e96a4 100644 (file)
@@ -118,7 +118,8 @@ typedef void (*GNUNET_RECLAIM_ContinuationWithStatus) (void *cls,
 typedef void (*GNUNET_RECLAIM_AttributeResult) (
   void *cls, const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
   const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-  const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest);
+  const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest,
+  const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference);
 
 
 /**
index 0083ac53e9a2d1ad08edc5dbdd20b13b377ffddc..d958ba7f9387b0104552a25d34d860a09988e5d0 100644 (file)
@@ -353,7 +353,7 @@ GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char *attr_name,
                         + strlen (attr_name_tmp) + 1 + data_size);
   attr->type = type;
   attr->data_size = data_size;
-  attr->version = 0;
+  attr->flag = 0;
   write_ptr = (char *) &attr[1];
   GNUNET_memcpy (write_ptr, attr_name_tmp, strlen (attr_name_tmp) + 1);
   attr->name = write_ptr;
@@ -569,8 +569,8 @@ GNUNET_RECLAIM_ATTRIBUTE_list_dup (
                                           le->claim->type,
                                           le->claim->data,
                                           le->claim->data_size);
-    result_le->claim->version = le->claim->version;
     result_le->claim->id = le->claim->id;
+    result_le->claim->flag = le->claim->flag;
     GNUNET_CONTAINER_DLL_insert (result->list_head,
                                  result->list_tail,
                                  result_le);
@@ -635,7 +635,7 @@ GNUNET_RECLAIM_ATTRIBUTE_serialize (
 
   attr_ser = (struct Attribute *) result;
   attr_ser->attribute_type = htons (attr->type);
-  attr_ser->attribute_version = htonl (attr->version);
+  attr_ser->attribute_version = htonl (attr->flag);
   attr_ser->attribute_id = GNUNET_htonll (attr->id);
   name_len = strlen (attr->name);
   attr_ser->name_len = htons (name_len);
@@ -685,7 +685,7 @@ GNUNET_RECLAIM_ATTRIBUTE_deserialize (const char *data, size_t data_size)
   attr = GNUNET_malloc (sizeof(struct GNUNET_RECLAIM_ATTRIBUTE_Claim)
                         + data_len + name_len + 1);
   attr->type = ntohs (attr_ser->attribute_type);
-  attr->version = ntohl (attr_ser->attribute_version);
+  attr->flag = ntohl (attr_ser->attribute_version);
   attr->id = GNUNET_ntohll (attr_ser->attribute_id);
   attr->data_size = data_len;
 
index c8ce1d7225eff0bb2ae3ae631927f2e0d163737c..5f9170f059b38cc9d5f9ca799084bce1a77c3d2a 100644 (file)
@@ -227,7 +227,8 @@ static void
 process_attrs (void *cls,
                const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
                const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-               const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest)
+               const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, 
+               const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 {
   char *value_str;
   char *id;
@@ -254,7 +255,7 @@ process_attrs (void *cls,
            attr->name,
            value_str,
            attr_type,
-           attr->version,
+           attr->flag,
            id);
   GNUNET_free (id);
 }
@@ -447,7 +448,8 @@ static void
 iter_cb (void *cls,
          const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
          const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-         const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest)
+         const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest,
+         const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 {
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le;
   char *attrs_tmp;
@@ -482,7 +484,7 @@ iter_cb (void *cls,
                                                       attr->type,
                                                       attr->data,
                                                       attr->data_size);
-      le->claim->version = attr->version;
+      le->claim->flag = attr->flag;
       le->claim->id = attr->id;
       GNUNET_CONTAINER_DLL_insert (attr_list->list_head,
                                    attr_list->list_tail,
@@ -516,7 +518,7 @@ iter_cb (void *cls,
              attr->name,
              attr_str,
              attr_type,
-             attr->version,
+             attr->flag,
              id);
     GNUNET_free (id);
   }
index 0c27cdbef60de2efcc09a12a325c42f307a594f9..11ff2cd2db95fa5e6f1f8e19f2fb534ae0c269ba 100644 (file)
@@ -1452,26 +1452,19 @@ ticket_iter (void *cls,
   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_REFERENCE_REF != rd[i].record_type) &&
         (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_REF != rd[i].record_type))
       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->label);
@@ -1490,7 +1483,6 @@ ticket_iter (void *cls,
                                  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);
 }
 
@@ -2027,7 +2019,7 @@ attr_iter_error (void *cls)
 
 
 /**
- * Got record. Return if it is an attribute or attestation.
+ * Got record. Return if it is an attribute or attestation/reference.
  *
  * @param cls our attribute iterator
  * @param zone zone we are iterating
@@ -2047,48 +2039,83 @@ attr_iter_cb (void *cls,
   struct GNUNET_MQ_Envelope *env;
   char *data_tmp;
 
-  if (rd_count != 1)
+  if (rd_count == 0)
   {
     GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1);
     return;
   }
-
-  if ((GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR != rd->record_type) &&
-      (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR != rd->record_type) )
+  if (rd_count > 1)
   {
-    GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1);
-    return;
+    if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR != rd[0].record_type)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Non-Attestation record with multiple entries found\n");
+      GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1);
+      return;
+    }
   }
 
-  if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR == rd->record_type )
+  for (int i = 0; i<rd_count; i++)
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attestation under: %s\n",
-                label);
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Sending ATTESTATION_RESULT message\n");
-    env = GNUNET_MQ_msg_extra (arm,
-                               rd->data_size,
-                               GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT);
-    arm->id = htonl (ai->request_id);
-    arm->attr_len = htons (rd->data_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_MQ_send (ai->client->mq, env);
-  }
-  else
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attribute under: %s\n", label);
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTRIBUTE_RESULT message\n");
-    env = GNUNET_MQ_msg_extra (arm,
-                               rd->data_size,
-                               GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
-    arm->id = htonl (ai->request_id);
-    arm->attr_len = htons (rd->data_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_MQ_send (ai->client->mq, env);
+    if ((GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR != rd[i].record_type) &&
+        (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR != rd[i].record_type) &&
+        (GNUNET_GNSRECORD_TYPE_RECLAIM_REFERENCE != rd[i].record_type))
+    {
+      GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1);
+      return;
+    }
+
+    if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTR == rd[i].record_type )
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attribute under: %s\n",
+                  label);
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                  "Sending ATTRIBUTE_RESULT message\n");
+      env = GNUNET_MQ_msg_extra (arm,
+                                 rd[i].data_size,
+                                 GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
+      arm->id = htonl (ai->request_id);
+      arm->attr_len = htons (rd[i].data_size);
+      GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity);
+      data_tmp = (char *) &arm[1];
+      GNUNET_memcpy (data_tmp, rd[i].data, rd[i].data_size);
+      GNUNET_MQ_send (ai->client->mq, env);
+    }
+    else
+    {
+      if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTEST_ATTR == rd[i].record_type )
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attestation under: %s\n",
+                    label);
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                    "Sending ATTESTATION_RESULT message\n");
+        env = GNUNET_MQ_msg_extra (arm,
+                                   rd[i].data_size,
+                                   GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT);
+        arm->id = htonl (ai->request_id);
+        arm->attr_len = htons (rd[i].data_size);
+        GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity);
+        data_tmp = (char *) &arm[1];
+        GNUNET_memcpy (data_tmp, rd[i].data, rd[i].data_size);
+        GNUNET_MQ_send (ai->client->mq, env);
+      }
+      else
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found reference under: %s\n",
+                    label);
+        GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                    "Sending REFERENCE_RESULT message\n");
+        env = GNUNET_MQ_msg_extra (arm,
+                                   rd[i].data_size,
+                                   GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT);
+        arm->id = htonl (ai->request_id);
+        arm->attr_len = htons (rd[i].data_size);
+        GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity);
+        data_tmp = (char *) &arm[1];
+        GNUNET_memcpy (data_tmp, rd[i].data, rd[i].data_size);
+        GNUNET_MQ_send (ai->client->mq, env);
+      }
+    }
   }
 }
 
index 2dde8995095e52d495ef1d79e2f683ec57526164..435cc3bf3bbc2bb35d760b652739a0d5fcbcfb3a 100644 (file)
@@ -979,7 +979,8 @@ static void
 oidc_attr_collect (void *cls,
                    const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
                    const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-                   const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest)
+                   const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest,
+                   const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 {
   struct RequestHandle *handle = cls;
   struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry *le;
@@ -1015,7 +1016,7 @@ oidc_attr_collect (void *cls,
                                                   attr->data,
                                                   attr->data_size);
   le->claim->id = attr->id;
-  le->claim->version = attr->version;
+  le->claim->flag = attr->flag;
   GNUNET_CONTAINER_DLL_insert (handle->attr_list->list_head,
                                handle->attr_list->list_tail,
                                le);
@@ -1864,7 +1865,8 @@ static void
 consume_ticket (void *cls,
                 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
                 const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-                const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest)
+                const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest,
+                const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 {
   struct RequestHandle *handle = cls;
   char *tmp_value;
index 5066eef5871c8dae8c53391000a4623ebe5a700e..7dd6588863071509d81b3ca9d42ba2bd1ffe2af9 100644 (file)
@@ -638,7 +638,8 @@ static void
 attest_collect (void *cls,
                 const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
                 const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-                const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest)
+                const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, 
+                const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 {
   struct RequestHandle *handle = cls;
   json_t *attr_obj;
@@ -1053,7 +1054,8 @@ static void
 attr_collect (void *cls,
               const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
               const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-              const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest)
+              const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest, 
+              const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 {
   struct RequestHandle *handle = cls;
   json_t *attr_obj;
@@ -1292,7 +1294,8 @@ static void
 consume_cont (void *cls,
               const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
               const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
-              const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest)
+              const struct GNUNET_RECLAIM_ATTESTATION_Claim *attest,
+              const struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *reference)
 {
   struct RequestHandle *handle = cls;
   char *val_str;
index 7c7261522ef7b238741dc1507a66b5a3ddea2815..ede2daf286debd470a8ec459cd276b6c7a6eaf90 100644 (file)
@@ -504,16 +504,16 @@ handle_consume_ticket_result (void *cls,
     {
       if (NULL == attrs)
       {
-        op->ar_cb (op->cls, &msg->identity, NULL, NULL);
+        op->ar_cb (op->cls, &msg->identity, NULL, NULL, NULL);
       }
       else
       {
         for (le = attrs->list_head; NULL != le; le = le->next)
-          op->ar_cb (op->cls, &msg->identity, le->claim, NULL);
+          op->ar_cb (op->cls, &msg->identity, le->claim, NULL, NULL);
         GNUNET_RECLAIM_ATTRIBUTE_list_destroy (attrs);
         attrs = NULL;
       }
-      op->ar_cb (op->cls, NULL, NULL, NULL);
+      op->ar_cb (op->cls, NULL, NULL, NULL, NULL);
     }
     GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
     free_op (op);
@@ -597,7 +597,7 @@ handle_attribute_result (void *cls, const struct AttributeResultMessage *msg)
     if (NULL != op)
     {
       if (NULL != op->ar_cb)
-        op->ar_cb (op->cls, NULL, NULL, NULL);
+        op->ar_cb (op->cls, NULL, NULL, NULL, NULL);
       GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
       free_op (op);
     }
@@ -610,12 +610,12 @@ handle_attribute_result (void *cls, const struct AttributeResultMessage *msg)
     if (NULL != it)
     {
       if (NULL != it->proc)
-        it->proc (it->proc_cls, &msg->identity, attr, NULL);
+        it->proc (it->proc_cls, &msg->identity, attr, NULL, NULL);
     }
     else if (NULL != op)
     {
       if (NULL != op->ar_cb)
-        op->ar_cb (op->cls, &msg->identity, attr, NULL);
+        op->ar_cb (op->cls, &msg->identity, attr, NULL, NULL);
     }
     GNUNET_free (attr);
     return;
@@ -696,7 +696,7 @@ handle_attestation_result (void *cls, const struct AttributeResultMessage *msg)
     if (NULL != op)
     {
       if (NULL != op->ar_cb)
-        op->ar_cb (op->cls, NULL, NULL, NULL);
+        op->ar_cb (op->cls, NULL, NULL, NULL, NULL);
       GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
       free_op (op);
     }
@@ -709,12 +709,111 @@ handle_attestation_result (void *cls, const struct AttributeResultMessage *msg)
     if (NULL != it)
     {
       if (NULL != it->proc)
-        it->proc (it->proc_cls, &msg->identity, NULL, attr);
+        it->proc (it->proc_cls, &msg->identity, NULL, attr, NULL);
     }
     else if (NULL != op)
     {
       if (NULL != op->ar_cb)
-        op->ar_cb (op->cls, &msg->identity, NULL, attr);
+        op->ar_cb (op->cls, &msg->identity, NULL, attr, NULL);
+    }
+    GNUNET_free (attr);
+    return;
+  }
+  GNUNET_assert (0);
+}
+
+/**
+   * Handle an incoming message of type
+   * #GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT
+   *
+   * @param cls
+   * @param msg the message we received
+   * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
+   */
+static int
+check_reference_result (void *cls, const struct AttributeResultMessage *msg)
+{
+  size_t msg_len;
+  size_t attr_len;
+
+  msg_len = ntohs (msg->header.size);
+  attr_len = ntohs (msg->attr_len);
+  if (msg_len != sizeof(struct AttributeResultMessage) + attr_len)
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
+  return GNUNET_OK;
+}
+
+/**
+* Handle an incoming message of type
+* #GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT
+*
+* @param cls
+* @param msg the message we received
+*/
+static void
+handle_reference_result (void *cls, const struct AttributeResultMessage *msg)
+{
+  static struct GNUNET_CRYPTO_EcdsaPrivateKey identity_dummy;
+  struct GNUNET_RECLAIM_Handle *h = cls;
+  struct GNUNET_RECLAIM_AttributeIterator *it;
+  struct GNUNET_RECLAIM_Operation *op;
+  size_t attr_len;
+  uint32_t r_id = ntohl (msg->id);
+
+  attr_len = ntohs (msg->attr_len);
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "Processing reference result.\n");
+
+
+  for (it = h->it_head; NULL != it; it = it->next)
+    if (it->r_id == r_id)
+      break;
+  for (op = h->op_head; NULL != op; op = op->next)
+    if (op->r_id == r_id)
+      break;
+  if ((NULL == it) && (NULL == op))
+    return;
+
+  if ((0 ==
+       (memcmp (&msg->identity, &identity_dummy, sizeof(identity_dummy)))))
+  {
+    if ((NULL == it) && (NULL == op))
+    {
+      GNUNET_break (0);
+      force_reconnect (h);
+      return;
+    }
+    if (NULL != it)
+    {
+      if (NULL != it->finish_cb)
+        it->finish_cb (it->finish_cb_cls);
+      free_it (it);
+    }
+    if (NULL != op)
+    {
+      if (NULL != op->ar_cb)
+        op->ar_cb (op->cls, NULL, NULL, NULL, NULL);
+      GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
+      free_op (op);
+    }
+    return;
+  }
+
+  {
+    struct GNUNET_RECLAIM_ATTESTATION_REFERENCE *attr;
+    attr = GNUNET_RECLAIM_ATTESTATION_REF_deserialize ((char *) &msg[1],
+                                                       attr_len);
+    if (NULL != it)
+    {
+      if (NULL != it->proc)
+        it->proc (it->proc_cls, &msg->identity, NULL, NULL, attr);
+    }
+    else if (NULL != op)
+    {
+      if (NULL != op->ar_cb)
+        op->ar_cb (op->cls, &msg->identity, NULL, NULL, attr);
     }
     GNUNET_free (attr);
     return;
@@ -844,6 +943,10 @@ reconnect (struct GNUNET_RECLAIM_Handle *h)
                            GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT,
                            struct AttributeResultMessage,
                            h),
+    GNUNET_MQ_hd_var_size (reference_result,
+                           GNUNET_MESSAGE_TYPE_RECLAIM_REFERENCE_RESULT,
+                           struct AttributeResultMessage,
+                           h),
     GNUNET_MQ_hd_fixed_size (ticket_result,
                              GNUNET_MESSAGE_TYPE_RECLAIM_TICKET_RESULT,
                              struct TicketResultMessage,