#define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
-#define HOSTKEY_FILE "test_plugin_hostkey"
+#define HOSTKEY_FILE "test_plugin_hostkey.ecc"
/**
* Our public key.
*/
-static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded my_public_key;
+static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded my_public_key;
/**
* Our identity.
/**
* Our private key.
*/
-static struct GNUNET_CRYPTO_RsaPrivateKey *my_private_key;
+static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key;
/**
* Our configuration.
env_receive (void *cls,
const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_ATS_Information *ats,
- uint32_t ats_count,
struct Session * session,
const char *sender_address,
uint16_t sender_address_len)
}
+static void
+env_update_metrics (void *cls,
+ const struct GNUNET_PeerIdentity *peer,
+ const char *address,
+ uint16_t address_len,
+ struct Session *session,
+ struct GNUNET_ATS_Information *ats,
+ uint32_t ats_count)
+{
+}
+
+
static void
setup_plugin_environment ()
{
env.receive = &env_receive;
env.notify_address = &env_notify_address;
env.get_address_type = &env_get_address_type;
+ env.update_address_metrics = &env_update_metrics;
env.get_our_hello = &env_get_our_hello;
env.session_end = &env_session_end;
}
"NEIGHBOUR_LIMIT",
&tneigh)) ||
(GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (c,
- "GNUNETD", "HOSTKEY",
+ "PEER", "PRIVATE_KEY",
&keyfile)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
max_connect_per_transport = (uint32_t) tneigh;
- my_private_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
+ my_private_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
GNUNET_free (keyfile);
if (NULL == my_private_key)
{
end_badly_now ();
return;
}
- GNUNET_CRYPTO_rsa_key_get_public (my_private_key, &my_public_key);
+ GNUNET_CRYPTO_ecc_key_get_public (my_private_key, &my_public_key);
GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key),
&my_identity.hashPubKey);