aboutsummaryrefslogtreecommitdiff
path: root/src/util/gnunet-ecc.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-19 19:09:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-19 19:09:28 +0000
commit7b8acf8915fcedc4d905487ce0f7f3ff4ab201f4 (patch)
tree60bd85d90797a26b8ad34caf1b32c8c45fc93f8b /src/util/gnunet-ecc.c
parentbdeb92f66e328fc964423310300a18981d9eb1af (diff)
downloadgnunet-7b8acf8915fcedc4d905487ce0f7f3ff4ab201f4.tar.gz
gnunet-7b8acf8915fcedc4d905487ce0f7f3ff4ab201f4.zip
-eliminate more uses of ShortHashCode, breaks signatures
Diffstat (limited to 'src/util/gnunet-ecc.c')
-rw-r--r--src/util/gnunet-ecc.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c
index 0805e3f94..103f8eff2 100644
--- a/src/util/gnunet-ecc.c
+++ b/src/util/gnunet-ecc.c
@@ -40,11 +40,6 @@ static int print_public_key;
40static int print_peer_identity; 40static int print_peer_identity;
41 41
42/** 42/**
43 * Flag for printing short hash of public key.
44 */
45static int print_short_identity;
46
47/**
48 * Option set to create a bunch of keys at once. 43 * Option set to create a bunch of keys at once.
49 */ 44 */
50static unsigned int make_keys; 45static unsigned int make_keys;
@@ -149,16 +144,6 @@ run (void *cls, char *const *args, const char *cfgfile,
149 GNUNET_CRYPTO_hash_to_enc (&pid.hashPubKey, &enc); 144 GNUNET_CRYPTO_hash_to_enc (&pid.hashPubKey, &enc);
150 fprintf (stdout, "%s\n", enc.encoding); 145 fprintf (stdout, "%s\n", enc.encoding);
151 } 146 }
152 if (print_short_identity)
153 {
154 struct GNUNET_CRYPTO_ShortHashAsciiEncoded enc;
155 struct GNUNET_CRYPTO_ShortHashCode sh;
156
157 GNUNET_CRYPTO_ecc_key_get_public (pk, &pub);
158 GNUNET_CRYPTO_short_hash (&pub, sizeof (pub), &sh);
159 GNUNET_CRYPTO_short_hash_to_enc (&sh, &enc);
160 fprintf (stdout, "%s\n", enc.short_encoding);
161 }
162 GNUNET_CRYPTO_ecc_key_free (pk); 147 GNUNET_CRYPTO_ecc_key_free (pk);
163} 148}
164 149
@@ -183,9 +168,6 @@ main (int argc, char *const *argv)
183 { 'P', "print-peer-identity", NULL, 168 { 'P', "print-peer-identity", NULL,
184 gettext_noop ("print the hash of the public key in ASCII format"), 169 gettext_noop ("print the hash of the public key in ASCII format"),
185 0, &GNUNET_GETOPT_set_one, &print_peer_identity }, 170 0, &GNUNET_GETOPT_set_one, &print_peer_identity },
186 { 's', "print-short-identity", NULL,
187 gettext_noop ("print the short hash of the public key in ASCII format"),
188 0, &GNUNET_GETOPT_set_one, &print_short_identity },
189 GNUNET_GETOPT_OPTION_END 171 GNUNET_GETOPT_OPTION_END
190 }; 172 };
191 int ret; 173 int ret;