/**
* The public key of the peer.
*/
- struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded publicKey;
+ struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded publicKey;
};
GNUNET_NETWORK_STRUCT_END
* @return the hello message
*/
struct GNUNET_HELLO_Message *
-GNUNET_HELLO_create (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded
*publicKey,
GNUNET_HELLO_GenerateAddressListCallback addrgen,
void *addrgen_cls)
hello->header.type = htons (GNUNET_MESSAGE_TYPE_HELLO);
hello->header.size = htons (sizeof (struct GNUNET_HELLO_Message) + used);
memcpy (&hello->publicKey, publicKey,
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
+ sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded));
memcpy (&hello[1], buffer, used);
return hello;
}
wpos = 0;
woff = (ret != NULL) ? (char *) &ret[1] : NULL;
GNUNET_CRYPTO_hash (&msg->publicKey,
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+ sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded),
&address.peer.hashPubKey);
while (insize > 0)
{
*/
int
GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
- struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *publicKey)
{
uint16_t ret = ntohs (hello->header.size);
(ntohs (hello->header.type) != GNUNET_MESSAGE_TYPE_HELLO))
return GNUNET_SYSERR;
GNUNET_CRYPTO_hash (&hello->publicKey,
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+ sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded),
&peer->hashPubKey);
return GNUNET_OK;
}
if (0 !=
memcmp (&h1->publicKey, &h2->publicKey,
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)))
+ sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)))
return GNUNET_TIME_UNIT_ZERO_ABS;
ec.expiration_limit = now;
ec.result = GNUNET_TIME_UNIT_FOREVER_ABS;
* @param cls the 'GNUNET_HELLO_GetUriContext'
* @param address address to add
* @param expiration expiration time for the address
- * @param plugins_find Function to find transport plugins by name
* @return GNUNET_OK (continue iteration).
*/
static int
struct GNUNET_HELLO_ComposeUriContext ctx;
ctx.plugins_find = plugins_find;
- char *pkey = GNUNET_CRYPTO_rsa_public_key_to_string (&(hello->publicKey));
+ char *pkey = GNUNET_CRYPTO_ecc_public_key_to_string (&(hello->publicKey));
GNUNET_asprintf (&(ctx.uri),
"%s%s",
GNUNET_HELLO_URI_PREFIX,
*/
int
GNUNET_HELLO_parse_uri (const char *uri,
- struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pubkey,
+ struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *pubkey,
struct GNUNET_HELLO_Message **hello,
GNUNET_HELLO_TransportPluginsFind plugins_find)
{