From 827d87000e5b839f2f199011c8ecd38aa62db3d0 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 3 Jul 2014 13:25:01 +0000 Subject: [PATCH] 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. --- src/cadet/gnunet-service-cadet_tunnel.c | 2 +- src/util/gnunet-ecc.c | 25 ------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index 954877621..92116d51f 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c @@ -885,7 +885,7 @@ finish_kx (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) /** - * Destroy a Key eXchane context for the tunnel. This function only schedules + * Destroy a Key eXchange context for the tunnel. This function only schedules * the destruction, the freeing of the memory (and clearing of old key material) * happens after a delay! * 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 @@ -50,11 +50,6 @@ static int print_public_key; */ static int print_examples_flag; -/** - * Flag for printing hash of public key. - */ -static int print_peer_identity; - /** * Option set to create a bunch of keys at once. */ @@ -358,23 +353,6 @@ run (void *cls, char *const *args, const char *cfgfile, return; } if (print_public_key) - { - struct GNUNET_CRYPTO_EddsaPrivateKey *pk; - struct GNUNET_CRYPTO_EddsaPublicKey pub; - char *s; - - pk = GNUNET_CRYPTO_eddsa_key_create_from_file (args[0]); - if (NULL == pk) - return; - GNUNET_CRYPTO_eddsa_key_get_public (pk, &pub); - s = GNUNET_CRYPTO_eddsa_public_key_to_string (&pub); - FPRINTF (stdout, - "%s\n", - s); - GNUNET_free (s); - GNUNET_free (pk); - } - if (print_peer_identity) { char *str; struct GNUNET_DISK_FileHandle *keyfile; @@ -422,9 +400,6 @@ main (int argc, char *const *argv) { 'p', "print-public-key", NULL, gettext_noop ("print the public key in ASCII format"), 0, &GNUNET_GETOPT_set_one, &print_public_key }, - { 'P', "print-peer-identity", NULL, - gettext_noop ("print the hash of the public key in ASCII format"), - 0, &GNUNET_GETOPT_set_one, &print_peer_identity }, { 'E', "examples", NULL, gettext_noop ("print examples of ECC operations (used for compatibility testing)"), 0, &GNUNET_GETOPT_set_one, &print_examples_flag }, -- 2.25.1