-fix
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Sun, 9 Jul 2017 19:20:49 +0000 (21:20 +0200)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Sun, 9 Jul 2017 19:20:49 +0000 (21:20 +0200)
src/identity-provider/gnunet-service-identity-provider.c
src/identity-provider/test_idp.conf

index 0aaee93e528f87ef437c1ceb52fb5343f9a53ad1..1a6619227382c3180ec25c50287e5da6ebb21459 100644 (file)
@@ -527,7 +527,7 @@ serialize_abe_keyinfo (const struct IssueHandle *handle,
   char *enc_keyinfo;
   char *serialized_key;
   char *buf;
-  struct GNUNET_CRYPTO_EcdhePublicKey *ecdh_pubkey;
+  struct GNUNET_CRYPTO_EcdhePublicKey ecdh_pubkey;
   ssize_t size;
   
   struct GNUNET_CRYPTO_SymmetricSessionKey skey;
@@ -545,11 +545,10 @@ serialize_abe_keyinfo (const struct IssueHandle *handle,
                  serialized_key,
                  size);
   // ECDH keypair E = eG
-  ecdh_pubkey = NULL;
   *ecdh_privkey = GNUNET_CRYPTO_ecdhe_key_create();
   GNUNET_CRYPTO_ecdhe_key_get_public (*ecdh_privkey,
-                                      ecdh_pubkey);
-  enc_keyinfo = GNUNET_malloc (size);
+                                      &ecdh_pubkey);
+  enc_keyinfo = GNUNET_malloc (size + strlen (handle->scopes) + 1);
   // Derived key K = H(eB)
   GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_ecdh_ecdsa (*ecdh_privkey,
                                                         &handle->aud_key,
@@ -562,7 +561,7 @@ serialize_abe_keyinfo (const struct IssueHandle *handle,
   *result = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_EcdhePublicKey)+
                            enc_size);
   GNUNET_memcpy (*result,
-                 ecdh_pubkey,
+                 &ecdh_pubkey,
                  sizeof (struct GNUNET_CRYPTO_EcdhePublicKey));
   GNUNET_memcpy (*result + sizeof (struct GNUNET_CRYPTO_EcdhePublicKey),
                  enc_keyinfo,
@@ -1276,7 +1275,7 @@ handle_issue_message (void *cls,
                                        GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE);
   }
   GNUNET_free (scopes_tmp);
-  scopes_tmp = GNUNET_strdup (v_attrs);
+  /*scopes_tmp = GNUNET_strdup (v_attrs);
 
   for (scope = strtok (scopes_tmp, ","); NULL != scope; scope = strtok (NULL, ","))
   {
@@ -1286,7 +1285,7 @@ handle_issue_message (void *cls,
                                  issue_handle->v_attr_tail,
                                  vattr_entry);
   }
-  GNUNET_free (scopes_tmp);
+  GNUNET_free (scopes_tmp);*/
 
 
 
index b0b2c48266e0a8fc969b61fb01ffdff96cded3ee..a457bbe8f3f458d3daadc204e166ef2f143d3697 100644 (file)
@@ -6,6 +6,10 @@ GNUNET_TEST_HOME = /tmp/test-gnunet-idp-peer-1/
 [dht]
 AUTOSTART = YES
 
+[rest]
+AUTOSTART = YES
+PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/restlog
+
 [transport]
 PLUGINS =