aboutsummaryrefslogtreecommitdiff
path: root/src/psyc
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-11 11:38:57 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-11 11:38:57 +0000
commit59bab1b08e5305cffa0ce8075014e65a93f5ae52 (patch)
tree2cf3516cb76d9dca6a1dd0cbf3c36533abef1e25 /src/psyc
parent65cfef23df7a5ec3f86f0966b29b399fc0e5e5c7 (diff)
downloadgnunet-59bab1b08e5305cffa0ce8075014e65a93f5ae52.tar.gz
gnunet-59bab1b08e5305cffa0ce8075014e65a93f5ae52.zip
-fix eddsa ftbfs
Diffstat (limited to 'src/psyc')
-rw-r--r--src/psyc/gnunet-service-psyc.c20
-rw-r--r--src/psyc/psyc.h10
-rw-r--r--src/psyc/psyc_api.c10
-rw-r--r--src/psyc/test_psyc.c16
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
100struct Master 100struct Master
101{ 101{
102 struct Channel channel; 102 struct Channel channel;
103 struct GNUNET_CRYPTO_EccPrivateKey priv_key; 103 struct GNUNET_CRYPTO_EddsaPrivateKey priv_key;
104 struct GNUNET_CRYPTO_EccPublicSignKey pub_key; 104 struct GNUNET_CRYPTO_EddsaPublicKey pub_key;
105 struct GNUNET_HashCode pub_key_hash; 105 struct GNUNET_HashCode pub_key_hash;
106 106
107 struct GNUNET_MULTICAST_Origin *origin; 107 struct GNUNET_MULTICAST_Origin *origin;
@@ -124,8 +124,8 @@ struct Master
124struct Slave 124struct Slave
125{ 125{
126 struct Channel channel; 126 struct Channel channel;
127 struct GNUNET_CRYPTO_EccPrivateKey slave_key; 127 struct GNUNET_CRYPTO_EddsaPrivateKey slave_key;
128 struct GNUNET_CRYPTO_EccPublicSignKey chan_key; 128 struct GNUNET_CRYPTO_EddsaPublicKey chan_key;
129 struct GNUNET_HashCode chan_key_hash; 129 struct GNUNET_HashCode chan_key_hash;
130 130
131 struct GNUNET_MULTICAST_Member *member; 131 struct GNUNET_MULTICAST_Member *member;
@@ -215,7 +215,7 @@ client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
215} 215}
216 216
217void 217void
218join_cb (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 218join_cb (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
219 const struct GNUNET_MessageHeader *join_req, 219 const struct GNUNET_MessageHeader *join_req,
220 struct GNUNET_MULTICAST_JoinHandle *jh) 220 struct GNUNET_MULTICAST_JoinHandle *jh)
221{ 221{
@@ -224,7 +224,7 @@ join_cb (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *member_key,
224 224
225void 225void
226membership_test_cb (void *cls, 226membership_test_cb (void *cls,
227 const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 227 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
228 uint64_t message_id, uint64_t group_generation, 228 uint64_t message_id, uint64_t group_generation,
229 struct GNUNET_MULTICAST_MembershipTestHandle *mth) 229 struct GNUNET_MULTICAST_MembershipTestHandle *mth)
230{ 230{
@@ -233,7 +233,7 @@ membership_test_cb (void *cls,
233 233
234void 234void
235replay_fragment_cb (void *cls, 235replay_fragment_cb (void *cls,
236 const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 236 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
237 uint64_t fragment_id, uint64_t flags, 237 uint64_t fragment_id, uint64_t flags,
238 struct GNUNET_MULTICAST_ReplayHandle *rh) 238 struct GNUNET_MULTICAST_ReplayHandle *rh)
239{ 239{
@@ -242,7 +242,7 @@ replay_fragment_cb (void *cls,
242 242
243void 243void
244replay_message_cb (void *cls, 244replay_message_cb (void *cls,
245 const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 245 const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
246 uint64_t message_id, 246 uint64_t message_id,
247 uint64_t fragment_offset, 247 uint64_t fragment_offset,
248 uint64_t flags, 248 uint64_t flags,
@@ -252,7 +252,7 @@ replay_message_cb (void *cls,
252} 252}
253 253
254void 254void
255request_cb (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *member_key, 255request_cb (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *member_key,
256 const struct GNUNET_MessageHeader *req, 256 const struct GNUNET_MessageHeader *req,
257 enum GNUNET_MULTICAST_MessageFlags flags) 257 enum GNUNET_MULTICAST_MessageFlags flags)
258{ 258{
@@ -343,7 +343,7 @@ handle_master_start (void *cls, struct GNUNET_SERVER_Client *client,
343 mst->channel.is_master = GNUNET_YES; 343 mst->channel.is_master = GNUNET_YES;
344 mst->policy = ntohl (req->policy); 344 mst->policy = ntohl (req->policy);
345 mst->priv_key = req->channel_key; 345 mst->priv_key = req->channel_key;
346 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&mst->priv_key, 346 GNUNET_CRYPTO_eddsa_key_get_public (&mst->priv_key,
347 &mst->pub_key); 347 &mst->pub_key);
348 GNUNET_CRYPTO_hash (&mst->pub_key, sizeof (mst->pub_key), &mst->pub_key_hash); 348 GNUNET_CRYPTO_hash (&mst->pub_key, sizeof (mst->pub_key), &mst->pub_key_hash);
349 349
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
107 */ 107 */
108 struct GNUNET_MessageHeader header; 108 struct GNUNET_MessageHeader header;
109 109
110 struct GNUNET_CRYPTO_EccPrivateKey channel_key; 110 struct GNUNET_CRYPTO_EddsaPrivateKey channel_key;
111 111
112 uint32_t policy GNUNET_PACKED; 112 uint32_t policy GNUNET_PACKED;
113}; 113};
@@ -122,9 +122,9 @@ struct SlaveJoinRequest
122 122
123 uint32_t relay_count GNUNET_PACKED; 123 uint32_t relay_count GNUNET_PACKED;
124 124
125 struct GNUNET_CRYPTO_EccPublicSignKey channel_key; 125 struct GNUNET_CRYPTO_EddsaPublicKey channel_key;
126 126
127 struct GNUNET_CRYPTO_EccPrivateKey slave_key; 127 struct GNUNET_CRYPTO_EddsaPrivateKey slave_key;
128 128
129 struct GNUNET_PeerIdentity origin; 129 struct GNUNET_PeerIdentity origin;
130 130
@@ -141,7 +141,7 @@ struct ChannelSlaveAdd
141 141
142 uint32_t reserved; 142 uint32_t reserved;
143 143
144 struct GNUNET_CRYPTO_EccPublicSignKey *slave_key; 144 struct GNUNET_CRYPTO_EddsaPublicKey *slave_key;
145 145
146 uint64_t announced_at; 146 uint64_t announced_at;
147 147
@@ -158,7 +158,7 @@ struct ChannelSlaveRemove
158 158
159 uint32_t reserved; 159 uint32_t reserved;
160 160
161 struct GNUNET_CRYPTO_EccPublicSignKey *slave_key; 161 struct GNUNET_CRYPTO_EddsaPublicKey *slave_key;
162 162
163 uint64_t announced_at; 163 uint64_t announced_at;
164}; 164};
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)
551 */ 551 */
552struct GNUNET_PSYC_Master * 552struct GNUNET_PSYC_Master *
553GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 553GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
554 const struct GNUNET_CRYPTO_EccPrivateKey *channel_key, 554 const struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key,
555 enum GNUNET_PSYC_Policy policy, 555 enum GNUNET_PSYC_Policy policy,
556 GNUNET_PSYC_Method method, 556 GNUNET_PSYC_Method method,
557 GNUNET_PSYC_JoinCallback join_cb, 557 GNUNET_PSYC_JoinCallback join_cb,
@@ -768,8 +768,8 @@ GNUNET_PSYC_master_transmit_cancel (struct GNUNET_PSYC_MasterTransmitHandle *th)
768 */ 768 */
769struct GNUNET_PSYC_Slave * 769struct GNUNET_PSYC_Slave *
770GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg, 770GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
771 const struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, 771 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
772 const struct GNUNET_CRYPTO_EccPrivateKey *slave_key, 772 const struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key,
773 const struct GNUNET_PeerIdentity *origin, 773 const struct GNUNET_PeerIdentity *origin,
774 uint32_t relay_count, 774 uint32_t relay_count,
775 const struct GNUNET_PeerIdentity *relays, 775 const struct GNUNET_PeerIdentity *relays,
@@ -921,7 +921,7 @@ GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave)
921 */ 921 */
922void 922void
923GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *ch, 923GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *ch,
924 const struct GNUNET_CRYPTO_EccPublicSignKey 924 const struct GNUNET_CRYPTO_EddsaPublicKey
925 *slave_key, 925 *slave_key,
926 uint64_t announced_at, 926 uint64_t announced_at,
927 uint64_t effective_since) 927 uint64_t effective_since)
@@ -964,7 +964,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *ch,
964 */ 964 */
965void 965void
966GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *ch, 966GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *ch,
967 const struct GNUNET_CRYPTO_EccPublicSignKey 967 const struct GNUNET_CRYPTO_EddsaPublicKey
968 *slave_key, 968 *slave_key,
969 uint64_t announced_at) 969 uint64_t announced_at)
970{ 970{
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;
54static struct GNUNET_PSYC_Slave *slv; 54static struct GNUNET_PSYC_Slave *slv;
55static struct GNUNET_PSYC_Channel *ch; 55static struct GNUNET_PSYC_Channel *ch;
56 56
57static struct GNUNET_CRYPTO_EccPrivateKey *channel_key; 57static struct GNUNET_CRYPTO_EddsaPrivateKey *channel_key;
58static struct GNUNET_CRYPTO_EccPrivateKey *slave_key; 58static struct GNUNET_CRYPTO_EddsaPrivateKey *slave_key;
59 59
60static struct GNUNET_CRYPTO_EccPublicSignKey channel_pub_key; 60static struct GNUNET_CRYPTO_EddsaPublicKey channel_pub_key;
61static struct GNUNET_CRYPTO_EccPublicSignKey slave_pub_key; 61static struct GNUNET_CRYPTO_EddsaPublicKey slave_pub_key;
62 62
63struct GNUNET_PSYC_MasterTransmitHandle *mth; 63struct GNUNET_PSYC_MasterTransmitHandle *mth;
64 64
@@ -122,7 +122,7 @@ end ()
122 122
123 123
124static int 124static int
125method (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 125method (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
126 uint64_t message_id, const char *name, 126 uint64_t message_id, const char *name,
127 size_t modifier_count, const struct GNUNET_ENV_Modifier *modifiers, 127 size_t modifier_count, const struct GNUNET_ENV_Modifier *modifiers,
128 uint64_t data_offset, const void *data, size_t data_size, 128 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,
136 136
137 137
138static int 138static int
139join (void *cls, const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, 139join (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *slave_key,
140 const char *method_name, 140 const char *method_name,
141 size_t variable_count, const struct GNUNET_ENV_Modifier *variables, 141 size_t variable_count, const struct GNUNET_ENV_Modifier *variables,
142 const void *data, size_t data_size, struct GNUNET_PSYC_JoinHandle *jh) 142 const void *data, size_t data_size, struct GNUNET_PSYC_JoinHandle *jh)
@@ -243,8 +243,8 @@ run (void *cls,
243 channel_key = GNUNET_CRYPTO_ecc_key_create (); 243 channel_key = GNUNET_CRYPTO_ecc_key_create ();
244 slave_key = GNUNET_CRYPTO_ecc_key_create (); 244 slave_key = GNUNET_CRYPTO_ecc_key_create ();
245 245
246 GNUNET_CRYPTO_ecc_key_get_public_for_signature (channel_key, &channel_pub_key); 246 GNUNET_CRYPTO_eddsa_key_get_public (channel_key, &channel_pub_key);
247 GNUNET_CRYPTO_ecc_key_get_public_for_signature (slave_key, &slave_pub_key); 247 GNUNET_CRYPTO_eddsa_key_get_public (slave_key, &slave_pub_key);
248 248
249 mst = GNUNET_PSYC_master_start (cfg, channel_key, 249 mst = GNUNET_PSYC_master_start (cfg, channel_key,
250 GNUNET_PSYC_CHANNEL_PRIVATE, 250 GNUNET_PSYC_CHANNEL_PRIVATE,