diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-07-03 13:25:01 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-07-03 13:25:01 +0000 |
commit | 827d87000e5b839f2f199011c8ecd38aa62db3d0 (patch) | |
tree | 6ac22774e384dc64f4de1110937695fc3035f121 /src/util/gnunet-ecc.c | |
parent | 6d0e271bba25f92e0887b8254c8304b516fa2028 (diff) | |
download | gnunet-827d87000e5b839f2f199011c8ecd38aa62db3d0.tar.gz gnunet-827d87000e5b839f2f199011c8ecd38aa62db3d0.zip |
Since we started using ECC, peer identities ARE public keys, not their hashes. This commit removes the miss-documented, redundant option and the duplicate code associated to its handling.
Diffstat (limited to 'src/util/gnunet-ecc.c')
-rw-r--r-- | src/util/gnunet-ecc.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c index e5804c71b..deb31e51f 100644 --- a/src/util/gnunet-ecc.c +++ b/src/util/gnunet-ecc.c | |||
@@ -51,11 +51,6 @@ static int print_public_key; | |||
51 | static int print_examples_flag; | 51 | static int print_examples_flag; |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Flag for printing hash of public key. | ||
55 | */ | ||
56 | static int print_peer_identity; | ||
57 | |||
58 | /** | ||
59 | * Option set to create a bunch of keys at once. | 54 | * Option set to create a bunch of keys at once. |
60 | */ | 55 | */ |
61 | static unsigned int make_keys; | 56 | static unsigned int make_keys; |
@@ -359,23 +354,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
359 | } | 354 | } |
360 | if (print_public_key) | 355 | if (print_public_key) |
361 | { | 356 | { |
362 | struct GNUNET_CRYPTO_EddsaPrivateKey *pk; | ||
363 | struct GNUNET_CRYPTO_EddsaPublicKey pub; | ||
364 | char *s; | ||
365 | |||
366 | pk = GNUNET_CRYPTO_eddsa_key_create_from_file (args[0]); | ||
367 | if (NULL == pk) | ||
368 | return; | ||
369 | GNUNET_CRYPTO_eddsa_key_get_public (pk, &pub); | ||
370 | s = GNUNET_CRYPTO_eddsa_public_key_to_string (&pub); | ||
371 | FPRINTF (stdout, | ||
372 | "%s\n", | ||
373 | s); | ||
374 | GNUNET_free (s); | ||
375 | GNUNET_free (pk); | ||
376 | } | ||
377 | if (print_peer_identity) | ||
378 | { | ||
379 | char *str; | 357 | char *str; |
380 | struct GNUNET_DISK_FileHandle *keyfile; | 358 | struct GNUNET_DISK_FileHandle *keyfile; |
381 | struct GNUNET_CRYPTO_EddsaPrivateKey pk; | 359 | struct GNUNET_CRYPTO_EddsaPrivateKey pk; |
@@ -422,9 +400,6 @@ main (int argc, char *const *argv) | |||
422 | { 'p', "print-public-key", NULL, | 400 | { 'p', "print-public-key", NULL, |
423 | gettext_noop ("print the public key in ASCII format"), | 401 | gettext_noop ("print the public key in ASCII format"), |
424 | 0, &GNUNET_GETOPT_set_one, &print_public_key }, | 402 | 0, &GNUNET_GETOPT_set_one, &print_public_key }, |
425 | { 'P', "print-peer-identity", NULL, | ||
426 | gettext_noop ("print the hash of the public key in ASCII format"), | ||
427 | 0, &GNUNET_GETOPT_set_one, &print_peer_identity }, | ||
428 | { 'E', "examples", NULL, | 403 | { 'E', "examples", NULL, |
429 | gettext_noop ("print examples of ECC operations (used for compatibility testing)"), | 404 | gettext_noop ("print examples of ECC operations (used for compatibility testing)"), |
430 | 0, &GNUNET_GETOPT_set_one, &print_examples_flag }, | 405 | 0, &GNUNET_GETOPT_set_one, &print_examples_flag }, |