removing GNUNET_CRYPTO_ecc_key_free, use GNUNET_free directly instead
authorChristian Grothoff <christian@grothoff.org>
Wed, 21 Aug 2013 15:34:18 +0000 (15:34 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 21 Aug 2013 15:34:18 +0000 (15:34 +0000)
50 files changed:
src/core/gnunet-service-core_kx.c
src/fs/fs_publish_ublock.c
src/fs/fs_uri.c
src/fs/test_fs_namespace.c
src/fs/test_fs_namespace_list_updateable.c
src/fs/test_pseudonym.c
src/gns/gnunet-gns-helper-service-w32.c
src/gns/gnunet-gns-proxy.c
src/gns/gnunet-gns.c
src/gns/test_gns_cname_lookup.c
src/gns/test_gns_dht_three_peers.c
src/gns/test_gns_max_queries.c
src/gns/test_gns_ns_lookup.c
src/gns/test_gns_proxy.c
src/gns/test_gns_pseu_shorten.c
src/gns/test_gns_revocation.c
src/gns/test_gns_simple_delegated_lookup.c
src/gns/test_gns_simple_lookup.c
src/gns/test_gns_simple_mx_lookup.c
src/gns/test_gns_simple_shorten.c
src/gns/test_gns_simple_srv_lookup.c
src/gns/test_gns_simple_zkey_lookup.c
src/identity/gnunet-service-identity.c
src/identity/identity_api.c
src/include/gnunet_crypto_lib.h
src/namestore/gnunet-namestore-fcfsd.c
src/namestore/test_namestore_api.c
src/namestore/test_namestore_api_create.c
src/namestore/test_namestore_api_create_update.c
src/namestore/test_namestore_api_lookup.c
src/namestore/test_namestore_api_lookup_specific_type.c
src/namestore/test_namestore_api_monitoring.c
src/namestore/test_namestore_api_put.c
src/namestore/test_namestore_api_remove.c
src/namestore/test_namestore_api_remove_not_existing_record.c
src/namestore/test_namestore_api_zone_iteration.c
src/namestore/test_namestore_api_zone_iteration_specific_zone.c
src/namestore/test_namestore_api_zone_iteration_stop.c
src/namestore/test_namestore_api_zone_to_name.c
src/nse/gnunet-service-nse.c
src/peerinfo-tool/gnunet-peerinfo.c
src/pt/test_gns_vpn.c
src/regex/gnunet-daemon-regexprofiler.c
src/regex/gnunet-service-regex.c
src/testing/gnunet-testing.c
src/testing/testing.c
src/transport/gnunet-service-transport.c
src/util/crypto_ecc.c
src/util/gnunet-ecc.c
src/util/test_crypto_ecc.c

index 4e216b905dc88f2eb8f89049ef6e08a7d1686949..9f904742dac12052952f8bf714f3548af7817ddd 100644 (file)
@@ -1518,7 +1518,7 @@ do_rekey (void *cls,
                                             &do_rekey,
                                             NULL);
   if (NULL != my_ephemeral_key)
-    GNUNET_CRYPTO_ecc_key_free (my_ephemeral_key);
+    GNUNET_free (my_ephemeral_key);
   my_ephemeral_key = GNUNET_CRYPTO_ecc_key_create ();
   GNUNET_assert (NULL != my_ephemeral_key);
   sign_ephemeral_key ();
@@ -1553,7 +1553,7 @@ GSC_KX_init (struct GNUNET_CRYPTO_EccPrivateKey *pk)
     if (NULL == my_ephemeral_key)
     {
       GNUNET_break (0);
-      GNUNET_CRYPTO_ecc_key_free (my_private_key);
+      GNUNET_free (my_private_key);
       my_private_key = NULL;
       return GNUNET_SYSERR;
     }
@@ -1586,12 +1586,12 @@ GSC_KX_done ()
   if ( (NULL != my_ephemeral_key) &&
        (my_ephemeral_key != my_private_key) )
   {
-    GNUNET_CRYPTO_ecc_key_free (my_ephemeral_key);
+    GNUNET_free (my_ephemeral_key);
     my_ephemeral_key = NULL;
   }
   if (NULL != my_private_key)
   {
-    GNUNET_CRYPTO_ecc_key_free (my_private_key);
+    GNUNET_free (my_private_key);
     my_private_key = NULL;
   }
   if (NULL != mst)
index 75446e8a8a27598a8344db6a99d1883a64c9c20f..e4580879339bc33beca0d2a1d96339ad3335404c 100644 (file)
@@ -252,7 +252,7 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
   GNUNET_CRYPTO_hash (&ub_enc->verification_key,
                      sizeof (ub_enc->verification_key),
                      &query);
-  GNUNET_CRYPTO_ecc_key_free (nsd);
+  GNUNET_free (nsd);
 
   uc = GNUNET_new (struct GNUNET_FS_PublishUblockContext);
   uc->cont = cont;
index 72704828d69b4292806036cd505d54aa72ac8f65..e35287beffb4faaf0acc01dda83baf3c41bde353 100644 (file)
@@ -936,7 +936,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CRYPTO_ecc_sign (my_private_key, &ass.purpose,
                                          &uri->data.loc.contentSignature));
-  GNUNET_CRYPTO_ecc_key_free (my_private_key);
+  GNUNET_free (my_private_key);
   return uri;
 }
 
index c8371f0b534e0f0d1a3542dc155e9ecb83e6f7e0..680d1b61be8456b1854a11373e1ec23add80b42d 100644 (file)
@@ -259,7 +259,7 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
   GNUNET_FS_publish_sks (fs, ns, "this", "next", meta, uri,
                          &bo, GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont, NULL);
   GNUNET_CONTAINER_meta_data_destroy (meta);
-  GNUNET_CRYPTO_ecc_key_free (ns);
+  GNUNET_free (ns);
 }
 
 
@@ -291,7 +291,7 @@ testNamespace ()
                                     NULL);
   GNUNET_FS_uri_destroy (ksk_uri);
   GNUNET_CONTAINER_meta_data_destroy (meta);
-  GNUNET_CRYPTO_ecc_key_free (ns);
+  GNUNET_free (ns);
 }
 
 
index ff662c9e6a8cfc3e1ab7596216bfad01891e6fd6..d42dfb7f42356bb9d9baf9f01a9b94f3258eab61 100644 (file)
@@ -59,7 +59,7 @@ do_shutdown ()
   if (uri_next != NULL)
     GNUNET_FS_uri_destroy (uri_next);
   if (ns != NULL)
-    GNUNET_CRYPTO_ecc_key_free (ns);
+    GNUNET_free (ns);
   if (meta != NULL)
     GNUNET_CONTAINER_meta_data_destroy (meta);
 }
index c3b459420ada3b0707586f984e92049b13a85939..56b9d9637ed84779ac00d9d9236fda1654e18e14 100644 (file)
@@ -86,7 +86,7 @@ create_pseu (struct GNUNET_CRYPTO_EccPublicKey *pseu)
 
   ph = GNUNET_CRYPTO_ecc_key_create ();
   GNUNET_CRYPTO_ecc_key_get_public (ph, pseu);
-  GNUNET_CRYPTO_ecc_key_free (ph);
+  GNUNET_free (ph);
 }
 
 
index e2e6ef31f27837dfb1f3d71f046d891e4a37e12c..2c4f0e20ab32599d8f2a955e41093ccfe6538dd6 100644 (file)
@@ -684,7 +684,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
       GNUNET_CRYPTO_hash_to_enc (&user_zone, &zonename);
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Using zone: %s!\n", &zonename);
-      GNUNET_CRYPTO_ecc_key_free(key);
+      GNUNET_free(key);
     }
     GNUNET_free(keyfile);
   }
index 1bb449197f2885ecd9b110be3b549086f6bf68a6..3a3678df1f5e039e25f18d37c56a0b99fc431989 100644 (file)
@@ -3219,7 +3219,7 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg)
   GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Using zone: %s!\n", &zonename);
-  GNUNET_CRYPTO_ecc_key_free(key);
+  GNUNET_free(key);
   GNUNET_free(keyfile);
   keyfile = NULL;
 
@@ -3247,7 +3247,7 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg)
     GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Using private zone: %s!\n", &zonename);
-    GNUNET_CRYPTO_ecc_key_free(key);
+    GNUNET_free(key);
     GNUNET_free(keyfile);
   }
   keyfile = NULL;
@@ -3276,7 +3276,7 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg)
     GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename);
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Using shorten zone: %s!\n", &zonename);
-    GNUNET_CRYPTO_ecc_key_free(key);
+    GNUNET_free(key);
     GNUNET_free(keyfile);
   }
 
index d58018d202798b2710e2d97cbae9ba05c813c148..c1944c1e234a6cd32385f06f3a18ff5be3c01379 100644 (file)
@@ -162,7 +162,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   /* FIXME: use identity service and/or allow user to specify public key! */
   key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
   GNUNET_CRYPTO_ecc_key_get_public (key, &pkey);
-  GNUNET_CRYPTO_ecc_key_free (key);  
+  GNUNET_free (key);  
   GNUNET_free (keyfile);
   
   if (GNUNET_OK != 
@@ -202,7 +202,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     return;
   }
   if (NULL != shorten_key)
-    GNUNET_CRYPTO_ecc_key_free (shorten_key);
+    GNUNET_free (shorten_key);
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
                                &do_shutdown, NULL);
 }
index cadb4e989bf23b068dbc6dacd617831ba282a3b6..4596ceed526e5a3ad23f1fa116f67e75c2db9cff 100644 (file)
@@ -429,8 +429,8 @@ do_check (void *cls,
                                            1, &rd,
                                            &commence_testing,
                                            NULL);
-  GNUNET_CRYPTO_ecc_key_free(alice_key);
-  GNUNET_CRYPTO_ecc_key_free(bob_key);
+  GNUNET_free(alice_key);
+  GNUNET_free(bob_key);
 }
 
 
index d9e1b76ca5ff2d43e881d2ec0df4282ea745a842..a763d9c064991d14347c73d288c27caceb3ce1e0 100644 (file)
@@ -339,7 +339,7 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg)
   if (NULL == nh[0])
   {
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n");
-    GNUNET_CRYPTO_ecc_key_free (key);
+    GNUNET_free (key);
     GNUNET_free (keyfile);
     return GNUNET_SYSERR;
   }
@@ -370,7 +370,7 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg)
                                            1, &rd, 
                                            &cont_ns, nh[0]);
 
-  GNUNET_CRYPTO_ecc_key_free(key);
+  GNUNET_free(key);
   GNUNET_free(keyfile);
   GNUNET_free(web);
   dave_is_setup = GNUNET_YES;
@@ -410,7 +410,7 @@ setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg)
   if (NULL == nh[1])
   {
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n");
-    GNUNET_CRYPTO_ecc_key_free (key);
+    GNUNET_free (key);
     GNUNET_free (keyfile);
     return GNUNET_SYSERR;
   }
@@ -428,7 +428,7 @@ setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg)
                                            1, &rd,
                                            &cont_ns, nh[1]);
 
-  GNUNET_CRYPTO_ecc_key_free(key);
+  GNUNET_free(key);
   GNUNET_free(keyfile);
   bob_is_setup = GNUNET_YES;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up bob done\n");
@@ -465,7 +465,7 @@ setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg)
   if (NULL == nh[2])
   {
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n");
-    GNUNET_CRYPTO_ecc_key_free (key);
+    GNUNET_free (key);
     GNUNET_free (keyfile);
     return GNUNET_SYSERR;
   }
@@ -485,12 +485,12 @@ setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg)
   if (NULL == gh)
   {
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to gns\n");
-    GNUNET_CRYPTO_ecc_key_free (key);
+    GNUNET_free (key);
     GNUNET_free (keyfile);
     return GNUNET_SYSERR;
   }
 
-  GNUNET_CRYPTO_ecc_key_free (key);
+  GNUNET_free (key);
   GNUNET_free (keyfile);
   alice_is_setup = GNUNET_YES;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up alice  done\n");
index 131d8cf8685e2fe22333cc72757ac38591036d2f..0644e8d8643948629feeaabba2755c9dcf72706a 100644 (file)
@@ -329,8 +329,8 @@ do_check (void *cls,
                                            &commence_testing,
                                            NULL);
   
-  GNUNET_CRYPTO_ecc_key_free(alice_key);
-  GNUNET_CRYPTO_ecc_key_free(bob_key);
+  GNUNET_free(alice_key);
+  GNUNET_free(bob_key);
   GNUNET_free(web);
 
 }
index 6a150e86a6b9a76ab950528a13567f696e771c01..862b4b31913d6f45f50fd6e5fae0d11dff42d8e2 100644 (file)
@@ -174,7 +174,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
   if (NULL != alice_key)
   {
-    GNUNET_CRYPTO_ecc_key_free (alice_key);
+    GNUNET_free (alice_key);
     alice_key = NULL;
   }
   GNUNET_break (0);
@@ -229,7 +229,7 @@ end_now (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
   if (NULL != alice_key)
   {
-    GNUNET_CRYPTO_ecc_key_free (alice_key);
+    GNUNET_free (alice_key);
     alice_key = NULL;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer!\n");
index bf31b3647706cf61712322366cb4e8fdcbb7ef4f..db1a1d413f2992a41baf1f8a1cbb55cb0d7b59df 100644 (file)
@@ -438,7 +438,7 @@ run (void *cls,
 
   GNUNET_free ((void**)rd.data);
   GNUNET_free (zone_keyfile);
-  GNUNET_CRYPTO_ecc_key_free (host_key);
+  GNUNET_free (host_key);
 }
 
 int
index c1fe64cb6a25661f796e44a2127a5c4ac1f80bb0..d51d2ea55660b30290b0bdcfd7af3a2ddd678cc8 100644 (file)
@@ -234,9 +234,9 @@ on_lookup_result (void *cls, uint32_t rd_count,
 static void
 commence_testing (void *cls, int success)
 {
-  GNUNET_CRYPTO_ecc_key_free(our_key);
-  GNUNET_CRYPTO_ecc_key_free(bob_key);
-  GNUNET_CRYPTO_ecc_key_free(alice_key);
+  GNUNET_free(our_key);
+  GNUNET_free(bob_key);
+  GNUNET_free(alice_key);
   GNUNET_NAMESTORE_disconnect (namestore_handle);
   namestore_handle = NULL;
   gns_handle = GNUNET_GNS_connect(cfg);
@@ -306,9 +306,9 @@ put_pseu_dht (void *cls, int success)
   {
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
     ok = 3;
-    GNUNET_CRYPTO_ecc_key_free(our_key);
-    GNUNET_CRYPTO_ecc_key_free(bob_key);
-    GNUNET_CRYPTO_ecc_key_free(alice_key);
+    GNUNET_free(our_key);
+    GNUNET_free(bob_key);
+    GNUNET_free(alice_key);
     GNUNET_free(sig);
     GNUNET_free (nrb);
     end_badly_now ();
@@ -394,9 +394,9 @@ put_www_dht (void *cls, int success)
   {
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
     ok = 3;
-    GNUNET_CRYPTO_ecc_key_free(our_key);
-    GNUNET_CRYPTO_ecc_key_free(bob_key);
-    GNUNET_CRYPTO_ecc_key_free(alice_key);
+    GNUNET_free(our_key);
+    GNUNET_free(bob_key);
+    GNUNET_free(alice_key);
     GNUNET_free (sig);
     GNUNET_free(web);
     GNUNET_free (nrb);
@@ -475,9 +475,9 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg)
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
     ok = 3;
     
-    GNUNET_CRYPTO_ecc_key_free (our_key);
-    GNUNET_CRYPTO_ecc_key_free (bob_key);
-    GNUNET_CRYPTO_ecc_key_free (alice_key);
+    GNUNET_free (our_key);
+    GNUNET_free (bob_key);
+    GNUNET_free (alice_key);
     GNUNET_free (sig);
     GNUNET_free (nrb);
     end_badly_now ();
index 2574dec28bae34b533ebb0011388ae80e31a4f5f..8467876dcb0e889dbeb9cd8cc447918bd7bc0b40 100644 (file)
@@ -264,8 +264,8 @@ do_check (void *cls,
   GNUNET_free (alice_keyfile);
   GNUNET_free (web);
   GNUNET_free (sig);
-  GNUNET_CRYPTO_ecc_key_free (bob_key);
-  GNUNET_CRYPTO_ecc_key_free (alice_key);
+  GNUNET_free (bob_key);
+  GNUNET_free (alice_key);
 }
 
 
index a57a2b5a71e6888e7ffcd11c85bce26024cde6f5..0b68cbb572211e2e7c326ed67eb50026a0b01515 100644 (file)
@@ -259,8 +259,8 @@ do_check (void *cls,
                                NULL);
   GNUNET_free (sig);
   GNUNET_free (alice_keyfile);
-  GNUNET_CRYPTO_ecc_key_free (bob_key);
-  GNUNET_CRYPTO_ecc_key_free (alice_key);
+  GNUNET_free (bob_key);
+  GNUNET_free (alice_key);
 }
 
 
index c8e7e3758df0624e5ada75ff58c644ecb89aacb6..44b221df08977edcf5bbe6335e5d02a37c4b881c 100644 (file)
@@ -266,7 +266,7 @@ do_check (void *cls,
                                                   1, &rd,
                                                   &commence_testing,
                                                   NULL);
-  GNUNET_CRYPTO_ecc_key_free (alice_key);
+  GNUNET_free (alice_key);
 }
 
 
index 7b57aeb6c9aa4fb8a6db923fba62d6542081b9fd..ed2d754bbfc7c94bcdab22c154b82a8c15dfd795 100644 (file)
@@ -282,8 +282,8 @@ do_check (void *cls,
   GNUNET_free (mx_record);
   GNUNET_free (mail);
   GNUNET_free (sig);
-  GNUNET_CRYPTO_ecc_key_free (bob_key);
-  GNUNET_CRYPTO_ecc_key_free (alice_key);
+  GNUNET_free (bob_key);
+  GNUNET_free (alice_key);
 }
 
 
index 87348f9f49bb5e92e35073552691bd47a92eb5b2..05adae2461c46e625a64ec84dd77fa0c1e9672e6 100644 (file)
@@ -319,11 +319,11 @@ void do_check (void *cls,
                                            NULL);
 
   GNUNET_free(web);
-  GNUNET_CRYPTO_ecc_key_free(our_key);
-  GNUNET_CRYPTO_ecc_key_free(bob_key);
-  GNUNET_CRYPTO_ecc_key_free(alice_key);
-  GNUNET_CRYPTO_ecc_key_free(priv_key);
-  GNUNET_CRYPTO_ecc_key_free(short_key);
+  GNUNET_free(our_key);
+  GNUNET_free(bob_key);
+  GNUNET_free(alice_key);
+  GNUNET_free(priv_key);
+  GNUNET_free(short_key);
 
 }
 
index 024d7fb31e0677009b97f16f7fbae20960b65bd2..f46410608ac561d6bc88b09d802aafa7d9150e66 100644 (file)
@@ -288,8 +288,8 @@ do_check (void *cls,
   GNUNET_free (srv_data);
   GNUNET_free (sipserver);
   GNUNET_free (sig);
-  GNUNET_CRYPTO_ecc_key_free (bob_key);
-  GNUNET_CRYPTO_ecc_key_free (alice_key);
+  GNUNET_free (bob_key);
+  GNUNET_free (alice_key);
 }
 
 
index 806655d3c33ecbc2cf54652b079c0136ca122025..f8bd48af898338275187f6dc33fab0b6a5a1161f 100644 (file)
@@ -273,8 +273,8 @@ do_check (void *cls,
   GNUNET_free (alice_keyfile);
   GNUNET_free (web);
   GNUNET_free (sig);
-  GNUNET_CRYPTO_ecc_key_free (bob_key);
-  GNUNET_CRYPTO_ecc_key_free (alice_key);
+  GNUNET_free (bob_key);
+  GNUNET_free (alice_key);
 }
 
 
index b9384ea6530e7defd410c4a3c35f5f319d7405f0..a8771f91d5baca5c9fa4704737562c75c666d2b1 100644 (file)
@@ -160,7 +160,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   while (NULL != (e = ego_head))
   {
     GNUNET_CONTAINER_DLL_remove (ego_head, ego_tail, e);
-    GNUNET_CRYPTO_ecc_key_free (e->pk);
+    GNUNET_free (e->pk);
     GNUNET_free (e);
   }
 }
@@ -779,7 +779,7 @@ handle_delete_message (void *cls, struct GNUNET_SERVER_Client *client,
       GNUNET_free (ego->identifier);
       ego->identifier = NULL;
       notify_listeners (ego);
-      GNUNET_CRYPTO_ecc_key_free (ego->pk);
+      GNUNET_free (ego->pk);
       GNUNET_free (ego);
       send_result_code (client, 0, NULL);
       GNUNET_SERVER_receive_done (client, GNUNET_OK);
index de1ce819e138310a4fc40c6e40052e5a0782ad49..d5035ba4980ce5458b76f26dab6fffaf18840c93 100644 (file)
@@ -368,7 +368,7 @@ message_handler (void *cls,
                     GNUNET_CONTAINER_multihashmap_remove (h->egos,
                                                           &ego->id,
                                                           ego));
-      GNUNET_CRYPTO_ecc_key_free (ego->pk);
+      GNUNET_free (ego->pk);
       GNUNET_free (ego->name);
       GNUNET_free (ego);
     }
@@ -730,7 +730,7 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id,
   if (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (struct GNUNET_IDENTITY_CreateRequestMessage))
   {
     GNUNET_break (0);
-    GNUNET_CRYPTO_ecc_key_free (pk);
+    GNUNET_free (pk);
     return NULL;
   }
   op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) +
@@ -753,7 +753,7 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id,
                                    op);
   if (NULL == id->th)
     transmit_next (id);
-  GNUNET_CRYPTO_ecc_key_free (pk);
+  GNUNET_free (pk);
   return op;
 }
 
@@ -924,7 +924,7 @@ free_ego (void *cls,
         ego,
         &ego->ctx,
         NULL);
-  GNUNET_CRYPTO_ecc_key_free (ego->pk);
+  GNUNET_free (ego->pk);
   GNUNET_free (ego->name);
   GNUNET_free (ego);
   return GNUNET_OK;
index 4133360a2be2bed924dc5db05a92e3fc408188df..502209b0f7591c04acde5460cd65ed50bed16e51 100644 (file)
@@ -757,16 +757,6 @@ typedef void (*GNUNET_CRYPTO_EccKeyCallback)(void *cls,
                                             const char *emsg);
 
 
-/**
- * @ingroup crypto
- * Free memory occupied by ECC key
- *
- * @param priv pointer to the memory to free
- */
-void
-GNUNET_CRYPTO_ecc_key_free (struct GNUNET_CRYPTO_EccPrivateKey *priv);
-
-
 /**
  * @ingroup crypto
  * Extract the public key for the given private key.
@@ -816,7 +806,7 @@ GNUNET_CRYPTO_ecc_public_key_from_string (const char *enc,
  *
  * @param filename name of file to use to store the key
  * @return new private key, NULL on error (for example,
- *   permission denied)
+ *   permission denied); free using #GNUNET_free
  */
 struct GNUNET_CRYPTO_EccPrivateKey *
 GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename);
@@ -828,7 +818,7 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename);
  * the file specified in the configuration.
  *
  * @return new private key, NULL on error (for example,
- *   permission denied)
+ *   permission denied); free using #GNUNET_free
  */
 struct GNUNET_CRYPTO_EccPrivateKey *
 GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg);
@@ -838,7 +828,7 @@ GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATI
  * @ingroup crypto
  * Create a new private key. Caller must free return value.
  *
- * @return fresh private key
+ * @return fresh private key; free using #GNUNET_free
  */
 struct GNUNET_CRYPTO_EccPrivateKey *
 GNUNET_CRYPTO_ecc_key_create (void);
@@ -848,7 +838,7 @@ GNUNET_CRYPTO_ecc_key_create (void);
  * @ingroup crypto
  * Get the shared private key we use for anonymous users.
  *
- * @return "anonymous" private key
+ * @return "anonymous" private key; do not free
  */
 const struct GNUNET_CRYPTO_EccPrivateKey *
 GNUNET_CRYPTO_ecc_key_get_anonymous (void);
index 8abb10f90e1f1bb4ae8616c3931ee3a73ef5f2e5..90ec84bde4164a3166b289eaa78384e4693cbbba 100644 (file)
@@ -869,7 +869,7 @@ do_shutdown (void *cls,
   }
   if (NULL != fcfs_zone_pkey)
   {
-    GNUNET_CRYPTO_ecc_key_free (fcfs_zone_pkey);
+    GNUNET_free (fcfs_zone_pkey);
     fcfs_zone_pkey = NULL;
   }
 }
index ede81eee4015d06ab449675a16ec6044b5542521..ac5cb5a9b14c13e07f34fc0bb41cdef93e7cd66e 100644 (file)
@@ -58,7 +58,7 @@ cleanup ()
   }
   if (NULL != privkey)
   {
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
     privkey = NULL;
   }
   GNUNET_SCHEDULER_shutdown ();
index 667bf0827c01e0f0931d97cc2807b666a1b0cf9f..cf9ad7de741f7e38c6556a490456a113a2367169 100644 (file)
@@ -78,7 +78,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   GNUNET_free_non_null (s_name);
   res = 1;
@@ -98,7 +98,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_free_non_null (s_second_record);
   GNUNET_free_non_null (s_name);
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
index 90d36ccb6834ed65d57c2545e3e578f1e311a9c5..977b2cfcf874e7326adf5e2520f030780cad42dc 100644 (file)
@@ -81,7 +81,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   GNUNET_free_non_null (s_name);
   res = 1;
@@ -100,7 +100,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_free (s_first_record);
   GNUNET_free_non_null (s_second_record);
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
index 24ef4c74e3865b9b029b520184a0915aaf1db53e..71ca02859664816219913512f9809518d9d07037 100644 (file)
@@ -70,7 +70,7 @@ cleanup ()
   }
   if (NULL != privkey)
   {
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
     privkey = NULL;
   }
   GNUNET_SCHEDULER_shutdown ();
index 1d084dbc1d283a6d377e5a954974c8b99516c5f4..03eee2b02e01912028d467dee84621c3e2992c17 100644 (file)
@@ -76,7 +76,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   GNUNET_free_non_null (s_name);
   res = 1;
@@ -100,7 +100,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_free (s_rd);
   GNUNET_free_non_null (s_name);
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
index f60116a79abcdd1960031684c02eddfaa13593a0..3f1224151d2390ab9a456e97366686066a82a4ce 100644 (file)
@@ -117,12 +117,12 @@ do_shutdown ()
 
   if (NULL != privkey)
   {
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
     privkey = NULL;
   }
   if (NULL != privkey2)
   {
-    GNUNET_CRYPTO_ecc_key_free (privkey2);
+    GNUNET_free (privkey2);
     privkey2 = NULL;
   }
 }
index ccbe8eefef66a74c383ea52dc3d0c60b4548bbd2..f5adc7d85e176f563cff150118637fbf6a9ebaaa 100644 (file)
@@ -66,7 +66,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   if (privkey != NULL)
   {
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
     privkey = NULL;
   }
   GNUNET_SCHEDULER_shutdown ();
@@ -85,7 +85,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   if (privkey != NULL)
   {
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
     privkey = NULL;
   }
   if (nsh != NULL)
index 19721f5a16ecdb45c0c94734376902dc5adea4a0..e666eac0e82b08270f110e47f2bee3d9337d9592 100644 (file)
@@ -77,7 +77,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   GNUNET_free_non_null (s_name);
   res = 1;
@@ -98,7 +98,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_free_non_null((void *) s_rd[c].data);
   GNUNET_free (s_rd);
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
index 6247ff3467e5fb04d879cc1ed7203b36dbda20e1..9e0b22ea51dc32fc5eab8e50d560f485e7e57e60 100644 (file)
@@ -77,7 +77,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   GNUNET_free_non_null (s_name);
   res = 1;
@@ -99,7 +99,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_free (s_rd);
 
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
index 036944e9a2fae6e8362af0386a72d9c71f2691ed..94515510a667a07d3dc1802e8f8a061aad2cf3b0 100644 (file)
@@ -117,11 +117,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
 
   if (privkey2 != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey2);
+    GNUNET_free (privkey2);
   privkey2 = NULL;
   res = 1;
 }
@@ -143,11 +143,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
 
   if (privkey2 != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey2);
+    GNUNET_free (privkey2);
   privkey2 = NULL;
 
   GNUNET_free (sig_1);
index d0db013b7bb778419f2c3f7b99dc25b3fdfaa3e2..453f09bb190045b3c458f4df79b04c200cefc109 100644 (file)
@@ -115,11 +115,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
 
   if (privkey2 != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey2);
+    GNUNET_free (privkey2);
   privkey2 = NULL;
   res = 1;
 }
@@ -139,10 +139,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     endbadly_task = GNUNET_SCHEDULER_NO_TASK;
   }
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   if (privkey2 != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey2);
+    GNUNET_free (privkey2);
   privkey2 = NULL;
 
   GNUNET_free (sig_1);
index abd7c2564fd1377df46eb2f6262c0087396745e3..f4face3147d77b6eee863dd86876fbf0b41fd420 100644 (file)
@@ -112,11 +112,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_free (s_rd_3);
   }
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
 
   if (privkey2 != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey2);
+    GNUNET_free (privkey2);
   privkey2 = NULL;
   res = 1;
 }
@@ -137,10 +137,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     endbadly_task = GNUNET_SCHEDULER_NO_TASK;
   }
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   if (privkey2 != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey2);
+    GNUNET_free (privkey2);
   privkey2 = NULL;
 
   GNUNET_free (sig_1);
index ea242c49ef6c94cc3eedec594e5a435661102ae7..5e6cf5a4e31bd8b5d4df86b9095b9877af4f2295 100644 (file)
@@ -73,7 +73,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   res = 1;
 }
@@ -88,7 +88,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     endbadly_task = GNUNET_SCHEDULER_NO_TASK;
   }
   if (privkey != NULL)
-    GNUNET_CRYPTO_ecc_key_free (privkey);
+    GNUNET_free (privkey);
   privkey = NULL;
   if (nsh != NULL)
     GNUNET_NAMESTORE_disconnect (nsh);
index 978712d53fc1cad15d5f8f623df0e70cd5d25f42..b26305ce37f60c2862596ea9d299644f56239831 100644 (file)
@@ -1325,7 +1325,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
   if (NULL != my_private_key)
   {
-    GNUNET_CRYPTO_ecc_key_free (my_private_key);
+    GNUNET_free (my_private_key);
     my_private_key = NULL;
   }
 #if ENABLE_NSE_HISTOGRAM
@@ -1471,7 +1471,7 @@ run (void *cls,
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 _
                 ("NSE service is lacking key configuration settings.  Exiting.\n"));
-    GNUNET_CRYPTO_ecc_key_free (my_private_key);
+    GNUNET_free (my_private_key);
     my_private_key = NULL;    
     GNUNET_SCHEDULER_shutdown ();
     return;
index d0f9edb068cc28f045f06afe7c8f4071492f0ac1..3d96f1043a1e3f34161daf2dc10edf19d11b1484 100644 (file)
@@ -678,7 +678,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     }
     GNUNET_free (fn);
     GNUNET_CRYPTO_ecc_key_get_public (priv, &my_public_key);
-    GNUNET_CRYPTO_ecc_key_free (priv);
+    GNUNET_free (priv);
     GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), &my_peer_identity.hashPubKey);
   }
 
index 1eeb1ec59182d4029e145f4cbfa2da6777c7141b..508de00ae08cdfb468d0b16e75ff052233ab6224 100644 (file)
@@ -410,7 +410,7 @@ run (void *cls,
   GNUNET_free ((void**)rd.data);
   GNUNET_free (rd_string);
   GNUNET_free (zone_keyfile);
-  GNUNET_CRYPTO_ecc_key_free (host_key);
+  GNUNET_free (host_key);
 }
 
 
index 86f7d451b45f17889536ba2973c0653131e09c63..685457973d9973872c77dbd4f7876bfd2f58d0b7 100644 (file)
@@ -124,7 +124,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_DHT_disconnect (dht_handle);
     dht_handle = NULL;
   }
-  GNUNET_CRYPTO_ecc_key_free (my_private_key);
+  GNUNET_free (my_private_key);
   my_private_key = NULL;
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
index e44d11b7d0a2d9bb38ae00bd5c1a5f0215ee0e33..22175331c6296033eba2640ce498561d9a2b2acc 100644 (file)
@@ -120,7 +120,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   stats = NULL;
   GNUNET_SERVER_notification_context_destroy (nc);
   nc = NULL;
-  GNUNET_CRYPTO_ecc_key_free (my_private_key);
+  GNUNET_free (my_private_key);
   my_private_key = NULL;
 }
 
@@ -371,7 +371,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
   dht = GNUNET_DHT_connect (cfg, 1024);
   if (NULL == dht)
   {
-    GNUNET_CRYPTO_ecc_key_free (my_private_key);
+    GNUNET_free (my_private_key);
     my_private_key = NULL;
     GNUNET_SCHEDULER_shutdown ();
     return;
index 45ca4978c70a5ce05f9c730af410d824224c7833..b3d3ac268192688f544b2ad2307552138759553c 100644 (file)
@@ -143,7 +143,7 @@ create_hostkeys (const unsigned int no)
   GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd));
   GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
                   "Wrote hostkey to file: `%s'\n", create_hostkey);
-  GNUNET_CRYPTO_ecc_key_free (pk);
+  GNUNET_free (pk);
   GNUNET_TESTING_system_destroy (system, GNUNET_YES);
   return 0;
 }
index 9e193bd9c641e3374439cf6d8809a6f665c391a4..db74f88979a5085f3172ac8bdd6c9b5362c7f52d 100644 (file)
@@ -1169,7 +1169,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
     goto err_ret;
   }  
   if (NULL != pk)
-    GNUNET_CRYPTO_ecc_key_free (pk);
+    GNUNET_free (pk);
   if (GNUNET_NO == 
       GNUNET_CONFIGURATION_have_value (cfg, "PEER", "PRIVATE_KEY"))
   {
@@ -1288,7 +1288,7 @@ GNUNET_TESTING_peer_get_identity (struct GNUNET_TESTING_Peer *peer,
     return;
   }
   peer->id = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity));
-  GNUNET_CRYPTO_ecc_key_free (GNUNET_TESTING_hostkey_get (peer->system,
+  GNUNET_free (GNUNET_TESTING_hostkey_get (peer->system,
                                                          peer->key_number,
                                                          peer->id));
   memcpy (id, peer->id, sizeof (struct GNUNET_PeerIdentity));
index 664c3e825f75c832ca32f0c9f37505c848676f17..50cd367d5751bd911eb1528f2c8d70df3851692c 100644 (file)
@@ -718,7 +718,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
   if (NULL != GST_my_private_key)
   {
-    GNUNET_CRYPTO_ecc_key_free (GST_my_private_key);
+    GNUNET_free (GST_my_private_key);
     GST_my_private_key = NULL;
   }
   GST_server = NULL;
index 89cbde922c07aa6047e2ff5e499d64d5e16c71c9..5ad0b81cb03c55200d682068eff26bd1c7c1a360 100644 (file)
 #define LOG_GCRY(level, cmd, rc) do { LOG(level, _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, gcry_strerror(rc)); } while(0);
 
 
-/**
- * Free memory occupied by ECC key
- *
- * @param priv pointer to the memory to free
- */
-void
-GNUNET_CRYPTO_ecc_key_free (struct GNUNET_CRYPTO_EccPrivateKey *priv)
-{
-  GNUNET_free (priv);
-}
-
-
 /**
  * Extract values from an S-expression.
  *
@@ -668,7 +656,7 @@ GNUNET_CRYPTO_ecc_setup_key (const char *cfg_name)
   (void) GNUNET_CONFIGURATION_load (cfg, cfg_name);
   priv = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg);
   if (NULL != priv)
-    GNUNET_CRYPTO_ecc_key_free (priv);
+    GNUNET_free (priv);
   GNUNET_CONFIGURATION_destroy (cfg);
 }
 
@@ -695,7 +683,7 @@ GNUNET_CRYPTO_get_host_identity (const struct GNUNET_CONFIGURATION_Handle *cfg,
     return GNUNET_SYSERR;
   }
   GNUNET_CRYPTO_ecc_key_get_public (priv, &pub);
-  GNUNET_CRYPTO_ecc_key_free (priv);
+  GNUNET_free (priv);
   GNUNET_CRYPTO_hash (&pub, sizeof (pub), &dst->hashPubKey);
   return GNUNET_OK;
 }
index 103f8eff25110f9e631f91df735ca3747f08eec9..4f20d3208f65cc29b6a762086655ba1d4b1c957e 100644 (file)
@@ -82,10 +82,10 @@ create_keys (const char *fn)
               _("\nFailed to write to `%s': %s\n"),
               fn,
               STRERROR (errno));
-      GNUNET_CRYPTO_ecc_key_free (pk);
+      GNUNET_free (pk);
       break;
     }
-    GNUNET_CRYPTO_ecc_key_free (pk);
+    GNUNET_free (pk);
   }
   if (UINT_MAX == make_keys)
     fprintf (stderr,
@@ -144,7 +144,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     GNUNET_CRYPTO_hash_to_enc (&pid.hashPubKey, &enc);
     fprintf (stdout, "%s\n", enc.encoding);
   }
-  GNUNET_CRYPTO_ecc_key_free (pk);
+  GNUNET_free (pk);
 }
 
 
index bb5fb002fc5a448cb6116a3a8eb04db82c2a3f2b..58a9816a26fde1f1c20c50d30f8895db6353ad16 100644 (file)
@@ -104,7 +104,7 @@ testDeriveSignVerify ()
   if (GNUNET_SYSERR == GNUNET_CRYPTO_ecc_sign (dpriv, &purp, &sig))
   {
     FPRINTF (stderr, "%s",  "GNUNET_CRYPTO_ecc_sign returned SYSERR\n");
-    GNUNET_CRYPTO_ecc_key_free (dpriv);
+    GNUNET_free (dpriv);
     return GNUNET_SYSERR;
   }
   if (GNUNET_SYSERR ==
@@ -113,7 +113,7 @@ testDeriveSignVerify ()
                                &dpub))
   {
     printf ("GNUNET_CRYPTO_ecc_verify failed!\n");
-    GNUNET_CRYPTO_ecc_key_free (dpriv);
+    GNUNET_free (dpriv);
     return GNUNET_SYSERR;
   }
   if (GNUNET_SYSERR !=
@@ -122,7 +122,7 @@ testDeriveSignVerify ()
                                &pkey))
   {
     printf ("GNUNET_CRYPTO_ecc_verify failed to fail!\n");
-    GNUNET_CRYPTO_ecc_key_free (dpriv);
+    GNUNET_free (dpriv);
     return GNUNET_SYSERR;
   }
   if (GNUNET_SYSERR !=
@@ -130,10 +130,10 @@ testDeriveSignVerify ()
                                &purp, &sig, &dpub))
   {
     printf ("GNUNET_CRYPTO_ecc_verify failed to fail!\n");
-    GNUNET_CRYPTO_ecc_key_free (dpriv);
+    GNUNET_free (dpriv);
     return GNUNET_SYSERR;
   }
-  GNUNET_CRYPTO_ecc_key_free (dpriv);
+  GNUNET_free (dpriv);
   return GNUNET_OK;
 }
 
@@ -183,18 +183,18 @@ testCreateFromFile ()
   key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE);
   GNUNET_assert (NULL != key);
   GNUNET_CRYPTO_ecc_key_get_public (key, &p1);
-  GNUNET_CRYPTO_ecc_key_free (key);
+  GNUNET_free (key);
   key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE);
   GNUNET_assert (NULL != key);
   GNUNET_CRYPTO_ecc_key_get_public (key, &p2);
   GNUNET_assert (0 == memcmp (&p1, &p2, sizeof (p1)));
-  GNUNET_CRYPTO_ecc_key_free (key);
+  GNUNET_free (key);
   GNUNET_assert (0 == UNLINK (KEYFILE));
   key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE);
   GNUNET_assert (NULL != key);
   GNUNET_CRYPTO_ecc_key_get_public (key, &p2);
   GNUNET_assert (0 != memcmp (&p1, &p2, sizeof (p1)));
-  GNUNET_CRYPTO_ecc_key_free (key);
+  GNUNET_free (key);
   return GNUNET_OK;
 }
 
@@ -217,8 +217,8 @@ test_ecdh ()
   GNUNET_CRYPTO_ecc_ecdh (priv2, &pub1, &ecdh2);
   GNUNET_assert (0 == memcmp (&ecdh1, &ecdh2,
                              sizeof (struct GNUNET_HashCode)));
-  GNUNET_CRYPTO_ecc_key_free (priv1);
-  GNUNET_CRYPTO_ecc_key_free (priv2);
+  GNUNET_free (priv1);
+  GNUNET_free (priv2);
 }
 
 
@@ -234,7 +234,7 @@ perf_keygen ()
   {
     fprintf (stderr, ".");
     pk = GNUNET_CRYPTO_ecc_key_create ();
-    GNUNET_CRYPTO_ecc_key_free (pk);
+    GNUNET_free (pk);
   }
   fprintf (stderr, "\n");
   printf ("Creating 10 ECC keys took %s\n",
@@ -270,7 +270,7 @@ main (int argc, char *argv[])
 #endif
   if (GNUNET_OK != testSignVerify ())
     failure_count++;
-  GNUNET_CRYPTO_ecc_key_free (key);
+  GNUNET_free (key);
   if (GNUNET_OK != testCreateFromFile ())
     failure_count++;
   GNUNET_assert (0 == UNLINK (KEYFILE));