From: Adnan H Date: Fri, 2 Dec 2016 14:38:33 +0000 (+0100) Subject: Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials X-Git-Tag: gnunet-0.11.0rc0~24^2~134^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=191fd80caf3288ff2a620541f4aa623647b589fa;p=oweals%2Fgnunet.git Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials --- 191fd80caf3288ff2a620541f4aa623647b589fa diff --cc src/credential/gnunet-service-credential.c index 620256cd9,3ad2e2e1d..ed7d249e3 --- a/src/credential/gnunet-service-credential.c +++ b/src/credential/gnunet-service-credential.c @@@ -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 */