diff options
Diffstat (limited to 'src/util/gnunet-ecc.c')
-rw-r--r-- | src/util/gnunet-ecc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c index 9f76d6b8e..59c0f5fe2 100644 --- a/src/util/gnunet-ecc.c +++ b/src/util/gnunet-ecc.c | |||
@@ -111,7 +111,6 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
111 | { | 111 | { |
112 | struct GNUNET_CRYPTO_EccPrivateKey *pk; | 112 | struct GNUNET_CRYPTO_EccPrivateKey *pk; |
113 | struct GNUNET_CRYPTO_EccPublicSignKey pub; | 113 | struct GNUNET_CRYPTO_EccPublicSignKey pub; |
114 | struct GNUNET_PeerIdentity pid; | ||
115 | 114 | ||
116 | if (NULL == args[0]) | 115 | if (NULL == args[0]) |
117 | { | 116 | { |
@@ -137,12 +136,14 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
137 | } | 136 | } |
138 | if (print_peer_identity) | 137 | if (print_peer_identity) |
139 | { | 138 | { |
140 | struct GNUNET_CRYPTO_HashAsciiEncoded enc; | 139 | char *str; |
141 | 140 | ||
142 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (pk, &pub); | 141 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (pk, &pub); |
143 | GNUNET_CRYPTO_hash (&pub, sizeof (pub), &pid.hashPubKey); | 142 | str = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pub); |
144 | GNUNET_CRYPTO_hash_to_enc (&pid.hashPubKey, &enc); | 143 | fprintf (stdout, |
145 | fprintf (stdout, "%s\n", enc.encoding); | 144 | "%s\n", |
145 | str); | ||
146 | GNUNET_free (str); | ||
146 | } | 147 | } |
147 | GNUNET_free (pk); | 148 | GNUNET_free (pk); |
148 | } | 149 | } |