From 59bab1b08e5305cffa0ce8075014e65a93f5ae52 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 11 Oct 2013 11:38:57 +0000 Subject: [PATCH] -fix eddsa ftbfs --- src/psyc/gnunet-service-psyc.c | 20 ++++++++++---------- src/psyc/psyc.h | 10 +++++----- src/psyc/psyc_api.c | 10 +++++----- src/psyc/test_psyc.c | 16 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index d3f203ebf..77eb82a4c 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c @@ -100,8 +100,8 @@ struct Channel struct Master { struct Channel channel; - struct GNUNET_CRYPTO_EccPrivateKey priv_key; - struct GNUNET_CRYPTO_EccPublicSignKey pub_key; + struct GNUNET_CRYPTO_EddsaPrivateKey priv_key; + struct GNUNET_CRYPTO_EddsaPublicKey pub_key; struct GNUNET_HashCode pub_key_hash; struct GNUNET_MULTICAST_Origin *origin; @@ -124,8 +124,8 @@ struct Master struct Slave { struct Channel channel; - struct GNUNET_CRYPTO_EccPrivateKey slave_key; - struct GNUNET_CRYPTO_EccPublicSignKey chan_key; + struct GNUNET_CRYPTO_EddsaPrivateKey slave_key; + struct GNUNET_CRYPTO_EddsaPublicKey chan_key; struct GNUNET_HashCode chan_key_hash; struct GNUNET_MULTICAST_Member *member; @@ -215,7 +215,7 @@ client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) } void -join_cb (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, +join_cb (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *member_key, const struct GNUNET_MessageHeader *join_req, struct GNUNET_MULTICAST_JoinHandle *jh) { @@ -224,7 +224,7 @@ join_cb (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, void membership_test_cb (void *cls, - const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, + const struct GNUNET_CRYPTO_EddsaPublicKey *member_key, uint64_t message_id, uint64_t group_generation, struct GNUNET_MULTICAST_MembershipTestHandle *mth) { @@ -233,7 +233,7 @@ membership_test_cb (void *cls, void replay_fragment_cb (void *cls, - const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, + const struct GNUNET_CRYPTO_EddsaPublicKey *member_key, uint64_t fragment_id, uint64_t flags, struct GNUNET_MULTICAST_ReplayHandle *rh) { @@ -242,7 +242,7 @@ replay_fragment_cb (void *cls, void replay_message_cb (void *cls, - const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, + const struct GNUNET_CRYPTO_EddsaPublicKey *member_key, uint64_t message_id, uint64_t fragment_offset, uint64_t flags, @@ -252,7 +252,7 @@ replay_message_cb (void *cls, } void -request_cb (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, +request_cb (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *member_key, const struct GNUNET_MessageHeader *req, enum GNUNET_MULTICAST_MessageFlags flags) { @@ -343,7 +343,7 @@ handle_master_start (void *cls, struct GNUNET_SERVER_Client *client, mst->channel.is_master = GNUNET_YES; mst->policy = ntohl (req->policy); mst->priv_key = req->channel_key; - GNUNET_CRYPTO_ecc_key_get_public_for_signature (&mst->priv_key, + GNUNET_CRYPTO_eddsa_key_get_public (&mst->priv_key, &mst->pub_key); GNUNET_CRYPTO_hash (&mst->pub_key, sizeof (mst->pub_key), &mst->pub_key_hash); diff --git a/src/psyc/psyc.h b/src/psyc/psyc.h index 6a8826337..85d10858e 100644 --- a/src/psyc/psyc.h +++ b/src/psyc/psyc.h @@ -107,7 +107,7 @@ struct MasterStartRequest */ struct GNUNET_MessageHeader header; - struct GNUNET_CRYPTO_EccPrivateKey channel_key; + struct GNUNET_CRYPTO_EddsaPrivateKey channel_key; uint32_t policy GNUNET_PACKED; }; @@ -122,9 +122,9 @@ struct SlaveJoinRequest uint32_t relay_count GNUNET_PACKED; - struct GNUNET_CRYPTO_EccPublicSignKey channel_key; + struct GNUNET_CRYPTO_EddsaPublicKey channel_key; - struct GNUNET_CRYPTO_EccPrivateKey slave_key; + struct GNUNET_CRYPTO_EddsaPrivateKey slave_key; struct GNUNET_PeerIdentity origin; @@ -141,7 +141,7 @@ struct ChannelSlaveAdd uint32_t reserved; - struct GNUNET_CRYPTO_EccPublicSignKey *slave_key; + struct GNUNET_CRYPTO_EddsaPublicKey *slave_key; uint64_t announced_at; @@ -158,7 +158,7 @@ struct ChannelSlaveRemove uint32_t reserved; - struct GNUNET_CRYPTO_EccPublicSignKey *slave_key; + struct GNUNET_CRYPTO_EddsaPublicKey *slave_key; uint64_t announced_at; }; diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c index 4178d920b..6f1c9707b 100644 --- a/src/psyc/psyc_api.c +++ b/src/psyc/psyc_api.c @@ -551,7 +551,7 @@ disconnect (void *c) */ struct GNUNET_PSYC_Master * GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg, - const struct GNUNET_CRYPTO_EccPrivateKey *channel_key, + const struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key, enum GNUNET_PSYC_Policy policy, GNUNET_PSYC_Method method, GNUNET_PSYC_JoinCallback join_cb, @@ -768,8 +768,8 @@ GNUNET_PSYC_master_transmit_cancel (struct GNUNET_PSYC_MasterTransmitHandle *th) */ struct GNUNET_PSYC_Slave * GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg, - const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, - const struct GNUNET_CRYPTO_EccPrivateKey *slave_key, + const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key, + const struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key, const struct GNUNET_PeerIdentity *origin, uint32_t relay_count, const struct GNUNET_PeerIdentity *relays, @@ -921,7 +921,7 @@ GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave) */ void GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *ch, - const struct GNUNET_CRYPTO_EccPublicSignKey + const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key, uint64_t announced_at, uint64_t effective_since) @@ -964,7 +964,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *ch, */ void GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *ch, - const struct GNUNET_CRYPTO_EccPublicSignKey + const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key, uint64_t announced_at) { diff --git a/src/psyc/test_psyc.c b/src/psyc/test_psyc.c index 1d7035a87..80497d8ba 100644 --- a/src/psyc/test_psyc.c +++ b/src/psyc/test_psyc.c @@ -54,11 +54,11 @@ static struct GNUNET_PSYC_Master *mst; static struct GNUNET_PSYC_Slave *slv; static struct GNUNET_PSYC_Channel *ch; -static struct GNUNET_CRYPTO_EccPrivateKey *channel_key; -static struct GNUNET_CRYPTO_EccPrivateKey *slave_key; +static struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key; +static struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key; -static struct GNUNET_CRYPTO_EccPublicSignKey channel_pub_key; -static struct GNUNET_CRYPTO_EccPublicSignKey slave_pub_key; +static struct GNUNET_CRYPTO_EddsaPublicKey channel_pub_key; +static struct GNUNET_CRYPTO_EddsaPublicKey slave_pub_key; struct GNUNET_PSYC_MasterTransmitHandle *mth; @@ -122,7 +122,7 @@ end () static int -method (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, +method (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key, uint64_t message_id, const char *name, size_t modifier_count, const struct GNUNET_ENV_Modifier *modifiers, uint64_t data_offset, const void *data, size_t data_size, @@ -136,7 +136,7 @@ method (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, static int -join (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, +join (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key, const char *method_name, size_t variable_count, const struct GNUNET_ENV_Modifier *variables, const void *data, size_t data_size, struct GNUNET_PSYC_JoinHandle *jh) @@ -243,8 +243,8 @@ run (void *cls, channel_key = GNUNET_CRYPTO_ecc_key_create (); slave_key = GNUNET_CRYPTO_ecc_key_create (); - GNUNET_CRYPTO_ecc_key_get_public_for_signature (channel_key, &channel_pub_key); - GNUNET_CRYPTO_ecc_key_get_public_for_signature (slave_key, &slave_pub_key); + GNUNET_CRYPTO_eddsa_key_get_public (channel_key, &channel_pub_key); + GNUNET_CRYPTO_eddsa_key_get_public (slave_key, &slave_pub_key); mst = GNUNET_PSYC_master_start (cfg, channel_key, GNUNET_PSYC_CHANNEL_PRIVATE, -- 2.25.1