Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials
authorAdnan H <acednan@gmail.com>
Mon, 5 Dec 2016 21:17:37 +0000 (22:17 +0100)
committerAdnan H <acednan@gmail.com>
Mon, 5 Dec 2016 21:17:37 +0000 (22:17 +0100)
1  2 
src/credential/gnunet-service-credential.c

index 047ea00753b33681603bccec4b8ff474032b9761,20f6fe4e03f21b3ee58bbc7c30e11c551504b28f..792d8741e4cb2dac0d37ae29c197c21fd1a78236
@@@ -328,20 -262,10 +325,20 @@@ send_lookup_response (void* cls
    struct GNUNET_MQ_Envelope *env;
    struct VerifyResultMessage *rmsg;
    const struct GNUNET_CREDENTIAL_CredentialRecordData *crd;
+   struct GNUNET_CRYPTO_EccSignaturePurpose *purp;
    struct CredentialRecordEntry *cr_entry;
-   int cred_verified;
  
    cred_record_count = 0;
 +  struct AttributeRecordEntry *attr_entry;
 +
 +  struct GNUNET_CREDENTIAL_AttributeRecordData *ard = 
 +    GNUNET_new(struct GNUNET_CREDENTIAL_AttributeRecordData); 
 +  
 +  attr_entry->record_data = *ard; 
 +  ard->subject_key = vrh->issuer_key;
 +  GNUNET_CONTAINER_DLL_insert_tail (vrh->attr_queue_head,
 +                                    vrh->attr_queue_tail,
 +                                    attr_entry);
    for (i=0; i < rd_count; i++)
    {
      if (GNUNET_GNSRECORD_TYPE_CREDENTIAL != rd[i].record_type)
    }
  
  
 +  /**
 +   * Check for attributes from the issuer and follow the chain 
 +   * till you get the required subject's attributes
 +   */
 +  if(cred_verified != GNUNET_YES){
 +
 +
 +    vrh->attr_pointer = vrh->attr_queue_head; 
 +
 +    //Start with backward resolution
 +    GNUNET_GNS_lookup (gns,
 +                       vrh->issuer_attribute,
 +                       &vrh->issuer_key, //issuer_key,
 +                       GNUNET_GNSRECORD_TYPE_ATTRIBUTE,
 +                       GNUNET_GNS_LO_DEFAULT,
 +                       NULL, //shorten_key, always NULL
 +                       &start_backward_resolution,
 +                       vrh);
 +  }
 +
  
    /**
     * TODO
     * Start resolution of Attribute delegations from issuer