From: Adnan H Date: Mon, 5 Dec 2016 21:17:37 +0000 (+0100) Subject: Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials X-Git-Tag: gnunet-0.11.0rc0~24^2~130 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=38153c76241311666e9aa26f2cec534f62900c72;p=oweals%2Fgnunet.git Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials --- 38153c76241311666e9aa26f2cec534f62900c72 diff --cc src/credential/gnunet-service-credential.c index 047ea0075,20f6fe4e0..792d8741e --- a/src/credential/gnunet-service-credential.c +++ b/src/credential/gnunet-service-credential.c @@@ -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) @@@ -373,28 -306,7 +379,27 @@@ } + /** + * 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