gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 38/171: - add signature check


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 38/171: - add signature check
Date: Thu, 04 Jan 2018 16:09:06 +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 68f5813fdac760d6bc8d832b298f2621bc0e7023
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Wed Dec 7 10:53:45 2016 +0100

    - add signature check
---
 src/credential/gnunet-service-credential.c      | 4 ++--
 src/credential/plugin_gnsrecord_credential.c    | 4 ++--
 src/credential/test_credential_verify_simple.sh | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/credential/gnunet-service-credential.c 
b/src/credential/gnunet-service-credential.c
index 4f06806d1..272ccebdf 100644
--- a/src/credential/gnunet-service-credential.c
+++ b/src/credential/gnunet-service-credential.c
@@ -434,7 +434,7 @@ handle_credential_query (void* cls,
     GNUNET_CONTAINER_DLL_insert_tail (vrh->cred_chain_head,
                                       vrh->cred_chain_tail,
                                       cr_entry);
-    /*if(GNUNET_OK != 
GNUNET_CRYPTO_ecdsa_verify(GNUNET_SIGNATURE_PURPOSE_CREDENTIAL, 
+    if(GNUNET_OK != 
GNUNET_CRYPTO_ecdsa_verify(GNUNET_SIGNATURE_PURPOSE_CREDENTIAL, 
                                                &crd->purpose,
                                                &crd->sig,
                                                &crd->issuer_key))
@@ -442,7 +442,7 @@ handle_credential_query (void* cls,
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   "Invalid credential found\n");
       continue;
-    }*/
+    }
     if (0 != memcmp (&crd->issuer_key,
                      &vrh->issuer_key,
                      sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)))
diff --git a/src/credential/plugin_gnsrecord_credential.c 
b/src/credential/plugin_gnsrecord_credential.c
index ff95ec119..90ac393d0 100644
--- a/src/credential/plugin_gnsrecord_credential.c
+++ b/src/credential/plugin_gnsrecord_credential.c
@@ -182,8 +182,8 @@ credential_string_to_value (void *cls,
         cred->sig = *sig;
         cred->expiration = GNUNET_htonll (etime_abs.abs_value_us);
         cred->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_CREDENTIAL);
-        cred->purpose.size = strlen (name) + 1 + sizeof (struct 
GNUNET_CRYPTO_EccSignaturePurpose) +
-                             sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + 
sizeof (uint64_t);
+        cred->purpose.size = htonl (strlen (name) + 1 + sizeof (struct 
GNUNET_CRYPTO_EccSignaturePurpose) +
+                             sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey) + 
sizeof (uint64_t));
         GNUNET_free (sig);
         GNUNET_memcpy (&cred[1],
                        name,
diff --git a/src/credential/test_credential_verify_simple.sh 
b/src/credential/test_credential_verify_simple.sh
index ce0a2207a..2fac4659e 100755
--- a/src/credential/test_credential_verify_simple.sh
+++ b/src/credential/test_credential_verify_simple.sh
@@ -19,7 +19,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS 
-o GNUNET_HOME -f`
 
 
 which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
-gnunet-arm -s -c test_credential_lookup.conf
+#gnunet-arm -s -c test_credential_lookup.conf
 gnunet-identity -C testissuer -c test_credential_lookup.conf
 gnunet-identity -C testsubject -c test_credential_lookup.conf
 
@@ -45,6 +45,6 @@ if [ "$RES_CRED" == "Successful." ]
 then
   exit 0
 else
-  echo "FAIL: Failed to verify credential $RES_IP."
+  echo "FAIL: Failed to verify credential."
   exit 1
 fi

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



reply via email to

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