gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 20/171: -fix compile


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 20/171: -fix compile
Date: Thu, 04 Jan 2018 16:08:48 +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 59f9630b8be3dcde087a4ef6956217704d0dacb4
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Fri Dec 2 15:57:58 2016 +0100

    -fix compile
---
 src/credential/gnunet-service-credential.c | 32 ++++++++++--------------------
 1 file changed, 11 insertions(+), 21 deletions(-)

diff --git a/src/credential/gnunet-service-credential.c 
b/src/credential/gnunet-service-credential.c
index ed7d249e3..aa3c02003 100644
--- a/src/credential/gnunet-service-credential.c
+++ b/src/credential/gnunet-service-credential.c
@@ -28,6 +28,7 @@
 #include "gnunet_statistics_service.h"
 #include "credential.h"
 #include "gnunet_protocols.h"
+#include "gnunet_signatures.h"
 
 // For Looking up GNS request
 #include <gnunet_dnsparser_lib.h>
@@ -83,8 +84,8 @@ struct AttributeRecordEntry
   /**
    *
    */
-  struct GNUNET_CREDENTIAL_AttributeDelegationRecordData;
-}
+  struct GNUNET_CREDENTIAL_AttributeRecordData record_data;
+};
 
 /**
  * Handle to a lookup operation from api
@@ -264,16 +265,10 @@ send_lookup_response (void* cls,
   struct GNUNET_MQ_Envelope *env;
   struct VerifyResultMessage *rmsg;
   const struct GNUNET_CREDENTIAL_CredentialRecordData *crd;
-  struct GNUNET_CREDENTIAL_AttributeDelegationRecordData *adrd;
   struct CredentialRecordEntry *cr_entry;
-  struct AttributeRecordEntry *attr_entry;
-  bool cred_verified;
+  int cred_verified;
 
   cred_record_count = 0;
-  adrd = GNUNET_CREDENTIAL_AttributeDelegationRecordData   
-  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)
@@ -294,22 +289,17 @@ send_lookup_response (void* cls,
                                       vrh->cred_chain_tail,
                                       cr_entry);
 
-    if(GNUNET_CRYPTO_ecdsa_verify(GNUNET_SIGNATURE_PURPOSE_CREDENTIAL, 
purpose, sig, issuer_key))
+    if(GNUNET_OK == 
GNUNET_CRYPTO_ecdsa_verify(GNUNET_SIGNATURE_PURPOSE_CREDENTIAL, 
+                                               &crd->purpose,
+                                               &crd->sig, &crd->issuer_key))
     {   
-      cred_verified = true;
+      cred_verified = GNUNET_YES;
       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
@@ -335,7 +325,7 @@ send_lookup_response (void* cls,
                              GNUNET_MESSAGE_TYPE_CREDENTIAL_VERIFY_RESULT);
   //Assign id so that client can find associated request
   rmsg->id = vrh->request_id;
-  rmsg->ad_count = htonl (attr_record_count);
+  rmsg->ad_count = htonl (cred_record_count);
 
   /**
    * Get serialized record data
@@ -343,10 +333,10 @@ send_lookup_response (void* cls,
    */
   i = 0;
   struct GNUNET_CREDENTIAL_CredentialRecordData *tmp_record = (struct 
GNUNET_CREDENTIAL_CredentialRecordData*) &rmsg[1];
-  for (ar_entry = vrh->attr_chain_head; NULL != ar_entry; ar_entry = 
ar_entry->next)
+  for (cr_entry = vrh->cred_chain_head; NULL != cr_entry; cr_entry = 
cr_entry->next)
   {
     memcpy (tmp_record,
-            &ar_entry->record_data,
+            &cr_entry->record_data,
             sizeof (struct GNUNET_CREDENTIAL_CredentialRecordData));
     tmp_record++;
   }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]