_("Generating %u keys, please wait"),
make_keys);
while (0 < make_keys--)
- {
+ {
fprintf (stderr,
".");
if (NULL == (pk = GNUNET_CRYPTO_ecc_key_create ()))
GNUNET_break (0);
break;
}
- if (GNUNET_TESTING_HOSTKEYFILESIZE !=
+ if (GNUNET_TESTING_HOSTKEYFILESIZE !=
fwrite (pk, 1,
GNUNET_TESTING_HOSTKEYFILESIZE, f))
{
{
struct GNUNET_CRYPTO_EccPrivateKey *pk;
struct GNUNET_CRYPTO_EccPublicSignKey pub;
- struct GNUNET_PeerIdentity pid;
if (NULL == args[0])
{
}
if (print_peer_identity)
{
- struct GNUNET_CRYPTO_HashAsciiEncoded enc;
+ char *str;
GNUNET_CRYPTO_ecc_key_get_public_for_signature (pk, &pub);
- GNUNET_CRYPTO_hash (&pub, sizeof (pub), &pid.hashPubKey);
- GNUNET_CRYPTO_hash_to_enc (&pid.hashPubKey, &enc);
- fprintf (stdout, "%s\n", enc.encoding);
+ str = GNUNET_CRYPTO_ecc_public_sign_key_to_string (&pub);
+ fprintf (stdout,
+ "%s\n",
+ str);
+ GNUNET_free (str);
}
GNUNET_free (pk);
}