[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 34/171: - minor fixes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 34/171: - minor fixes |
Date: |
Thu, 04 Jan 2018 16:09:02 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit c0ccc8d723c94c6f9dbde6ed1e0ee6579989750c
Author: Adnan H <address@hidden>
AuthorDate: Tue Dec 6 10:51:58 2016 +0100
- minor fixes
---
src/credential/gnunet-service-credential.c | 72 ++++++++++++++++--------------
1 file changed, 38 insertions(+), 34 deletions(-)
diff --git a/src/credential/gnunet-service-credential.c
b/src/credential/gnunet-service-credential.c
index 792d8741e..a4686e635 100644
--- a/src/credential/gnunet-service-credential.c
+++ b/src/credential/gnunet-service-credential.c
@@ -265,45 +265,46 @@ start_backward_resolution (void* cls,
struct CredentialRecordEntry *cred_pointer;
const char *attribute;
const char *cred_attribute;
- char *issuer_key;
- char *cred_issuer_key;
- const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key_ecdsa;
- const struct GNUNET_CRYPTO_EcdsaPublicKey *cred_issuer_key_ecdsa;
for(cred_pointer = vrh->cred_chain_head; cred_pointer != NULL;
cred_pointer = cred_pointer->next){
cred = &cred_pointer->record_data;
- issuer_key_ecdsa = &vrh->attr_pointer->record_data.subject_key;
- cred_issuer_key_ecdsa = &cred_pointer->record_data.issuer_key;
- issuer_key = GNUNET_CRYPTO_ecdsa_public_key_to_string(issuer_key_ecdsa);
- cred_issuer_key =
GNUNET_CRYPTO_ecdsa_public_key_to_string(cred_issuer_key_ecdsa);
- if(0 == strcmp(issuer_key,cred_issuer_key))
- {
+ if(0 == memcmp (&vrh->attr_pointer->record_data.subject_key,
+ &cred_pointer->record_data.issuer_key,
+ sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey))){
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Found issuer\n");
- }
+
+ }
+
+
+
}
-
-
+
+
//Start from next to head
- for(vrh->attr_pointer = vrh->attr_queue_head->next ; vrh->attr_pointer->next
!= NULL ;
- vrh->attr_pointer = vrh->attr_pointer->next ){
+ vrh->attr_pointer = vrh->attr_pointer->next;
+
+
+ if(vrh->attr_pointer->next != NULL){
//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);
+ vrh->lookup_request = 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);
}
+
}
/**
@@ -327,13 +328,14 @@ send_lookup_response (void* cls,
const struct GNUNET_CREDENTIAL_CredentialRecordData *crd;
struct GNUNET_CRYPTO_EccSignaturePurpose *purp;
struct CredentialRecordEntry *cr_entry;
+ uint32_t 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,
@@ -386,17 +388,19 @@ send_lookup_response (void* cls,
if(cred_verified != GNUNET_YES){
- vrh->attr_pointer = vrh->attr_queue_head;
+ vrh->attr_pointer = vrh->attr_pointer->next;
+ if(vrh->attr_pointer != NULL){
- //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);
+ //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);
+ }
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 03/171: - move towards verification, (continued)
- [GNUnet-SVN] [gnunet] 03/171: - move towards verification, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 14/171: -cleanup cli tool, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 22/171: -add issue test, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 24/171: -add tests, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 29/171: Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 36/171: -fix, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 26/171: - add signature to cred, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 28/171: - starting backward resolution, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 31/171: Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 41/171: - fix test, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 34/171: - minor fixes,
gnunet <=
- [GNUnet-SVN] [gnunet] 33/171: -fix, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 32/171: -add expiration to cred, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 42/171: -add confs, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 35/171: Merge branch 'credentials' of git+ssh://gnunet.org/gnunet into credentials, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 38/171: - add signature check, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 40/171: - add delegation resolution, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 44/171: - Add rest plugin for credential, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 30/171: - add better test for verification, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 37/171: - add simple verification, gnunet, 2018/01/04
- [GNUnet-SVN] [gnunet] 47/171: -fix memleaks, gnunet, 2018/01/04