Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials
authorAdnan H <acednan@gmail.com>
Fri, 2 Dec 2016 14:38:33 +0000 (15:38 +0100)
committerAdnan H <acednan@gmail.com>
Fri, 2 Dec 2016 14:39:21 +0000 (15:39 +0100)
1  2 
src/credential/gnunet-service-credential.c

index 620256cd92f446aadc00c0b53061be2abd7cd4cb,3ad2e2e1dd580c057e72569d00e2f529c47fd9a9..ed7d249e3fc1400cdb4e8bee711eea809402b59d
@@@ -288,29 -249,25 +288,40 @@@ send_lookup_response (void* cls
       *  Save all found attributes/issues and prepare forward
       *  resolution of issuer attribute
       */
 -    ar_entry = GNUNET_new (struct AttributeRecordEntry);
 -    ar_entry->record_data = *ard;
 -    GNUNET_CONTAINER_DLL_insert_tail (vrh->attr_chain_head,
 -                                      vrh->attr_chain_tail,
 -                                      ar_entry);
 +    cr_entry = GNUNET_new (struct CredentialRecordEntry);
 +    cr_entry->record_data = *crd;
 +    GNUNET_CONTAINER_DLL_insert_tail (vrh->cred_chain_head,
 +                                      vrh->cred_chain_tail,
 +                                      cr_entry);
 +
 +    if(GNUNET_CRYPTO_ecdsa_verify(GNUNET_SIGNATURE_PURPOSE_CREDENTIAL, purpose, sig, issuer_key))
 +    {   
 +      cred_verified = true;
 +      break;
 +    }
  
    }
 +  
 +
 +  /**
 +   * Check for attributes from the issuer and follow the chain 
 +   * till you get the required subject's attributes
 +   */
 +  if(cred_verified != true){
 +    for(i=0 ; i < rd_count ; i++){
 +
  
+   /**
+    * TODO
+    * Start resolution of Attribute delegations from issuer
+    *
+    * - Build adequate data structures for attribute(s) to lookup
+    * - Use GNUNET_GNSRECORD_TYPE_XXX
+    * - recursively try to find match(es) with results found top
+    * - return one found credential chain
+    *
+    */
    /**
     * Get serialized record data size
     */