summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/gnunet-service-core_kx.c8
-rw-r--r--src/fs/fs_publish_ublock.c2
-rw-r--r--src/fs/fs_uri.c2
-rw-r--r--src/fs/test_fs_namespace.c4
-rw-r--r--src/fs/test_fs_namespace_list_updateable.c2
-rw-r--r--src/fs/test_pseudonym.c2
-rw-r--r--src/gns/gnunet-gns-helper-service-w32.c2
-rw-r--r--src/gns/gnunet-gns-proxy.c6
-rw-r--r--src/gns/gnunet-gns.c4
-rw-r--r--src/gns/test_gns_cname_lookup.c4
-rw-r--r--src/gns/test_gns_dht_three_peers.c14
-rw-r--r--src/gns/test_gns_max_queries.c4
-rw-r--r--src/gns/test_gns_ns_lookup.c4
-rw-r--r--src/gns/test_gns_proxy.c2
-rw-r--r--src/gns/test_gns_pseu_shorten.c24
-rw-r--r--src/gns/test_gns_revocation.c4
-rw-r--r--src/gns/test_gns_simple_delegated_lookup.c4
-rw-r--r--src/gns/test_gns_simple_lookup.c2
-rw-r--r--src/gns/test_gns_simple_mx_lookup.c4
-rw-r--r--src/gns/test_gns_simple_shorten.c10
-rw-r--r--src/gns/test_gns_simple_srv_lookup.c4
-rw-r--r--src/gns/test_gns_simple_zkey_lookup.c4
-rw-r--r--src/identity/gnunet-service-identity.c4
-rw-r--r--src/identity/identity_api.c8
-rw-r--r--src/include/gnunet_crypto_lib.h18
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c2
-rw-r--r--src/namestore/test_namestore_api.c2
-rw-r--r--src/namestore/test_namestore_api_create.c4
-rw-r--r--src/namestore/test_namestore_api_create_update.c4
-rw-r--r--src/namestore/test_namestore_api_lookup.c2
-rw-r--r--src/namestore/test_namestore_api_lookup_specific_type.c4
-rw-r--r--src/namestore/test_namestore_api_monitoring.c4
-rw-r--r--src/namestore/test_namestore_api_put.c4
-rw-r--r--src/namestore/test_namestore_api_remove.c4
-rw-r--r--src/namestore/test_namestore_api_remove_not_existing_record.c4
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c8
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c8
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c8
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c4
-rw-r--r--src/nse/gnunet-service-nse.c4
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c2
-rw-r--r--src/pt/test_gns_vpn.c2
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c2
-rw-r--r--src/regex/gnunet-service-regex.c4
-rw-r--r--src/testing/gnunet-testing.c2
-rw-r--r--src/testing/testing.c4
-rw-r--r--src/transport/gnunet-service-transport.c2
-rw-r--r--src/util/crypto_ecc.c16
-rw-r--r--src/util/gnunet-ecc.c6
-rw-r--r--src/util/test_crypto_ecc.c24
50 files changed, 127 insertions, 149 deletions
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c
index 4e216b905..9f904742d 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -1518,7 +1518,7 @@ do_rekey (void *cls,
1518 &do_rekey, 1518 &do_rekey,
1519 NULL); 1519 NULL);
1520 if (NULL != my_ephemeral_key) 1520 if (NULL != my_ephemeral_key)
1521 GNUNET_CRYPTO_ecc_key_free (my_ephemeral_key); 1521 GNUNET_free (my_ephemeral_key);
1522 my_ephemeral_key = GNUNET_CRYPTO_ecc_key_create (); 1522 my_ephemeral_key = GNUNET_CRYPTO_ecc_key_create ();
1523 GNUNET_assert (NULL != my_ephemeral_key); 1523 GNUNET_assert (NULL != my_ephemeral_key);
1524 sign_ephemeral_key (); 1524 sign_ephemeral_key ();
@@ -1553,7 +1553,7 @@ GSC_KX_init (struct GNUNET_CRYPTO_EccPrivateKey *pk)
1553 if (NULL == my_ephemeral_key) 1553 if (NULL == my_ephemeral_key)
1554 { 1554 {
1555 GNUNET_break (0); 1555 GNUNET_break (0);
1556 GNUNET_CRYPTO_ecc_key_free (my_private_key); 1556 GNUNET_free (my_private_key);
1557 my_private_key = NULL; 1557 my_private_key = NULL;
1558 return GNUNET_SYSERR; 1558 return GNUNET_SYSERR;
1559 } 1559 }
@@ -1586,12 +1586,12 @@ GSC_KX_done ()
1586 if ( (NULL != my_ephemeral_key) && 1586 if ( (NULL != my_ephemeral_key) &&
1587 (my_ephemeral_key != my_private_key) ) 1587 (my_ephemeral_key != my_private_key) )
1588 { 1588 {
1589 GNUNET_CRYPTO_ecc_key_free (my_ephemeral_key); 1589 GNUNET_free (my_ephemeral_key);
1590 my_ephemeral_key = NULL; 1590 my_ephemeral_key = NULL;
1591 } 1591 }
1592 if (NULL != my_private_key) 1592 if (NULL != my_private_key)
1593 { 1593 {
1594 GNUNET_CRYPTO_ecc_key_free (my_private_key); 1594 GNUNET_free (my_private_key);
1595 my_private_key = NULL; 1595 my_private_key = NULL;
1596 } 1596 }
1597 if (NULL != mst) 1597 if (NULL != mst)
diff --git a/src/fs/fs_publish_ublock.c b/src/fs/fs_publish_ublock.c
index 75446e8a8..e45808793 100644
--- a/src/fs/fs_publish_ublock.c
+++ b/src/fs/fs_publish_ublock.c
@@ -252,7 +252,7 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
252 GNUNET_CRYPTO_hash (&ub_enc->verification_key, 252 GNUNET_CRYPTO_hash (&ub_enc->verification_key,
253 sizeof (ub_enc->verification_key), 253 sizeof (ub_enc->verification_key),
254 &query); 254 &query);
255 GNUNET_CRYPTO_ecc_key_free (nsd); 255 GNUNET_free (nsd);
256 256
257 uc = GNUNET_new (struct GNUNET_FS_PublishUblockContext); 257 uc = GNUNET_new (struct GNUNET_FS_PublishUblockContext);
258 uc->cont = cont; 258 uc->cont = cont;
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 72704828d..e35287bef 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -936,7 +936,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
936 GNUNET_assert (GNUNET_OK == 936 GNUNET_assert (GNUNET_OK ==
937 GNUNET_CRYPTO_ecc_sign (my_private_key, &ass.purpose, 937 GNUNET_CRYPTO_ecc_sign (my_private_key, &ass.purpose,
938 &uri->data.loc.contentSignature)); 938 &uri->data.loc.contentSignature));
939 GNUNET_CRYPTO_ecc_key_free (my_private_key); 939 GNUNET_free (my_private_key);
940 return uri; 940 return uri;
941} 941}
942 942
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c
index c8371f0b5..680d1b61b 100644
--- a/src/fs/test_fs_namespace.c
+++ b/src/fs/test_fs_namespace.c
@@ -259,7 +259,7 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
259 GNUNET_FS_publish_sks (fs, ns, "this", "next", meta, uri, 259 GNUNET_FS_publish_sks (fs, ns, "this", "next", meta, uri,
260 &bo, GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont, NULL); 260 &bo, GNUNET_FS_PUBLISH_OPTION_NONE, &sks_cont, NULL);
261 GNUNET_CONTAINER_meta_data_destroy (meta); 261 GNUNET_CONTAINER_meta_data_destroy (meta);
262 GNUNET_CRYPTO_ecc_key_free (ns); 262 GNUNET_free (ns);
263} 263}
264 264
265 265
@@ -291,7 +291,7 @@ testNamespace ()
291 NULL); 291 NULL);
292 GNUNET_FS_uri_destroy (ksk_uri); 292 GNUNET_FS_uri_destroy (ksk_uri);
293 GNUNET_CONTAINER_meta_data_destroy (meta); 293 GNUNET_CONTAINER_meta_data_destroy (meta);
294 GNUNET_CRYPTO_ecc_key_free (ns); 294 GNUNET_free (ns);
295} 295}
296 296
297 297
diff --git a/src/fs/test_fs_namespace_list_updateable.c b/src/fs/test_fs_namespace_list_updateable.c
index ff662c9e6..d42dfb7f4 100644
--- a/src/fs/test_fs_namespace_list_updateable.c
+++ b/src/fs/test_fs_namespace_list_updateable.c
@@ -59,7 +59,7 @@ do_shutdown ()
59 if (uri_next != NULL) 59 if (uri_next != NULL)
60 GNUNET_FS_uri_destroy (uri_next); 60 GNUNET_FS_uri_destroy (uri_next);
61 if (ns != NULL) 61 if (ns != NULL)
62 GNUNET_CRYPTO_ecc_key_free (ns); 62 GNUNET_free (ns);
63 if (meta != NULL) 63 if (meta != NULL)
64 GNUNET_CONTAINER_meta_data_destroy (meta); 64 GNUNET_CONTAINER_meta_data_destroy (meta);
65} 65}
diff --git a/src/fs/test_pseudonym.c b/src/fs/test_pseudonym.c
index c3b459420..56b9d9637 100644
--- a/src/fs/test_pseudonym.c
+++ b/src/fs/test_pseudonym.c
@@ -86,7 +86,7 @@ create_pseu (struct GNUNET_CRYPTO_EccPublicKey *pseu)
86 86
87 ph = GNUNET_CRYPTO_ecc_key_create (); 87 ph = GNUNET_CRYPTO_ecc_key_create ();
88 GNUNET_CRYPTO_ecc_key_get_public (ph, pseu); 88 GNUNET_CRYPTO_ecc_key_get_public (ph, pseu);
89 GNUNET_CRYPTO_ecc_key_free (ph); 89 GNUNET_free (ph);
90} 90}
91 91
92 92
diff --git a/src/gns/gnunet-gns-helper-service-w32.c b/src/gns/gnunet-gns-helper-service-w32.c
index e2e6ef31f..2c4f0e20a 100644
--- a/src/gns/gnunet-gns-helper-service-w32.c
+++ b/src/gns/gnunet-gns-helper-service-w32.c
@@ -684,7 +684,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
684 GNUNET_CRYPTO_hash_to_enc (&user_zone, &zonename); 684 GNUNET_CRYPTO_hash_to_enc (&user_zone, &zonename);
685 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 685 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
686 "Using zone: %s!\n", &zonename); 686 "Using zone: %s!\n", &zonename);
687 GNUNET_CRYPTO_ecc_key_free(key); 687 GNUNET_free(key);
688 } 688 }
689 GNUNET_free(keyfile); 689 GNUNET_free(keyfile);
690 } 690 }
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index 1bb449197..3a3678df1 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -3219,7 +3219,7 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg)
3219 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); 3219 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename);
3220 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3220 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3221 "Using zone: %s!\n", &zonename); 3221 "Using zone: %s!\n", &zonename);
3222 GNUNET_CRYPTO_ecc_key_free(key); 3222 GNUNET_free(key);
3223 GNUNET_free(keyfile); 3223 GNUNET_free(keyfile);
3224 keyfile = NULL; 3224 keyfile = NULL;
3225 3225
@@ -3247,7 +3247,7 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg)
3247 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); 3247 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename);
3248 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3248 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3249 "Using private zone: %s!\n", &zonename); 3249 "Using private zone: %s!\n", &zonename);
3250 GNUNET_CRYPTO_ecc_key_free(key); 3250 GNUNET_free(key);
3251 GNUNET_free(keyfile); 3251 GNUNET_free(keyfile);
3252 } 3252 }
3253 keyfile = NULL; 3253 keyfile = NULL;
@@ -3276,7 +3276,7 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg)
3276 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); 3276 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename);
3277 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3277 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3278 "Using shorten zone: %s!\n", &zonename); 3278 "Using shorten zone: %s!\n", &zonename);
3279 GNUNET_CRYPTO_ecc_key_free(key); 3279 GNUNET_free(key);
3280 GNUNET_free(keyfile); 3280 GNUNET_free(keyfile);
3281 } 3281 }
3282 3282
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c
index d58018d20..c1944c1e2 100644
--- a/src/gns/gnunet-gns.c
+++ b/src/gns/gnunet-gns.c
@@ -162,7 +162,7 @@ run (void *cls, char *const *args, const char *cfgfile,
162 /* FIXME: use identity service and/or allow user to specify public key! */ 162 /* FIXME: use identity service and/or allow user to specify public key! */
163 key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); 163 key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
164 GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); 164 GNUNET_CRYPTO_ecc_key_get_public (key, &pkey);
165 GNUNET_CRYPTO_ecc_key_free (key); 165 GNUNET_free (key);
166 GNUNET_free (keyfile); 166 GNUNET_free (keyfile);
167 167
168 if (GNUNET_OK != 168 if (GNUNET_OK !=
@@ -202,7 +202,7 @@ run (void *cls, char *const *args, const char *cfgfile,
202 return; 202 return;
203 } 203 }
204 if (NULL != shorten_key) 204 if (NULL != shorten_key)
205 GNUNET_CRYPTO_ecc_key_free (shorten_key); 205 GNUNET_free (shorten_key);
206 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, 206 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
207 &do_shutdown, NULL); 207 &do_shutdown, NULL);
208} 208}
diff --git a/src/gns/test_gns_cname_lookup.c b/src/gns/test_gns_cname_lookup.c
index cadb4e989..4596ceed5 100644
--- a/src/gns/test_gns_cname_lookup.c
+++ b/src/gns/test_gns_cname_lookup.c
@@ -429,8 +429,8 @@ do_check (void *cls,
429 1, &rd, 429 1, &rd,
430 &commence_testing, 430 &commence_testing,
431 NULL); 431 NULL);
432 GNUNET_CRYPTO_ecc_key_free(alice_key); 432 GNUNET_free(alice_key);
433 GNUNET_CRYPTO_ecc_key_free(bob_key); 433 GNUNET_free(bob_key);
434} 434}
435 435
436 436
diff --git a/src/gns/test_gns_dht_three_peers.c b/src/gns/test_gns_dht_three_peers.c
index d9e1b76ca..a763d9c06 100644
--- a/src/gns/test_gns_dht_three_peers.c
+++ b/src/gns/test_gns_dht_three_peers.c
@@ -339,7 +339,7 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg)
339 if (NULL == nh[0]) 339 if (NULL == nh[0])
340 { 340 {
341 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); 341 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n");
342 GNUNET_CRYPTO_ecc_key_free (key); 342 GNUNET_free (key);
343 GNUNET_free (keyfile); 343 GNUNET_free (keyfile);
344 return GNUNET_SYSERR; 344 return GNUNET_SYSERR;
345 } 345 }
@@ -370,7 +370,7 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg)
370 1, &rd, 370 1, &rd,
371 &cont_ns, nh[0]); 371 &cont_ns, nh[0]);
372 372
373 GNUNET_CRYPTO_ecc_key_free(key); 373 GNUNET_free(key);
374 GNUNET_free(keyfile); 374 GNUNET_free(keyfile);
375 GNUNET_free(web); 375 GNUNET_free(web);
376 dave_is_setup = GNUNET_YES; 376 dave_is_setup = GNUNET_YES;
@@ -410,7 +410,7 @@ setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg)
410 if (NULL == nh[1]) 410 if (NULL == nh[1])
411 { 411 {
412 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); 412 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n");
413 GNUNET_CRYPTO_ecc_key_free (key); 413 GNUNET_free (key);
414 GNUNET_free (keyfile); 414 GNUNET_free (keyfile);
415 return GNUNET_SYSERR; 415 return GNUNET_SYSERR;
416 } 416 }
@@ -428,7 +428,7 @@ setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg)
428 1, &rd, 428 1, &rd,
429 &cont_ns, nh[1]); 429 &cont_ns, nh[1]);
430 430
431 GNUNET_CRYPTO_ecc_key_free(key); 431 GNUNET_free(key);
432 GNUNET_free(keyfile); 432 GNUNET_free(keyfile);
433 bob_is_setup = GNUNET_YES; 433 bob_is_setup = GNUNET_YES;
434 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up bob done\n"); 434 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up bob done\n");
@@ -465,7 +465,7 @@ setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg)
465 if (NULL == nh[2]) 465 if (NULL == nh[2])
466 { 466 {
467 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); 467 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n");
468 GNUNET_CRYPTO_ecc_key_free (key); 468 GNUNET_free (key);
469 GNUNET_free (keyfile); 469 GNUNET_free (keyfile);
470 return GNUNET_SYSERR; 470 return GNUNET_SYSERR;
471 } 471 }
@@ -485,12 +485,12 @@ setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg)
485 if (NULL == gh) 485 if (NULL == gh)
486 { 486 {
487 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to gns\n"); 487 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to gns\n");
488 GNUNET_CRYPTO_ecc_key_free (key); 488 GNUNET_free (key);
489 GNUNET_free (keyfile); 489 GNUNET_free (keyfile);
490 return GNUNET_SYSERR; 490 return GNUNET_SYSERR;
491 } 491 }
492 492
493 GNUNET_CRYPTO_ecc_key_free (key); 493 GNUNET_free (key);
494 GNUNET_free (keyfile); 494 GNUNET_free (keyfile);
495 alice_is_setup = GNUNET_YES; 495 alice_is_setup = GNUNET_YES;
496 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up alice done\n"); 496 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up alice done\n");
diff --git a/src/gns/test_gns_max_queries.c b/src/gns/test_gns_max_queries.c
index 131d8cf86..0644e8d86 100644
--- a/src/gns/test_gns_max_queries.c
+++ b/src/gns/test_gns_max_queries.c
@@ -329,8 +329,8 @@ do_check (void *cls,
329 &commence_testing, 329 &commence_testing,
330 NULL); 330 NULL);
331 331
332 GNUNET_CRYPTO_ecc_key_free(alice_key); 332 GNUNET_free(alice_key);
333 GNUNET_CRYPTO_ecc_key_free(bob_key); 333 GNUNET_free(bob_key);
334 GNUNET_free(web); 334 GNUNET_free(web);
335 335
336} 336}
diff --git a/src/gns/test_gns_ns_lookup.c b/src/gns/test_gns_ns_lookup.c
index 6a150e86a..862b4b319 100644
--- a/src/gns/test_gns_ns_lookup.c
+++ b/src/gns/test_gns_ns_lookup.c
@@ -174,7 +174,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
174 } 174 }
175 if (NULL != alice_key) 175 if (NULL != alice_key)
176 { 176 {
177 GNUNET_CRYPTO_ecc_key_free (alice_key); 177 GNUNET_free (alice_key);
178 alice_key = NULL; 178 alice_key = NULL;
179 } 179 }
180 GNUNET_break (0); 180 GNUNET_break (0);
@@ -229,7 +229,7 @@ end_now (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
229 } 229 }
230 if (NULL != alice_key) 230 if (NULL != alice_key)
231 { 231 {
232 GNUNET_CRYPTO_ecc_key_free (alice_key); 232 GNUNET_free (alice_key);
233 alice_key = NULL; 233 alice_key = NULL;
234 } 234 }
235 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer!\n"); 235 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer!\n");
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c
index bf31b3647..db1a1d413 100644
--- a/src/gns/test_gns_proxy.c
+++ b/src/gns/test_gns_proxy.c
@@ -438,7 +438,7 @@ run (void *cls,
438 438
439 GNUNET_free ((void**)rd.data); 439 GNUNET_free ((void**)rd.data);
440 GNUNET_free (zone_keyfile); 440 GNUNET_free (zone_keyfile);
441 GNUNET_CRYPTO_ecc_key_free (host_key); 441 GNUNET_free (host_key);
442} 442}
443 443
444int 444int
diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c
index c1fe64cb6..d51d2ea55 100644
--- a/src/gns/test_gns_pseu_shorten.c
+++ b/src/gns/test_gns_pseu_shorten.c
@@ -234,9 +234,9 @@ on_lookup_result (void *cls, uint32_t rd_count,
234static void 234static void
235commence_testing (void *cls, int success) 235commence_testing (void *cls, int success)
236{ 236{
237 GNUNET_CRYPTO_ecc_key_free(our_key); 237 GNUNET_free(our_key);
238 GNUNET_CRYPTO_ecc_key_free(bob_key); 238 GNUNET_free(bob_key);
239 GNUNET_CRYPTO_ecc_key_free(alice_key); 239 GNUNET_free(alice_key);
240 GNUNET_NAMESTORE_disconnect (namestore_handle); 240 GNUNET_NAMESTORE_disconnect (namestore_handle);
241 namestore_handle = NULL; 241 namestore_handle = NULL;
242 gns_handle = GNUNET_GNS_connect(cfg); 242 gns_handle = GNUNET_GNS_connect(cfg);
@@ -306,9 +306,9 @@ put_pseu_dht (void *cls, int success)
306 { 306 {
307 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); 307 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
308 ok = 3; 308 ok = 3;
309 GNUNET_CRYPTO_ecc_key_free(our_key); 309 GNUNET_free(our_key);
310 GNUNET_CRYPTO_ecc_key_free(bob_key); 310 GNUNET_free(bob_key);
311 GNUNET_CRYPTO_ecc_key_free(alice_key); 311 GNUNET_free(alice_key);
312 GNUNET_free(sig); 312 GNUNET_free(sig);
313 GNUNET_free (nrb); 313 GNUNET_free (nrb);
314 end_badly_now (); 314 end_badly_now ();
@@ -394,9 +394,9 @@ put_www_dht (void *cls, int success)
394 { 394 {
395 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); 395 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
396 ok = 3; 396 ok = 3;
397 GNUNET_CRYPTO_ecc_key_free(our_key); 397 GNUNET_free(our_key);
398 GNUNET_CRYPTO_ecc_key_free(bob_key); 398 GNUNET_free(bob_key);
399 GNUNET_CRYPTO_ecc_key_free(alice_key); 399 GNUNET_free(alice_key);
400 GNUNET_free (sig); 400 GNUNET_free (sig);
401 GNUNET_free(web); 401 GNUNET_free(web);
402 GNUNET_free (nrb); 402 GNUNET_free (nrb);
@@ -475,9 +475,9 @@ put_pkey_dht (void *cls, int32_t success, const char *emsg)
475 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); 475 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n");
476 ok = 3; 476 ok = 3;
477 477
478 GNUNET_CRYPTO_ecc_key_free (our_key); 478 GNUNET_free (our_key);
479 GNUNET_CRYPTO_ecc_key_free (bob_key); 479 GNUNET_free (bob_key);
480 GNUNET_CRYPTO_ecc_key_free (alice_key); 480 GNUNET_free (alice_key);
481 GNUNET_free (sig); 481 GNUNET_free (sig);
482 GNUNET_free (nrb); 482 GNUNET_free (nrb);
483 end_badly_now (); 483 end_badly_now ();
diff --git a/src/gns/test_gns_revocation.c b/src/gns/test_gns_revocation.c
index 2574dec28..8467876dc 100644
--- a/src/gns/test_gns_revocation.c
+++ b/src/gns/test_gns_revocation.c
@@ -264,8 +264,8 @@ do_check (void *cls,
264 GNUNET_free (alice_keyfile); 264 GNUNET_free (alice_keyfile);
265 GNUNET_free (web); 265 GNUNET_free (web);
266 GNUNET_free (sig); 266 GNUNET_free (sig);
267 GNUNET_CRYPTO_ecc_key_free (bob_key); 267 GNUNET_free (bob_key);
268 GNUNET_CRYPTO_ecc_key_free (alice_key); 268 GNUNET_free (alice_key);
269} 269}
270 270
271 271
diff --git a/src/gns/test_gns_simple_delegated_lookup.c b/src/gns/test_gns_simple_delegated_lookup.c
index a57a2b5a7..0b68cbb57 100644
--- a/src/gns/test_gns_simple_delegated_lookup.c
+++ b/src/gns/test_gns_simple_delegated_lookup.c
@@ -259,8 +259,8 @@ do_check (void *cls,
259 NULL); 259 NULL);
260 GNUNET_free (sig); 260 GNUNET_free (sig);
261 GNUNET_free (alice_keyfile); 261 GNUNET_free (alice_keyfile);
262 GNUNET_CRYPTO_ecc_key_free (bob_key); 262 GNUNET_free (bob_key);
263 GNUNET_CRYPTO_ecc_key_free (alice_key); 263 GNUNET_free (alice_key);
264} 264}
265 265
266 266
diff --git a/src/gns/test_gns_simple_lookup.c b/src/gns/test_gns_simple_lookup.c
index c8e7e3758..44b221df0 100644
--- a/src/gns/test_gns_simple_lookup.c
+++ b/src/gns/test_gns_simple_lookup.c
@@ -266,7 +266,7 @@ do_check (void *cls,
266 1, &rd, 266 1, &rd,
267 &commence_testing, 267 &commence_testing,
268 NULL); 268 NULL);
269 GNUNET_CRYPTO_ecc_key_free (alice_key); 269 GNUNET_free (alice_key);
270} 270}
271 271
272 272
diff --git a/src/gns/test_gns_simple_mx_lookup.c b/src/gns/test_gns_simple_mx_lookup.c
index 7b57aeb6c..ed2d754bb 100644
--- a/src/gns/test_gns_simple_mx_lookup.c
+++ b/src/gns/test_gns_simple_mx_lookup.c
@@ -282,8 +282,8 @@ do_check (void *cls,
282 GNUNET_free (mx_record); 282 GNUNET_free (mx_record);
283 GNUNET_free (mail); 283 GNUNET_free (mail);
284 GNUNET_free (sig); 284 GNUNET_free (sig);
285 GNUNET_CRYPTO_ecc_key_free (bob_key); 285 GNUNET_free (bob_key);
286 GNUNET_CRYPTO_ecc_key_free (alice_key); 286 GNUNET_free (alice_key);
287} 287}
288 288
289 289
diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c
index 87348f9f4..05adae246 100644
--- a/src/gns/test_gns_simple_shorten.c
+++ b/src/gns/test_gns_simple_shorten.c
@@ -319,11 +319,11 @@ void do_check (void *cls,
319 NULL); 319 NULL);
320 320
321 GNUNET_free(web); 321 GNUNET_free(web);
322 GNUNET_CRYPTO_ecc_key_free(our_key); 322 GNUNET_free(our_key);
323 GNUNET_CRYPTO_ecc_key_free(bob_key); 323 GNUNET_free(bob_key);
324 GNUNET_CRYPTO_ecc_key_free(alice_key); 324 GNUNET_free(alice_key);
325 GNUNET_CRYPTO_ecc_key_free(priv_key); 325 GNUNET_free(priv_key);
326 GNUNET_CRYPTO_ecc_key_free(short_key); 326 GNUNET_free(short_key);
327 327
328} 328}
329 329
diff --git a/src/gns/test_gns_simple_srv_lookup.c b/src/gns/test_gns_simple_srv_lookup.c
index 024d7fb31..f46410608 100644
--- a/src/gns/test_gns_simple_srv_lookup.c
+++ b/src/gns/test_gns_simple_srv_lookup.c
@@ -288,8 +288,8 @@ do_check (void *cls,
288 GNUNET_free (srv_data); 288 GNUNET_free (srv_data);
289 GNUNET_free (sipserver); 289 GNUNET_free (sipserver);
290 GNUNET_free (sig); 290 GNUNET_free (sig);
291 GNUNET_CRYPTO_ecc_key_free (bob_key); 291 GNUNET_free (bob_key);
292 GNUNET_CRYPTO_ecc_key_free (alice_key); 292 GNUNET_free (alice_key);
293} 293}
294 294
295 295
diff --git a/src/gns/test_gns_simple_zkey_lookup.c b/src/gns/test_gns_simple_zkey_lookup.c
index 806655d3c..f8bd48af8 100644
--- a/src/gns/test_gns_simple_zkey_lookup.c
+++ b/src/gns/test_gns_simple_zkey_lookup.c
@@ -273,8 +273,8 @@ do_check (void *cls,
273 GNUNET_free (alice_keyfile); 273 GNUNET_free (alice_keyfile);
274 GNUNET_free (web); 274 GNUNET_free (web);
275 GNUNET_free (sig); 275 GNUNET_free (sig);
276 GNUNET_CRYPTO_ecc_key_free (bob_key); 276 GNUNET_free (bob_key);
277 GNUNET_CRYPTO_ecc_key_free (alice_key); 277 GNUNET_free (alice_key);
278} 278}
279 279
280 280
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c
index b9384ea65..a8771f91d 100644
--- a/src/identity/gnunet-service-identity.c
+++ b/src/identity/gnunet-service-identity.c
@@ -160,7 +160,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
160 while (NULL != (e = ego_head)) 160 while (NULL != (e = ego_head))
161 { 161 {
162 GNUNET_CONTAINER_DLL_remove (ego_head, ego_tail, e); 162 GNUNET_CONTAINER_DLL_remove (ego_head, ego_tail, e);
163 GNUNET_CRYPTO_ecc_key_free (e->pk); 163 GNUNET_free (e->pk);
164 GNUNET_free (e); 164 GNUNET_free (e);
165 } 165 }
166} 166}
@@ -779,7 +779,7 @@ handle_delete_message (void *cls, struct GNUNET_SERVER_Client *client,
779 GNUNET_free (ego->identifier); 779 GNUNET_free (ego->identifier);
780 ego->identifier = NULL; 780 ego->identifier = NULL;
781 notify_listeners (ego); 781 notify_listeners (ego);
782 GNUNET_CRYPTO_ecc_key_free (ego->pk); 782 GNUNET_free (ego->pk);
783 GNUNET_free (ego); 783 GNUNET_free (ego);
784 send_result_code (client, 0, NULL); 784 send_result_code (client, 0, NULL);
785 GNUNET_SERVER_receive_done (client, GNUNET_OK); 785 GNUNET_SERVER_receive_done (client, GNUNET_OK);
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index de1ce819e..d5035ba49 100644
--- a/src/identity/identity_api.c
+++ b/src/identity/identity_api.c
@@ -368,7 +368,7 @@ message_handler (void *cls,
368 GNUNET_CONTAINER_multihashmap_remove (h->egos, 368 GNUNET_CONTAINER_multihashmap_remove (h->egos,
369 &ego->id, 369 &ego->id,
370 ego)); 370 ego));
371 GNUNET_CRYPTO_ecc_key_free (ego->pk); 371 GNUNET_free (ego->pk);
372 GNUNET_free (ego->name); 372 GNUNET_free (ego->name);
373 GNUNET_free (ego); 373 GNUNET_free (ego);
374 } 374 }
@@ -730,7 +730,7 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id,
730 if (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (struct GNUNET_IDENTITY_CreateRequestMessage)) 730 if (slen >= GNUNET_SERVER_MAX_MESSAGE_SIZE - sizeof (struct GNUNET_IDENTITY_CreateRequestMessage))
731 { 731 {
732 GNUNET_break (0); 732 GNUNET_break (0);
733 GNUNET_CRYPTO_ecc_key_free (pk); 733 GNUNET_free (pk);
734 return NULL; 734 return NULL;
735 } 735 }
736 op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) + 736 op = GNUNET_malloc (sizeof (struct GNUNET_IDENTITY_Operation) +
@@ -753,7 +753,7 @@ GNUNET_IDENTITY_create (struct GNUNET_IDENTITY_Handle *id,
753 op); 753 op);
754 if (NULL == id->th) 754 if (NULL == id->th)
755 transmit_next (id); 755 transmit_next (id);
756 GNUNET_CRYPTO_ecc_key_free (pk); 756 GNUNET_free (pk);
757 return op; 757 return op;
758} 758}
759 759
@@ -924,7 +924,7 @@ free_ego (void *cls,
924 ego, 924 ego,
925 &ego->ctx, 925 &ego->ctx,
926 NULL); 926 NULL);
927 GNUNET_CRYPTO_ecc_key_free (ego->pk); 927 GNUNET_free (ego->pk);
928 GNUNET_free (ego->name); 928 GNUNET_free (ego->name);
929 GNUNET_free (ego); 929 GNUNET_free (ego);
930 return GNUNET_OK; 930 return GNUNET_OK;
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 4133360a2..502209b0f 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -759,16 +759,6 @@ typedef void (*GNUNET_CRYPTO_EccKeyCallback)(void *cls,
759 759
760/** 760/**
761 * @ingroup crypto 761 * @ingroup crypto
762 * Free memory occupied by ECC key
763 *
764 * @param priv pointer to the memory to free
765 */
766void
767GNUNET_CRYPTO_ecc_key_free (struct GNUNET_CRYPTO_EccPrivateKey *priv);
768
769
770/**
771 * @ingroup crypto
772 * Extract the public key for the given private key. 762 * Extract the public key for the given private key.
773 * 763 *
774 * @param priv the private key 764 * @param priv the private key
@@ -816,7 +806,7 @@ GNUNET_CRYPTO_ecc_public_key_from_string (const char *enc,
816 * 806 *
817 * @param filename name of file to use to store the key 807 * @param filename name of file to use to store the key
818 * @return new private key, NULL on error (for example, 808 * @return new private key, NULL on error (for example,
819 * permission denied) 809 * permission denied); free using #GNUNET_free
820 */ 810 */
821struct GNUNET_CRYPTO_EccPrivateKey * 811struct GNUNET_CRYPTO_EccPrivateKey *
822GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename); 812GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename);
@@ -828,7 +818,7 @@ GNUNET_CRYPTO_ecc_key_create_from_file (const char *filename);
828 * the file specified in the configuration. 818 * the file specified in the configuration.
829 * 819 *
830 * @return new private key, NULL on error (for example, 820 * @return new private key, NULL on error (for example,
831 * permission denied) 821 * permission denied); free using #GNUNET_free
832 */ 822 */
833struct GNUNET_CRYPTO_EccPrivateKey * 823struct GNUNET_CRYPTO_EccPrivateKey *
834GNUNET_CRYPTO_ecc_key_create_from_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg); 824GNUNET_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
838 * @ingroup crypto 828 * @ingroup crypto
839 * Create a new private key. Caller must free return value. 829 * Create a new private key. Caller must free return value.
840 * 830 *
841 * @return fresh private key 831 * @return fresh private key; free using #GNUNET_free
842 */ 832 */
843struct GNUNET_CRYPTO_EccPrivateKey * 833struct GNUNET_CRYPTO_EccPrivateKey *
844GNUNET_CRYPTO_ecc_key_create (void); 834GNUNET_CRYPTO_ecc_key_create (void);
@@ -848,7 +838,7 @@ GNUNET_CRYPTO_ecc_key_create (void);
848 * @ingroup crypto 838 * @ingroup crypto
849 * Get the shared private key we use for anonymous users. 839 * Get the shared private key we use for anonymous users.
850 * 840 *
851 * @return "anonymous" private key 841 * @return "anonymous" private key; do not free
852 */ 842 */
853const struct GNUNET_CRYPTO_EccPrivateKey * 843const struct GNUNET_CRYPTO_EccPrivateKey *
854GNUNET_CRYPTO_ecc_key_get_anonymous (void); 844GNUNET_CRYPTO_ecc_key_get_anonymous (void);
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c
index 8abb10f90..90ec84bde 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -869,7 +869,7 @@ do_shutdown (void *cls,
869 } 869 }
870 if (NULL != fcfs_zone_pkey) 870 if (NULL != fcfs_zone_pkey)
871 { 871 {
872 GNUNET_CRYPTO_ecc_key_free (fcfs_zone_pkey); 872 GNUNET_free (fcfs_zone_pkey);
873 fcfs_zone_pkey = NULL; 873 fcfs_zone_pkey = NULL;
874 } 874 }
875} 875}
diff --git a/src/namestore/test_namestore_api.c b/src/namestore/test_namestore_api.c
index ede81eee4..ac5cb5a9b 100644
--- a/src/namestore/test_namestore_api.c
+++ b/src/namestore/test_namestore_api.c
@@ -58,7 +58,7 @@ cleanup ()
58 } 58 }
59 if (NULL != privkey) 59 if (NULL != privkey)
60 { 60 {
61 GNUNET_CRYPTO_ecc_key_free (privkey); 61 GNUNET_free (privkey);
62 privkey = NULL; 62 privkey = NULL;
63 } 63 }
64 GNUNET_SCHEDULER_shutdown (); 64 GNUNET_SCHEDULER_shutdown ();
diff --git a/src/namestore/test_namestore_api_create.c b/src/namestore/test_namestore_api_create.c
index 667bf0827..cf9ad7de7 100644
--- a/src/namestore/test_namestore_api_create.c
+++ b/src/namestore/test_namestore_api_create.c
@@ -78,7 +78,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
78 GNUNET_NAMESTORE_disconnect (nsh); 78 GNUNET_NAMESTORE_disconnect (nsh);
79 nsh = NULL; 79 nsh = NULL;
80 if (privkey != NULL) 80 if (privkey != NULL)
81 GNUNET_CRYPTO_ecc_key_free (privkey); 81 GNUNET_free (privkey);
82 privkey = NULL; 82 privkey = NULL;
83 GNUNET_free_non_null (s_name); 83 GNUNET_free_non_null (s_name);
84 res = 1; 84 res = 1;
@@ -98,7 +98,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
98 GNUNET_free_non_null (s_second_record); 98 GNUNET_free_non_null (s_second_record);
99 GNUNET_free_non_null (s_name); 99 GNUNET_free_non_null (s_name);
100 if (privkey != NULL) 100 if (privkey != NULL)
101 GNUNET_CRYPTO_ecc_key_free (privkey); 101 GNUNET_free (privkey);
102 privkey = NULL; 102 privkey = NULL;
103 if (nsh != NULL) 103 if (nsh != NULL)
104 GNUNET_NAMESTORE_disconnect (nsh); 104 GNUNET_NAMESTORE_disconnect (nsh);
diff --git a/src/namestore/test_namestore_api_create_update.c b/src/namestore/test_namestore_api_create_update.c
index 90d36ccb6..977b2cfcf 100644
--- a/src/namestore/test_namestore_api_create_update.c
+++ b/src/namestore/test_namestore_api_create_update.c
@@ -81,7 +81,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
81 GNUNET_NAMESTORE_disconnect (nsh); 81 GNUNET_NAMESTORE_disconnect (nsh);
82 nsh = NULL; 82 nsh = NULL;
83 if (privkey != NULL) 83 if (privkey != NULL)
84 GNUNET_CRYPTO_ecc_key_free (privkey); 84 GNUNET_free (privkey);
85 privkey = NULL; 85 privkey = NULL;
86 GNUNET_free_non_null (s_name); 86 GNUNET_free_non_null (s_name);
87 res = 1; 87 res = 1;
@@ -100,7 +100,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
100 GNUNET_free (s_first_record); 100 GNUNET_free (s_first_record);
101 GNUNET_free_non_null (s_second_record); 101 GNUNET_free_non_null (s_second_record);
102 if (privkey != NULL) 102 if (privkey != NULL)
103 GNUNET_CRYPTO_ecc_key_free (privkey); 103 GNUNET_free (privkey);
104 privkey = NULL; 104 privkey = NULL;
105 if (nsh != NULL) 105 if (nsh != NULL)
106 GNUNET_NAMESTORE_disconnect (nsh); 106 GNUNET_NAMESTORE_disconnect (nsh);
diff --git a/src/namestore/test_namestore_api_lookup.c b/src/namestore/test_namestore_api_lookup.c
index 24ef4c74e..71ca02859 100644
--- a/src/namestore/test_namestore_api_lookup.c
+++ b/src/namestore/test_namestore_api_lookup.c
@@ -70,7 +70,7 @@ cleanup ()
70 } 70 }
71 if (NULL != privkey) 71 if (NULL != privkey)
72 { 72 {
73 GNUNET_CRYPTO_ecc_key_free (privkey); 73 GNUNET_free (privkey);
74 privkey = NULL; 74 privkey = NULL;
75 } 75 }
76 GNUNET_SCHEDULER_shutdown (); 76 GNUNET_SCHEDULER_shutdown ();
diff --git a/src/namestore/test_namestore_api_lookup_specific_type.c b/src/namestore/test_namestore_api_lookup_specific_type.c
index 1d084dbc1..03eee2b02 100644
--- a/src/namestore/test_namestore_api_lookup_specific_type.c
+++ b/src/namestore/test_namestore_api_lookup_specific_type.c
@@ -76,7 +76,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
76 GNUNET_NAMESTORE_disconnect (nsh); 76 GNUNET_NAMESTORE_disconnect (nsh);
77 nsh = NULL; 77 nsh = NULL;
78 if (privkey != NULL) 78 if (privkey != NULL)
79 GNUNET_CRYPTO_ecc_key_free (privkey); 79 GNUNET_free (privkey);
80 privkey = NULL; 80 privkey = NULL;
81 GNUNET_free_non_null (s_name); 81 GNUNET_free_non_null (s_name);
82 res = 1; 82 res = 1;
@@ -100,7 +100,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
100 GNUNET_free (s_rd); 100 GNUNET_free (s_rd);
101 GNUNET_free_non_null (s_name); 101 GNUNET_free_non_null (s_name);
102 if (privkey != NULL) 102 if (privkey != NULL)
103 GNUNET_CRYPTO_ecc_key_free (privkey); 103 GNUNET_free (privkey);
104 privkey = NULL; 104 privkey = NULL;
105 if (nsh != NULL) 105 if (nsh != NULL)
106 GNUNET_NAMESTORE_disconnect (nsh); 106 GNUNET_NAMESTORE_disconnect (nsh);
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index f60116a79..3f1224151 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -117,12 +117,12 @@ do_shutdown ()
117 117
118 if (NULL != privkey) 118 if (NULL != privkey)
119 { 119 {
120 GNUNET_CRYPTO_ecc_key_free (privkey); 120 GNUNET_free (privkey);
121 privkey = NULL; 121 privkey = NULL;
122 } 122 }
123 if (NULL != privkey2) 123 if (NULL != privkey2)
124 { 124 {
125 GNUNET_CRYPTO_ecc_key_free (privkey2); 125 GNUNET_free (privkey2);
126 privkey2 = NULL; 126 privkey2 = NULL;
127 } 127 }
128} 128}
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c
index ccbe8eefe..f5adc7d85 100644
--- a/src/namestore/test_namestore_api_put.c
+++ b/src/namestore/test_namestore_api_put.c
@@ -66,7 +66,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
66 66
67 if (privkey != NULL) 67 if (privkey != NULL)
68 { 68 {
69 GNUNET_CRYPTO_ecc_key_free (privkey); 69 GNUNET_free (privkey);
70 privkey = NULL; 70 privkey = NULL;
71 } 71 }
72 GNUNET_SCHEDULER_shutdown (); 72 GNUNET_SCHEDULER_shutdown ();
@@ -85,7 +85,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
85 85
86 if (privkey != NULL) 86 if (privkey != NULL)
87 { 87 {
88 GNUNET_CRYPTO_ecc_key_free (privkey); 88 GNUNET_free (privkey);
89 privkey = NULL; 89 privkey = NULL;
90 } 90 }
91 if (nsh != NULL) 91 if (nsh != NULL)
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c
index 19721f5a1..e666eac0e 100644
--- a/src/namestore/test_namestore_api_remove.c
+++ b/src/namestore/test_namestore_api_remove.c
@@ -77,7 +77,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
77 GNUNET_NAMESTORE_disconnect (nsh); 77 GNUNET_NAMESTORE_disconnect (nsh);
78 nsh = NULL; 78 nsh = NULL;
79 if (privkey != NULL) 79 if (privkey != NULL)
80 GNUNET_CRYPTO_ecc_key_free (privkey); 80 GNUNET_free (privkey);
81 privkey = NULL; 81 privkey = NULL;
82 GNUNET_free_non_null (s_name); 82 GNUNET_free_non_null (s_name);
83 res = 1; 83 res = 1;
@@ -98,7 +98,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
98 GNUNET_free_non_null((void *) s_rd[c].data); 98 GNUNET_free_non_null((void *) s_rd[c].data);
99 GNUNET_free (s_rd); 99 GNUNET_free (s_rd);
100 if (privkey != NULL) 100 if (privkey != NULL)
101 GNUNET_CRYPTO_ecc_key_free (privkey); 101 GNUNET_free (privkey);
102 privkey = NULL; 102 privkey = NULL;
103 if (nsh != NULL) 103 if (nsh != NULL)
104 GNUNET_NAMESTORE_disconnect (nsh); 104 GNUNET_NAMESTORE_disconnect (nsh);
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c
index 6247ff346..9e0b22ea5 100644
--- a/src/namestore/test_namestore_api_remove_not_existing_record.c
+++ b/src/namestore/test_namestore_api_remove_not_existing_record.c
@@ -77,7 +77,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
77 GNUNET_NAMESTORE_disconnect (nsh); 77 GNUNET_NAMESTORE_disconnect (nsh);
78 nsh = NULL; 78 nsh = NULL;
79 if (privkey != NULL) 79 if (privkey != NULL)
80 GNUNET_CRYPTO_ecc_key_free (privkey); 80 GNUNET_free (privkey);
81 privkey = NULL; 81 privkey = NULL;
82 GNUNET_free_non_null (s_name); 82 GNUNET_free_non_null (s_name);
83 res = 1; 83 res = 1;
@@ -99,7 +99,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
99 GNUNET_free (s_rd); 99 GNUNET_free (s_rd);
100 100
101 if (privkey != NULL) 101 if (privkey != NULL)
102 GNUNET_CRYPTO_ecc_key_free (privkey); 102 GNUNET_free (privkey);
103 privkey = NULL; 103 privkey = NULL;
104 if (nsh != NULL) 104 if (nsh != NULL)
105 GNUNET_NAMESTORE_disconnect (nsh); 105 GNUNET_NAMESTORE_disconnect (nsh);
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index 036944e9a..94515510a 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -117,11 +117,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
117 } 117 }
118 118
119 if (privkey != NULL) 119 if (privkey != NULL)
120 GNUNET_CRYPTO_ecc_key_free (privkey); 120 GNUNET_free (privkey);
121 privkey = NULL; 121 privkey = NULL;
122 122
123 if (privkey2 != NULL) 123 if (privkey2 != NULL)
124 GNUNET_CRYPTO_ecc_key_free (privkey2); 124 GNUNET_free (privkey2);
125 privkey2 = NULL; 125 privkey2 = NULL;
126 res = 1; 126 res = 1;
127} 127}
@@ -143,11 +143,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
143 } 143 }
144 144
145 if (privkey != NULL) 145 if (privkey != NULL)
146 GNUNET_CRYPTO_ecc_key_free (privkey); 146 GNUNET_free (privkey);
147 privkey = NULL; 147 privkey = NULL;
148 148
149 if (privkey2 != NULL) 149 if (privkey2 != NULL)
150 GNUNET_CRYPTO_ecc_key_free (privkey2); 150 GNUNET_free (privkey2);
151 privkey2 = NULL; 151 privkey2 = NULL;
152 152
153 GNUNET_free (sig_1); 153 GNUNET_free (sig_1);
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index d0db013b7..453f09bb1 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -115,11 +115,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
115 } 115 }
116 116
117 if (privkey != NULL) 117 if (privkey != NULL)
118 GNUNET_CRYPTO_ecc_key_free (privkey); 118 GNUNET_free (privkey);
119 privkey = NULL; 119 privkey = NULL;
120 120
121 if (privkey2 != NULL) 121 if (privkey2 != NULL)
122 GNUNET_CRYPTO_ecc_key_free (privkey2); 122 GNUNET_free (privkey2);
123 privkey2 = NULL; 123 privkey2 = NULL;
124 res = 1; 124 res = 1;
125} 125}
@@ -139,10 +139,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
139 endbadly_task = GNUNET_SCHEDULER_NO_TASK; 139 endbadly_task = GNUNET_SCHEDULER_NO_TASK;
140 } 140 }
141 if (privkey != NULL) 141 if (privkey != NULL)
142 GNUNET_CRYPTO_ecc_key_free (privkey); 142 GNUNET_free (privkey);
143 privkey = NULL; 143 privkey = NULL;
144 if (privkey2 != NULL) 144 if (privkey2 != NULL)
145 GNUNET_CRYPTO_ecc_key_free (privkey2); 145 GNUNET_free (privkey2);
146 privkey2 = NULL; 146 privkey2 = NULL;
147 147
148 GNUNET_free (sig_1); 148 GNUNET_free (sig_1);
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index abd7c2564..f4face314 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -112,11 +112,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
112 GNUNET_free (s_rd_3); 112 GNUNET_free (s_rd_3);
113 } 113 }
114 if (privkey != NULL) 114 if (privkey != NULL)
115 GNUNET_CRYPTO_ecc_key_free (privkey); 115 GNUNET_free (privkey);
116 privkey = NULL; 116 privkey = NULL;
117 117
118 if (privkey2 != NULL) 118 if (privkey2 != NULL)
119 GNUNET_CRYPTO_ecc_key_free (privkey2); 119 GNUNET_free (privkey2);
120 privkey2 = NULL; 120 privkey2 = NULL;
121 res = 1; 121 res = 1;
122} 122}
@@ -137,10 +137,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
137 endbadly_task = GNUNET_SCHEDULER_NO_TASK; 137 endbadly_task = GNUNET_SCHEDULER_NO_TASK;
138 } 138 }
139 if (privkey != NULL) 139 if (privkey != NULL)
140 GNUNET_CRYPTO_ecc_key_free (privkey); 140 GNUNET_free (privkey);
141 privkey = NULL; 141 privkey = NULL;
142 if (privkey2 != NULL) 142 if (privkey2 != NULL)
143 GNUNET_CRYPTO_ecc_key_free (privkey2); 143 GNUNET_free (privkey2);
144 privkey2 = NULL; 144 privkey2 = NULL;
145 145
146 GNUNET_free (sig_1); 146 GNUNET_free (sig_1);
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index ea242c49e..5e6cf5a4e 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -73,7 +73,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
73 GNUNET_NAMESTORE_disconnect (nsh); 73 GNUNET_NAMESTORE_disconnect (nsh);
74 nsh = NULL; 74 nsh = NULL;
75 if (privkey != NULL) 75 if (privkey != NULL)
76 GNUNET_CRYPTO_ecc_key_free (privkey); 76 GNUNET_free (privkey);
77 privkey = NULL; 77 privkey = NULL;
78 res = 1; 78 res = 1;
79} 79}
@@ -88,7 +88,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
88 endbadly_task = GNUNET_SCHEDULER_NO_TASK; 88 endbadly_task = GNUNET_SCHEDULER_NO_TASK;
89 } 89 }
90 if (privkey != NULL) 90 if (privkey != NULL)
91 GNUNET_CRYPTO_ecc_key_free (privkey); 91 GNUNET_free (privkey);
92 privkey = NULL; 92 privkey = NULL;
93 if (nsh != NULL) 93 if (nsh != NULL)
94 GNUNET_NAMESTORE_disconnect (nsh); 94 GNUNET_NAMESTORE_disconnect (nsh);
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 978712d53..b26305ce3 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -1325,7 +1325,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1325 } 1325 }
1326 if (NULL != my_private_key) 1326 if (NULL != my_private_key)
1327 { 1327 {
1328 GNUNET_CRYPTO_ecc_key_free (my_private_key); 1328 GNUNET_free (my_private_key);
1329 my_private_key = NULL; 1329 my_private_key = NULL;
1330 } 1330 }
1331#if ENABLE_NSE_HISTOGRAM 1331#if ENABLE_NSE_HISTOGRAM
@@ -1471,7 +1471,7 @@ run (void *cls,
1471 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1471 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1472 _ 1472 _
1473 ("NSE service is lacking key configuration settings. Exiting.\n")); 1473 ("NSE service is lacking key configuration settings. Exiting.\n"));
1474 GNUNET_CRYPTO_ecc_key_free (my_private_key); 1474 GNUNET_free (my_private_key);
1475 my_private_key = NULL; 1475 my_private_key = NULL;
1476 GNUNET_SCHEDULER_shutdown (); 1476 GNUNET_SCHEDULER_shutdown ();
1477 return; 1477 return;
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index d0f9edb06..3d96f1043 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -678,7 +678,7 @@ run (void *cls, char *const *args, const char *cfgfile,
678 } 678 }
679 GNUNET_free (fn); 679 GNUNET_free (fn);
680 GNUNET_CRYPTO_ecc_key_get_public (priv, &my_public_key); 680 GNUNET_CRYPTO_ecc_key_get_public (priv, &my_public_key);
681 GNUNET_CRYPTO_ecc_key_free (priv); 681 GNUNET_free (priv);
682 GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), &my_peer_identity.hashPubKey); 682 GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), &my_peer_identity.hashPubKey);
683 } 683 }
684 684
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c
index 1eeb1ec59..508de00ae 100644
--- a/src/pt/test_gns_vpn.c
+++ b/src/pt/test_gns_vpn.c
@@ -410,7 +410,7 @@ run (void *cls,
410 GNUNET_free ((void**)rd.data); 410 GNUNET_free ((void**)rd.data);
411 GNUNET_free (rd_string); 411 GNUNET_free (rd_string);
412 GNUNET_free (zone_keyfile); 412 GNUNET_free (zone_keyfile);
413 GNUNET_CRYPTO_ecc_key_free (host_key); 413 GNUNET_free (host_key);
414} 414}
415 415
416 416
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c
index 86f7d451b..685457973 100644
--- a/src/regex/gnunet-daemon-regexprofiler.c
+++ b/src/regex/gnunet-daemon-regexprofiler.c
@@ -124,7 +124,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
124 GNUNET_DHT_disconnect (dht_handle); 124 GNUNET_DHT_disconnect (dht_handle);
125 dht_handle = NULL; 125 dht_handle = NULL;
126 } 126 }
127 GNUNET_CRYPTO_ecc_key_free (my_private_key); 127 GNUNET_free (my_private_key);
128 my_private_key = NULL; 128 my_private_key = NULL;
129 129
130 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 130 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/regex/gnunet-service-regex.c b/src/regex/gnunet-service-regex.c
index e44d11b7d..22175331c 100644
--- a/src/regex/gnunet-service-regex.c
+++ b/src/regex/gnunet-service-regex.c
@@ -120,7 +120,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
120 stats = NULL; 120 stats = NULL;
121 GNUNET_SERVER_notification_context_destroy (nc); 121 GNUNET_SERVER_notification_context_destroy (nc);
122 nc = NULL; 122 nc = NULL;
123 GNUNET_CRYPTO_ecc_key_free (my_private_key); 123 GNUNET_free (my_private_key);
124 my_private_key = NULL; 124 my_private_key = NULL;
125} 125}
126 126
@@ -371,7 +371,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
371 dht = GNUNET_DHT_connect (cfg, 1024); 371 dht = GNUNET_DHT_connect (cfg, 1024);
372 if (NULL == dht) 372 if (NULL == dht)
373 { 373 {
374 GNUNET_CRYPTO_ecc_key_free (my_private_key); 374 GNUNET_free (my_private_key);
375 my_private_key = NULL; 375 my_private_key = NULL;
376 GNUNET_SCHEDULER_shutdown (); 376 GNUNET_SCHEDULER_shutdown ();
377 return; 377 return;
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c
index 45ca4978c..b3d3ac268 100644
--- a/src/testing/gnunet-testing.c
+++ b/src/testing/gnunet-testing.c
@@ -143,7 +143,7 @@ create_hostkeys (const unsigned int no)
143 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd)); 143 GNUNET_assert (GNUNET_OK == GNUNET_DISK_file_close (fd));
144 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing", 144 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
145 "Wrote hostkey to file: `%s'\n", create_hostkey); 145 "Wrote hostkey to file: `%s'\n", create_hostkey);
146 GNUNET_CRYPTO_ecc_key_free (pk); 146 GNUNET_free (pk);
147 GNUNET_TESTING_system_destroy (system, GNUNET_YES); 147 GNUNET_TESTING_system_destroy (system, GNUNET_YES);
148 return 0; 148 return 0;
149} 149}
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 9e193bd9c..db74f8897 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -1169,7 +1169,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1169 goto err_ret; 1169 goto err_ret;
1170 } 1170 }
1171 if (NULL != pk) 1171 if (NULL != pk)
1172 GNUNET_CRYPTO_ecc_key_free (pk); 1172 GNUNET_free (pk);
1173 if (GNUNET_NO == 1173 if (GNUNET_NO ==
1174 GNUNET_CONFIGURATION_have_value (cfg, "PEER", "PRIVATE_KEY")) 1174 GNUNET_CONFIGURATION_have_value (cfg, "PEER", "PRIVATE_KEY"))
1175 { 1175 {
@@ -1288,7 +1288,7 @@ GNUNET_TESTING_peer_get_identity (struct GNUNET_TESTING_Peer *peer,
1288 return; 1288 return;
1289 } 1289 }
1290 peer->id = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity)); 1290 peer->id = GNUNET_malloc (sizeof (struct GNUNET_PeerIdentity));
1291 GNUNET_CRYPTO_ecc_key_free (GNUNET_TESTING_hostkey_get (peer->system, 1291 GNUNET_free (GNUNET_TESTING_hostkey_get (peer->system,
1292 peer->key_number, 1292 peer->key_number,
1293 peer->id)); 1293 peer->id));
1294 memcpy (id, peer->id, sizeof (struct GNUNET_PeerIdentity)); 1294 memcpy (id, peer->id, sizeof (struct GNUNET_PeerIdentity));
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 664c3e825..50cd367d5 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -718,7 +718,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
718 } 718 }
719 if (NULL != GST_my_private_key) 719 if (NULL != GST_my_private_key)
720 { 720 {
721 GNUNET_CRYPTO_ecc_key_free (GST_my_private_key); 721 GNUNET_free (GST_my_private_key);
722 GST_my_private_key = NULL; 722 GST_my_private_key = NULL;
723 } 723 }
724 GST_server = NULL; 724 GST_server = NULL;
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index 89cbde922..5ad0b81cb 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -53,18 +53,6 @@
53 53
54 54
55/** 55/**
56 * Free memory occupied by ECC key
57 *
58 * @param priv pointer to the memory to free
59 */
60void
61GNUNET_CRYPTO_ecc_key_free (struct GNUNET_CRYPTO_EccPrivateKey *priv)
62{
63 GNUNET_free (priv);
64}
65
66
67/**
68 * Extract values from an S-expression. 56 * Extract values from an S-expression.
69 * 57 *
70 * @param array where to store the result(s) 58 * @param array where to store the result(s)
@@ -668,7 +656,7 @@ GNUNET_CRYPTO_ecc_setup_key (const char *cfg_name)
668 (void) GNUNET_CONFIGURATION_load (cfg, cfg_name); 656 (void) GNUNET_CONFIGURATION_load (cfg, cfg_name);
669 priv = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg); 657 priv = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg);
670 if (NULL != priv) 658 if (NULL != priv)
671 GNUNET_CRYPTO_ecc_key_free (priv); 659 GNUNET_free (priv);
672 GNUNET_CONFIGURATION_destroy (cfg); 660 GNUNET_CONFIGURATION_destroy (cfg);
673} 661}
674 662
@@ -695,7 +683,7 @@ GNUNET_CRYPTO_get_host_identity (const struct GNUNET_CONFIGURATION_Handle *cfg,
695 return GNUNET_SYSERR; 683 return GNUNET_SYSERR;
696 } 684 }
697 GNUNET_CRYPTO_ecc_key_get_public (priv, &pub); 685 GNUNET_CRYPTO_ecc_key_get_public (priv, &pub);
698 GNUNET_CRYPTO_ecc_key_free (priv); 686 GNUNET_free (priv);
699 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &dst->hashPubKey); 687 GNUNET_CRYPTO_hash (&pub, sizeof (pub), &dst->hashPubKey);
700 return GNUNET_OK; 688 return GNUNET_OK;
701} 689}
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c
index 103f8eff2..4f20d3208 100644
--- a/src/util/gnunet-ecc.c
+++ b/src/util/gnunet-ecc.c
@@ -82,10 +82,10 @@ create_keys (const char *fn)
82 _("\nFailed to write to `%s': %s\n"), 82 _("\nFailed to write to `%s': %s\n"),
83 fn, 83 fn,
84 STRERROR (errno)); 84 STRERROR (errno));
85 GNUNET_CRYPTO_ecc_key_free (pk); 85 GNUNET_free (pk);
86 break; 86 break;
87 } 87 }
88 GNUNET_CRYPTO_ecc_key_free (pk); 88 GNUNET_free (pk);
89 } 89 }
90 if (UINT_MAX == make_keys) 90 if (UINT_MAX == make_keys)
91 fprintf (stderr, 91 fprintf (stderr,
@@ -144,7 +144,7 @@ run (void *cls, char *const *args, const char *cfgfile,
144 GNUNET_CRYPTO_hash_to_enc (&pid.hashPubKey, &enc); 144 GNUNET_CRYPTO_hash_to_enc (&pid.hashPubKey, &enc);
145 fprintf (stdout, "%s\n", enc.encoding); 145 fprintf (stdout, "%s\n", enc.encoding);
146 } 146 }
147 GNUNET_CRYPTO_ecc_key_free (pk); 147 GNUNET_free (pk);
148} 148}
149 149
150 150
diff --git a/src/util/test_crypto_ecc.c b/src/util/test_crypto_ecc.c
index bb5fb002f..58a9816a2 100644
--- a/src/util/test_crypto_ecc.c
+++ b/src/util/test_crypto_ecc.c
@@ -104,7 +104,7 @@ testDeriveSignVerify ()
104 if (GNUNET_SYSERR == GNUNET_CRYPTO_ecc_sign (dpriv, &purp, &sig)) 104 if (GNUNET_SYSERR == GNUNET_CRYPTO_ecc_sign (dpriv, &purp, &sig))
105 { 105 {
106 FPRINTF (stderr, "%s", "GNUNET_CRYPTO_ecc_sign returned SYSERR\n"); 106 FPRINTF (stderr, "%s", "GNUNET_CRYPTO_ecc_sign returned SYSERR\n");
107 GNUNET_CRYPTO_ecc_key_free (dpriv); 107 GNUNET_free (dpriv);
108 return GNUNET_SYSERR; 108 return GNUNET_SYSERR;
109 } 109 }
110 if (GNUNET_SYSERR == 110 if (GNUNET_SYSERR ==
@@ -113,7 +113,7 @@ testDeriveSignVerify ()
113 &dpub)) 113 &dpub))
114 { 114 {
115 printf ("GNUNET_CRYPTO_ecc_verify failed!\n"); 115 printf ("GNUNET_CRYPTO_ecc_verify failed!\n");
116 GNUNET_CRYPTO_ecc_key_free (dpriv); 116 GNUNET_free (dpriv);
117 return GNUNET_SYSERR; 117 return GNUNET_SYSERR;
118 } 118 }
119 if (GNUNET_SYSERR != 119 if (GNUNET_SYSERR !=
@@ -122,7 +122,7 @@ testDeriveSignVerify ()
122 &pkey)) 122 &pkey))
123 { 123 {
124 printf ("GNUNET_CRYPTO_ecc_verify failed to fail!\n"); 124 printf ("GNUNET_CRYPTO_ecc_verify failed to fail!\n");
125 GNUNET_CRYPTO_ecc_key_free (dpriv); 125 GNUNET_free (dpriv);
126 return GNUNET_SYSERR; 126 return GNUNET_SYSERR;
127 } 127 }
128 if (GNUNET_SYSERR != 128 if (GNUNET_SYSERR !=
@@ -130,10 +130,10 @@ testDeriveSignVerify ()
130 &purp, &sig, &dpub)) 130 &purp, &sig, &dpub))
131 { 131 {
132 printf ("GNUNET_CRYPTO_ecc_verify failed to fail!\n"); 132 printf ("GNUNET_CRYPTO_ecc_verify failed to fail!\n");
133 GNUNET_CRYPTO_ecc_key_free (dpriv); 133 GNUNET_free (dpriv);
134 return GNUNET_SYSERR; 134 return GNUNET_SYSERR;
135 } 135 }
136 GNUNET_CRYPTO_ecc_key_free (dpriv); 136 GNUNET_free (dpriv);
137 return GNUNET_OK; 137 return GNUNET_OK;
138} 138}
139 139
@@ -183,18 +183,18 @@ testCreateFromFile ()
183 key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE); 183 key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE);
184 GNUNET_assert (NULL != key); 184 GNUNET_assert (NULL != key);
185 GNUNET_CRYPTO_ecc_key_get_public (key, &p1); 185 GNUNET_CRYPTO_ecc_key_get_public (key, &p1);
186 GNUNET_CRYPTO_ecc_key_free (key); 186 GNUNET_free (key);
187 key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE); 187 key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE);
188 GNUNET_assert (NULL != key); 188 GNUNET_assert (NULL != key);
189 GNUNET_CRYPTO_ecc_key_get_public (key, &p2); 189 GNUNET_CRYPTO_ecc_key_get_public (key, &p2);
190 GNUNET_assert (0 == memcmp (&p1, &p2, sizeof (p1))); 190 GNUNET_assert (0 == memcmp (&p1, &p2, sizeof (p1)));
191 GNUNET_CRYPTO_ecc_key_free (key); 191 GNUNET_free (key);
192 GNUNET_assert (0 == UNLINK (KEYFILE)); 192 GNUNET_assert (0 == UNLINK (KEYFILE));
193 key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE); 193 key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE);
194 GNUNET_assert (NULL != key); 194 GNUNET_assert (NULL != key);
195 GNUNET_CRYPTO_ecc_key_get_public (key, &p2); 195 GNUNET_CRYPTO_ecc_key_get_public (key, &p2);
196 GNUNET_assert (0 != memcmp (&p1, &p2, sizeof (p1))); 196 GNUNET_assert (0 != memcmp (&p1, &p2, sizeof (p1)));
197 GNUNET_CRYPTO_ecc_key_free (key); 197 GNUNET_free (key);
198 return GNUNET_OK; 198 return GNUNET_OK;
199} 199}
200 200
@@ -217,8 +217,8 @@ test_ecdh ()
217 GNUNET_CRYPTO_ecc_ecdh (priv2, &pub1, &ecdh2); 217 GNUNET_CRYPTO_ecc_ecdh (priv2, &pub1, &ecdh2);
218 GNUNET_assert (0 == memcmp (&ecdh1, &ecdh2, 218 GNUNET_assert (0 == memcmp (&ecdh1, &ecdh2,
219 sizeof (struct GNUNET_HashCode))); 219 sizeof (struct GNUNET_HashCode)));
220 GNUNET_CRYPTO_ecc_key_free (priv1); 220 GNUNET_free (priv1);
221 GNUNET_CRYPTO_ecc_key_free (priv2); 221 GNUNET_free (priv2);
222} 222}
223 223
224 224
@@ -234,7 +234,7 @@ perf_keygen ()
234 { 234 {
235 fprintf (stderr, "."); 235 fprintf (stderr, ".");
236 pk = GNUNET_CRYPTO_ecc_key_create (); 236 pk = GNUNET_CRYPTO_ecc_key_create ();
237 GNUNET_CRYPTO_ecc_key_free (pk); 237 GNUNET_free (pk);
238 } 238 }
239 fprintf (stderr, "\n"); 239 fprintf (stderr, "\n");
240 printf ("Creating 10 ECC keys took %s\n", 240 printf ("Creating 10 ECC keys took %s\n",
@@ -270,7 +270,7 @@ main (int argc, char *argv[])
270#endif 270#endif
271 if (GNUNET_OK != testSignVerify ()) 271 if (GNUNET_OK != testSignVerify ())
272 failure_count++; 272 failure_count++;
273 GNUNET_CRYPTO_ecc_key_free (key); 273 GNUNET_free (key);
274 if (GNUNET_OK != testCreateFromFile ()) 274 if (GNUNET_OK != testCreateFromFile ())
275 failure_count++; 275 failure_count++;
276 GNUNET_assert (0 == UNLINK (KEYFILE)); 276 GNUNET_assert (0 == UNLINK (KEYFILE));