aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2016-01-15 22:12:31 +0000
committerGabor X Toth <*@tg-x.net>2016-01-15 22:12:31 +0000
commit38e65c6c5268614b482d1234fea76cda11811044 (patch)
treeb9b9749dbfd45c8142571c7833c792e9f7043778
parent377e7340cce5136867734fb19e89a5fc51ac0c99 (diff)
downloadgnunet-38e65c6c5268614b482d1234fea76cda11811044.tar.gz
gnunet-38e65c6c5268614b482d1234fea76cda11811044.zip
psyc/multicast: var names
-rw-r--r--src/include/gnunet_multicast_service.h18
-rw-r--r--src/include/gnunet_psyc_service.h26
-rw-r--r--src/multicast/gnunet-service-multicast.c72
-rw-r--r--src/multicast/multicast.h12
-rw-r--r--src/multicast/multicast_api.c18
-rw-r--r--src/multicast/test_multicast.c2
-rw-r--r--src/psyc/gnunet-service-psyc.c54
-rw-r--r--src/psyc/psyc.h2
-rw-r--r--src/psyc/psyc_api.c20
-rw-r--r--src/psycutil/psyc_message.c8
10 files changed, 117 insertions, 115 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h
index 9bbc69243..a4da495a3 100644
--- a/src/include/gnunet_multicast_service.h
+++ b/src/include/gnunet_multicast_service.h
@@ -179,7 +179,7 @@ struct GNUNET_MULTICAST_RequestHeader
179 /** 179 /**
180 * Public key of the sending member. 180 * Public key of the sending member.
181 */ 181 */
182 struct GNUNET_CRYPTO_EcdsaPublicKey member_key; 182 struct GNUNET_CRYPTO_EcdsaPublicKey member_pub_key;
183 183
184 /** 184 /**
185 * ECC signature of the request fragment. 185 * ECC signature of the request fragment.
@@ -285,7 +285,7 @@ GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh,
285 * 285 *
286 * @param cls 286 * @param cls
287 * Closure. 287 * Closure.
288 * @param member_key 288 * @param member_pub_key
289 * Public key of the member requesting join. 289 * Public key of the member requesting join.
290 * @param join_msg 290 * @param join_msg
291 * Application-dependent join message from the new member. 291 * Application-dependent join message from the new member.
@@ -294,7 +294,7 @@ GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *jh,
294 */ 294 */
295typedef void 295typedef void
296(*GNUNET_MULTICAST_JoinRequestCallback) (void *cls, 296(*GNUNET_MULTICAST_JoinRequestCallback) (void *cls,
297 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_key, 297 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key,
298 const struct GNUNET_MessageHeader *join_msg, 298 const struct GNUNET_MessageHeader *join_msg,
299 struct GNUNET_MULTICAST_JoinHandle *jh); 299 struct GNUNET_MULTICAST_JoinHandle *jh);
300 300
@@ -398,7 +398,7 @@ struct GNUNET_MULTICAST_ReplayHandle;
398 * @param cls 398 * @param cls
399 * Closure (set from GNUNET_MULTICAST_origin_start() 399 * Closure (set from GNUNET_MULTICAST_origin_start()
400 * or GNUNET_MULTICAST_member_join()). 400 * or GNUNET_MULTICAST_member_join()).
401 * @param member_key 401 * @param member_pub_key
402 * The member requesting replay. 402 * The member requesting replay.
403 * @param fragment_id 403 * @param fragment_id
404 * Which message fragment should be replayed. 404 * Which message fragment should be replayed.
@@ -409,7 +409,7 @@ struct GNUNET_MULTICAST_ReplayHandle;
409 */ 409 */
410typedef void 410typedef void
411(*GNUNET_MULTICAST_ReplayFragmentCallback) (void *cls, 411(*GNUNET_MULTICAST_ReplayFragmentCallback) (void *cls,
412 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_key, 412 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key,
413 uint64_t fragment_id, 413 uint64_t fragment_id,
414 uint64_t flags, 414 uint64_t flags,
415 struct GNUNET_MULTICAST_ReplayHandle *rh); 415 struct GNUNET_MULTICAST_ReplayHandle *rh);
@@ -425,7 +425,7 @@ typedef void
425 * @param cls 425 * @param cls
426 * Closure (set from GNUNET_MULTICAST_origin_start() 426 * Closure (set from GNUNET_MULTICAST_origin_start()
427 * or GNUNET_MULTICAST_member_join()). 427 * or GNUNET_MULTICAST_member_join()).
428 * @param member_key 428 * @param member_pub_key
429 * The member requesting replay. 429 * The member requesting replay.
430 * @param message_id 430 * @param message_id
431 * Which message should be replayed. 431 * Which message should be replayed.
@@ -438,7 +438,7 @@ typedef void
438 */ 438 */
439typedef void 439typedef void
440(*GNUNET_MULTICAST_ReplayMessageCallback) (void *cls, 440(*GNUNET_MULTICAST_ReplayMessageCallback) (void *cls,
441 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_key, 441 const struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key,
442 uint64_t message_id, 442 uint64_t message_id,
443 uint64_t fragment_offset, 443 uint64_t fragment_offset,
444 uint64_t flags, 444 uint64_t flags,
@@ -697,7 +697,7 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin,
697 * Configuration to use. 697 * Configuration to use.
698 * @param group_key 698 * @param group_key
699 * ECC public key that identifies the group to join. 699 * ECC public key that identifies the group to join.
700 * @param member_key 700 * @param member_pub_key
701 * ECC key that identifies the member 701 * ECC key that identifies the member
702 * and used to sign requests sent to the origin. 702 * and used to sign requests sent to the origin.
703 * @param origin 703 * @param origin
@@ -736,7 +736,7 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin,
736struct GNUNET_MULTICAST_Member * 736struct GNUNET_MULTICAST_Member *
737GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, 737GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
738 const struct GNUNET_CRYPTO_EddsaPublicKey *group_key, 738 const struct GNUNET_CRYPTO_EddsaPublicKey *group_key,
739 const struct GNUNET_CRYPTO_EcdsaPrivateKey *member_key, 739 const struct GNUNET_CRYPTO_EcdsaPrivateKey *member_pub_key,
740 const struct GNUNET_PeerIdentity *origin, 740 const struct GNUNET_PeerIdentity *origin,
741 uint16_t relay_count, 741 uint16_t relay_count,
742 const struct GNUNET_PeerIdentity *relays, 742 const struct GNUNET_PeerIdentity *relays,
diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h
index 526a70f01..57134baf5 100644
--- a/src/include/gnunet_psyc_service.h
+++ b/src/include/gnunet_psyc_service.h
@@ -258,7 +258,7 @@ struct GNUNET_PSYC_MessageHeader
258 * Sending slave's public key. 258 * Sending slave's public key.
259 * Not set if the message is from the master. 259 * Not set if the message is from the master.
260 */ 260 */
261 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key; 261 struct GNUNET_CRYPTO_EcdsaPublicKey slave_pub_key;
262 262
263 /* Followed by concatenated PSYC message parts: 263 /* Followed by concatenated PSYC message parts:
264 * messages with GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_* types 264 * messages with GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_* types
@@ -351,7 +351,7 @@ struct GNUNET_PSYC_JoinRequestMessage
351 /** 351 /**
352 * Public key of the joining slave. 352 * Public key of the joining slave.
353 */ 353 */
354 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key; 354 struct GNUNET_CRYPTO_EcdsaPublicKey slave_pub_key;
355 355
356 /* Followed by struct GNUNET_MessageHeader join_request */ 356 /* Followed by struct GNUNET_MessageHeader join_request */
357}; 357};
@@ -377,7 +377,7 @@ struct GNUNET_PSYC_JoinDecisionMessage
377 * Only set when the master is sending the decision, 377 * Only set when the master is sending the decision,
378 * not set when a slave is receiving it. 378 * not set when a slave is receiving it.
379 */ 379 */
380 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key; 380 struct GNUNET_CRYPTO_EcdsaPublicKey slave_pub_key;
381 381
382 /* Followed by struct GNUNET_MessageHeader join_response */ 382 /* Followed by struct GNUNET_MessageHeader join_response */
383}; 383};
@@ -544,7 +544,7 @@ typedef void
544 * 544 *
545 * @param cls 545 * @param cls
546 * Closure. 546 * Closure.
547 * @param slave_key 547 * @param slave_pub_key
548 * Public key of the slave sending the message. 548 * Public key of the slave sending the message.
549 * Only set for channel master. 549 * Only set for channel master.
550 * @param message_id 550 * @param message_id
@@ -564,7 +564,7 @@ typedef void
564 */ 564 */
565typedef void 565typedef void
566(*GNUNET_PSYC_MessagePartCallback) (void *cls, 566(*GNUNET_PSYC_MessagePartCallback) (void *cls,
567 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 567 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
568 uint64_t message_id, 568 uint64_t message_id,
569 uint32_t flags, 569 uint32_t flags,
570 uint64_t data_offset, 570 uint64_t data_offset,
@@ -576,7 +576,7 @@ typedef void
576 * 576 *
577 * @param cls 577 * @param cls
578 * Closure. 578 * Closure.
579 * @param slave_key 579 * @param slave_pub_key
580 * Public key of the slave requesting join. 580 * Public key of the slave requesting join.
581 * @param join_msg 581 * @param join_msg
582 * Join message sent along with the request. 582 * Join message sent along with the request.
@@ -586,7 +586,7 @@ typedef void
586typedef void 586typedef void
587(*GNUNET_PSYC_JoinRequestCallback) (void *cls, 587(*GNUNET_PSYC_JoinRequestCallback) (void *cls,
588 const struct GNUNET_PSYC_JoinRequestMessage *req, 588 const struct GNUNET_PSYC_JoinRequestMessage *req,
589 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 589 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
590 const struct GNUNET_PSYC_Message *join_msg, 590 const struct GNUNET_PSYC_Message *join_msg,
591 struct GNUNET_PSYC_JoinHandle *jh); 591 struct GNUNET_PSYC_JoinHandle *jh);
592 592
@@ -920,7 +920,7 @@ enum GNUNET_PSYC_SlaveJoinFlags
920 * Configuration to use. 920 * Configuration to use.
921 * @param channel_pub_key 921 * @param channel_pub_key
922 * ECC public key that identifies the channel we wish to join. 922 * ECC public key that identifies the channel we wish to join.
923 * @param slave_key 923 * @param slave_pub_key
924 * ECC private-public key pair that identifies the slave, and 924 * ECC private-public key pair that identifies the slave, and
925 * used by multicast to sign the join request and subsequent unicast 925 * used by multicast to sign the join request and subsequent unicast
926 * requests sent to the master. 926 * requests sent to the master.
@@ -951,7 +951,7 @@ enum GNUNET_PSYC_SlaveJoinFlags
951struct GNUNET_PSYC_Slave * 951struct GNUNET_PSYC_Slave *
952GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg, 952GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
953 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_pub_key, 953 const struct GNUNET_CRYPTO_EddsaPublicKey *channel_pub_key,
954 const struct GNUNET_CRYPTO_EcdsaPrivateKey *slave_key, 954 const struct GNUNET_CRYPTO_EcdsaPrivateKey *slave_pub_key,
955 enum GNUNET_PSYC_SlaveJoinFlags flags, 955 enum GNUNET_PSYC_SlaveJoinFlags flags,
956 const struct GNUNET_PeerIdentity *origin, 956 const struct GNUNET_PeerIdentity *origin,
957 uint32_t relay_count, 957 uint32_t relay_count,
@@ -1085,7 +1085,7 @@ GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave);
1085 * 1085 *
1086 * @param channel 1086 * @param channel
1087 * Channel handle. 1087 * Channel handle.
1088 * @param slave_key 1088 * @param slave_pub_key
1089 * Identity of channel slave to add. 1089 * Identity of channel slave to add.
1090 * @param announced_at 1090 * @param announced_at
1091 * ID of the message that announced the membership change. 1091 * ID of the message that announced the membership change.
@@ -1101,7 +1101,7 @@ GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave);
1101 */ 1101 */
1102void 1102void
1103GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel, 1103GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
1104 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 1104 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
1105 uint64_t announced_at, 1105 uint64_t announced_at,
1106 uint64_t effective_since, 1106 uint64_t effective_since,
1107 GNUNET_ResultCallback result_cb, 1107 GNUNET_ResultCallback result_cb,
@@ -1127,7 +1127,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
1127 * 1127 *
1128 * @param channel 1128 * @param channel
1129 * Channel handle. 1129 * Channel handle.
1130 * @param slave_key 1130 * @param slave_pub_key
1131 * Identity of channel slave to remove. 1131 * Identity of channel slave to remove.
1132 * @param announced_at 1132 * @param announced_at
1133 * ID of the message that announced the membership change. 1133 * ID of the message that announced the membership change.
@@ -1142,7 +1142,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
1142void 1142void
1143GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, 1143GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel,
1144 const struct GNUNET_CRYPTO_EcdsaPublicKey 1144 const struct GNUNET_CRYPTO_EcdsaPublicKey
1145 *slave_key, 1145 *slave_pub_key,
1146 uint64_t announced_at, 1146 uint64_t announced_at,
1147 GNUNET_ResultCallback result_cb, 1147 GNUNET_ResultCallback result_cb,
1148 void *cls); 1148 void *cls);
diff --git a/src/multicast/gnunet-service-multicast.c b/src/multicast/gnunet-service-multicast.c
index 4d2868669..39789360c 100644
--- a/src/multicast/gnunet-service-multicast.c
+++ b/src/multicast/gnunet-service-multicast.c
@@ -157,17 +157,17 @@ struct Channel
157 /** 157 /**
158 * Public key of the target group. 158 * Public key of the target group.
159 */ 159 */
160 struct GNUNET_CRYPTO_EddsaPublicKey group_key; 160 struct GNUNET_CRYPTO_EddsaPublicKey group_pub_key;
161 161
162 /** 162 /**
163 * Hash of @a group_key. 163 * Hash of @a group_pub_key.
164 */ 164 */
165 struct GNUNET_HashCode group_key_hash; 165 struct GNUNET_HashCode group_pub_hash;
166 166
167 /** 167 /**
168 * Public key of the joining member. 168 * Public key of the joining member.
169 */ 169 */
170 struct GNUNET_CRYPTO_EcdsaPublicKey member_key; 170 struct GNUNET_CRYPTO_EcdsaPublicKey member_pub_key;
171 171
172 /** 172 /**
173 * Remote peer identity. 173 * Remote peer identity.
@@ -735,7 +735,7 @@ cadet_notify_transmit_ready (void *cls, size_t buf_size, void *buf)
735 } 735 }
736 else if (0 == --chn->msgs_pending) 736 else if (0 == --chn->msgs_pending)
737 { 737 {
738 client_send_ack (&chn->group_key_hash); 738 client_send_ack (&chn->group_pub_hash);
739 } 739 }
740 return msg_size; 740 return msg_size;
741} 741}
@@ -770,10 +770,10 @@ cadet_send_channel (struct Channel *chn, const struct GNUNET_MessageHeader *msg)
770 * 770 *
771 * @param peer 771 * @param peer
772 * Peer to connect to. 772 * Peer to connect to.
773 * @param group_key 773 * @param group_pub_key
774 * Public key of group the channel belongs to. 774 * Public key of group the channel belongs to.
775 * @param group_key_hash 775 * @param group_pub_hash
776 * Hash of @a group_key. 776 * Hash of @a group_pub_key.
777 * 777 *
778 * @return Channel. 778 * @return Channel.
779 */ 779 */
@@ -782,15 +782,15 @@ cadet_channel_create (struct Group *grp, struct GNUNET_PeerIdentity *peer)
782{ 782{
783 struct Channel *chn = GNUNET_malloc (sizeof (*chn)); 783 struct Channel *chn = GNUNET_malloc (sizeof (*chn));
784 chn->grp = grp; 784 chn->grp = grp;
785 chn->group_key = grp->pub_key; 785 chn->group_pub_key = grp->pub_key;
786 chn->group_key_hash = grp->pub_key_hash; 786 chn->group_pub_hash = grp->pub_key_hash;
787 chn->peer = *peer; 787 chn->peer = *peer;
788 chn->direction = DIR_OUTGOING; 788 chn->direction = DIR_OUTGOING;
789 chn->join_status = JOIN_WAITING; 789 chn->join_status = JOIN_WAITING;
790 chn->channel = GNUNET_CADET_channel_create (cadet, chn, &chn->peer, 790 chn->channel = GNUNET_CADET_channel_create (cadet, chn, &chn->peer,
791 GNUNET_APPLICATION_TYPE_MULTICAST, 791 GNUNET_APPLICATION_TYPE_MULTICAST,
792 GNUNET_CADET_OPTION_RELIABLE); 792 GNUNET_CADET_OPTION_RELIABLE);
793 GNUNET_CONTAINER_multihashmap_put (channels_out, &chn->group_key_hash, chn, 793 GNUNET_CONTAINER_multihashmap_put (channels_out, &chn->group_pub_hash, chn,
794 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 794 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
795 return chn; 795 return chn;
796} 796}
@@ -817,13 +817,13 @@ cadet_send_join_request (struct Member *mem)
817 817
818static int 818static int
819cadet_send_join_decision_cb (void *cls, 819cadet_send_join_decision_cb (void *cls,
820 const struct GNUNET_HashCode *group_key_hash, 820 const struct GNUNET_HashCode *group_pub_hash,
821 void *channel) 821 void *channel)
822{ 822{
823 const struct MulticastJoinDecisionMessageHeader *hdcsn = cls; 823 const struct MulticastJoinDecisionMessageHeader *hdcsn = cls;
824 struct Channel *chn = channel; 824 struct Channel *chn = channel;
825 825
826 if (0 == memcmp (&hdcsn->member_key, &chn->member_key, sizeof (chn->member_key)) 826 if (0 == memcmp (&hdcsn->member_pub_key, &chn->member_pub_key, sizeof (chn->member_pub_key))
827 && 0 == memcmp (&hdcsn->peer, &chn->peer, sizeof (chn->peer))) 827 && 0 == memcmp (&hdcsn->peer, &chn->peer, sizeof (chn->peer)))
828 { 828 {
829 cadet_send_channel (chn, &hdcsn->header); 829 cadet_send_channel (chn, &hdcsn->header);
@@ -958,7 +958,7 @@ client_recv_member_join (void *cls, struct GNUNET_SERVER_Client *client,
958 958
959 GNUNET_CRYPTO_ecdsa_key_get_public (&msg->member_key, &mem_pub_key); 959 GNUNET_CRYPTO_ecdsa_key_get_public (&msg->member_key, &mem_pub_key);
960 GNUNET_CRYPTO_hash (&mem_pub_key, sizeof (mem_pub_key), &mem_pub_key_hash); 960 GNUNET_CRYPTO_hash (&mem_pub_key, sizeof (mem_pub_key), &mem_pub_key_hash);
961 GNUNET_CRYPTO_hash (&msg->group_key, sizeof (msg->group_key), &pub_key_hash); 961 GNUNET_CRYPTO_hash (&msg->group_pub_key, sizeof (msg->group_pub_key), &pub_key_hash);
962 962
963 struct GNUNET_CONTAINER_MultiHashMap * 963 struct GNUNET_CONTAINER_MultiHashMap *
964 grp_mem = GNUNET_CONTAINER_multihashmap_get (group_members, &pub_key_hash); 964 grp_mem = GNUNET_CONTAINER_multihashmap_get (group_members, &pub_key_hash);
@@ -979,7 +979,7 @@ client_recv_member_join (void *cls, struct GNUNET_SERVER_Client *client,
979 979
980 grp = &mem->grp; 980 grp = &mem->grp;
981 grp->is_origin = GNUNET_NO; 981 grp->is_origin = GNUNET_NO;
982 grp->pub_key = msg->group_key; 982 grp->pub_key = msg->group_pub_key;
983 grp->pub_key_hash = pub_key_hash; 983 grp->pub_key_hash = pub_key_hash;
984 984
985 if (NULL == grp_mem) 985 if (NULL == grp_mem)
@@ -1046,13 +1046,13 @@ client_recv_member_join (void *cls, struct GNUNET_SERVER_Client *client,
1046 req = GNUNET_malloc (sizeof (*req) + join_msg_size); 1046 req = GNUNET_malloc (sizeof (*req) + join_msg_size);
1047 req->header.size = htons (sizeof (*req) + join_msg_size); 1047 req->header.size = htons (sizeof (*req) + join_msg_size);
1048 req->header.type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST); 1048 req->header.type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST);
1049 req->group_key = grp->pub_key; 1049 req->group_pub_key = grp->pub_key;
1050 req->peer = this_peer; 1050 req->peer = this_peer;
1051 GNUNET_CRYPTO_ecdsa_key_get_public (&mem->priv_key, &req->member_key); 1051 GNUNET_CRYPTO_ecdsa_key_get_public (&mem->priv_key, &req->member_pub_key);
1052 if (0 < join_msg_size) 1052 if (0 < join_msg_size)
1053 memcpy (&req[1], join_msg, join_msg_size); 1053 memcpy (&req[1], join_msg, join_msg_size);
1054 1054
1055 req->member_key = mem->pub_key; 1055 req->member_pub_key = mem->pub_key;
1056 req->purpose.size = htonl (msg_size 1056 req->purpose.size = htonl (msg_size
1057 - sizeof (req->header) 1057 - sizeof (req->header)
1058 - sizeof (req->reserved) 1058 - sizeof (req->reserved)
@@ -1128,7 +1128,7 @@ client_recv_join_decision (void *cls, struct GNUNET_SERVER_Client *client,
1128 if (NULL != grp_mem) 1128 if (NULL != grp_mem)
1129 { 1129 {
1130 struct GNUNET_HashCode member_key_hash; 1130 struct GNUNET_HashCode member_key_hash;
1131 GNUNET_CRYPTO_hash (&hdcsn->member_key, sizeof (hdcsn->member_key), 1131 GNUNET_CRYPTO_hash (&hdcsn->member_pub_key, sizeof (hdcsn->member_pub_key),
1132 &member_key_hash); 1132 &member_key_hash);
1133 mem = GNUNET_CONTAINER_multihashmap_get (grp_mem, &member_key_hash); 1133 mem = GNUNET_CONTAINER_multihashmap_get (grp_mem, &member_key_hash);
1134 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1134 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1215,11 +1215,11 @@ client_recv_multicast_request (void *cls, struct GNUNET_SERVER_Client *client,
1215 1215
1216 /* FIXME: yucky, should use separate message structs for P2P and CS! */ 1216 /* FIXME: yucky, should use separate message structs for P2P and CS! */
1217 out = (struct GNUNET_MULTICAST_RequestHeader *) GNUNET_copy_message (m); 1217 out = (struct GNUNET_MULTICAST_RequestHeader *) GNUNET_copy_message (m);
1218 out->member_key = mem->pub_key; 1218 out->member_pub_key = mem->pub_key;
1219 out->fragment_id = GNUNET_ntohll (++mem->max_fragment_id); 1219 out->fragment_id = GNUNET_ntohll (++mem->max_fragment_id);
1220 out->purpose.size = htonl (ntohs (out->header.size) 1220 out->purpose.size = htonl (ntohs (out->header.size)
1221 - sizeof (out->header) 1221 - sizeof (out->header)
1222 - sizeof (out->member_key) 1222 - sizeof (out->member_pub_key)
1223 - sizeof (out->signature)); 1223 - sizeof (out->signature));
1224 out->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST); 1224 out->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST);
1225 1225
@@ -1551,26 +1551,26 @@ cadet_recv_join_request (void *cls,
1551 if (GNUNET_OK != 1551 if (GNUNET_OK !=
1552 GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST, 1552 GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST,
1553 &req->purpose, &req->signature, 1553 &req->purpose, &req->signature,
1554 &req->member_key)) 1554 &req->member_pub_key))
1555 { 1555 {
1556 GNUNET_break_op (0); 1556 GNUNET_break_op (0);
1557 return GNUNET_SYSERR; 1557 return GNUNET_SYSERR;
1558 } 1558 }
1559 1559
1560 struct GNUNET_HashCode group_key_hash; 1560 struct GNUNET_HashCode group_pub_hash;
1561 GNUNET_CRYPTO_hash (&req->group_key, sizeof (req->group_key), &group_key_hash); 1561 GNUNET_CRYPTO_hash (&req->group_pub_key, sizeof (req->group_pub_key), &group_pub_hash);
1562 1562
1563 struct Channel *chn = GNUNET_malloc (sizeof *chn); 1563 struct Channel *chn = GNUNET_malloc (sizeof *chn);
1564 chn->channel = channel; 1564 chn->channel = channel;
1565 chn->group_key = req->group_key; 1565 chn->group_pub_key = req->group_pub_key;
1566 chn->group_key_hash = group_key_hash; 1566 chn->group_pub_hash = group_pub_hash;
1567 chn->member_key = req->member_key; 1567 chn->member_pub_key = req->member_pub_key;
1568 chn->peer = req->peer; 1568 chn->peer = req->peer;
1569 chn->join_status = JOIN_WAITING; 1569 chn->join_status = JOIN_WAITING;
1570 GNUNET_CONTAINER_multihashmap_put (channels_in, &chn->group_key_hash, chn, 1570 GNUNET_CONTAINER_multihashmap_put (channels_in, &chn->group_pub_hash, chn,
1571 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 1571 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
1572 1572
1573 client_send_all (&group_key_hash, m); 1573 client_send_all (&group_pub_hash, m);
1574 return GNUNET_OK; 1574 return GNUNET_OK;
1575} 1575}
1576 1576
@@ -1670,13 +1670,13 @@ cadet_recv_message (void *cls,
1670 if (GNUNET_OK != 1670 if (GNUNET_OK !=
1671 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE, 1671 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE,
1672 &msg->purpose, &msg->signature, 1672 &msg->purpose, &msg->signature,
1673 &chn->group_key)) 1673 &chn->group_pub_key))
1674 { 1674 {
1675 GNUNET_break_op (0); 1675 GNUNET_break_op (0);
1676 return GNUNET_SYSERR; 1676 return GNUNET_SYSERR;
1677 } 1677 }
1678 1678
1679 client_send_all (&chn->group_key_hash, m); 1679 client_send_all (&chn->group_pub_hash, m);
1680 return GNUNET_OK; 1680 return GNUNET_OK;
1681} 1681}
1682 1682
@@ -1706,7 +1706,7 @@ cadet_recv_request (void *cls,
1706 } 1706 }
1707 if (ntohl (req->purpose.size) != (size 1707 if (ntohl (req->purpose.size) != (size
1708 - sizeof (req->header) 1708 - sizeof (req->header)
1709 - sizeof (req->member_key) 1709 - sizeof (req->member_pub_key)
1710 - sizeof (req->signature))) 1710 - sizeof (req->signature)))
1711 { 1711 {
1712 GNUNET_break_op (0); 1712 GNUNET_break_op (0);
@@ -1715,13 +1715,13 @@ cadet_recv_request (void *cls,
1715 if (GNUNET_OK != 1715 if (GNUNET_OK !=
1716 GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST, 1716 GNUNET_CRYPTO_ecdsa_verify (GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST,
1717 &req->purpose, &req->signature, 1717 &req->purpose, &req->signature,
1718 &req->member_key)) 1718 &req->member_pub_key))
1719 { 1719 {
1720 GNUNET_break_op (0); 1720 GNUNET_break_op (0);
1721 return GNUNET_SYSERR; 1721 return GNUNET_SYSERR;
1722 } 1722 }
1723 1723
1724 client_send_origin (&chn->group_key_hash, m); 1724 client_send_origin (&chn->group_pub_hash, m);
1725 return GNUNET_OK; 1725 return GNUNET_OK;
1726} 1726}
1727 1727
@@ -1745,7 +1745,7 @@ cadet_recv_replay_request (void *cls,
1745 struct Channel *chn = *ctx; 1745 struct Channel *chn = *ctx;
1746 1746
1747 memcpy (&rep, m, sizeof (rep)); 1747 memcpy (&rep, m, sizeof (rep));
1748 memcpy (&rep.member_key, &chn->member_key, sizeof (chn->member_key)); 1748 memcpy (&rep.member_pub_key, &chn->member_pub_key, sizeof (chn->member_pub_key));
1749 1749
1750 struct GNUNET_CONTAINER_MultiHashMap * 1750 struct GNUNET_CONTAINER_MultiHashMap *
1751 grp_replay_req = GNUNET_CONTAINER_multihashmap_get (replay_req_cadet, 1751 grp_replay_req = GNUNET_CONTAINER_multihashmap_get (replay_req_cadet,
@@ -1763,7 +1763,7 @@ cadet_recv_replay_request (void *cls,
1763 GNUNET_CONTAINER_multihashmap_put (grp_replay_req, &key_hash, chn, 1763 GNUNET_CONTAINER_multihashmap_put (grp_replay_req, &key_hash, chn,
1764 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 1764 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
1765 1765
1766 client_send_random (&chn->group_key_hash, &rep.header); 1766 client_send_random (&chn->group_pub_hash, &rep.header);
1767 return GNUNET_OK; 1767 return GNUNET_OK;
1768} 1768}
1769 1769
diff --git a/src/multicast/multicast.h b/src/multicast/multicast.h
index 207f9f729..2d32bd6cf 100644
--- a/src/multicast/multicast.h
+++ b/src/multicast/multicast.h
@@ -63,12 +63,12 @@ struct MulticastJoinRequestMessage
63 /** 63 /**
64 * Public key of the target group. 64 * Public key of the target group.
65 */ 65 */
66 struct GNUNET_CRYPTO_EddsaPublicKey group_key; 66 struct GNUNET_CRYPTO_EddsaPublicKey group_pub_key;
67 67
68 /** 68 /**
69 * Public key of the joining member. 69 * Public key of the joining member.
70 */ 70 */
71 struct GNUNET_CRYPTO_EcdsaPublicKey member_key; 71 struct GNUNET_CRYPTO_EcdsaPublicKey member_pub_key;
72 72
73 /** 73 /**
74 * Peer identity of the joining member. 74 * Peer identity of the joining member.
@@ -128,7 +128,7 @@ struct MulticastJoinDecisionMessageHeader
128 * C->S: Public key of the member requesting join. 128 * C->S: Public key of the member requesting join.
129 * S->C: Unused. 129 * S->C: Unused.
130 */ 130 */
131 struct GNUNET_CRYPTO_EcdsaPublicKey member_key; 131 struct GNUNET_CRYPTO_EcdsaPublicKey member_pub_key;
132 132
133 /* Followed by struct MulticastJoinDecisionMessage */ 133 /* Followed by struct MulticastJoinDecisionMessage */
134}; 134};
@@ -176,7 +176,7 @@ struct MulticastReplayRequestMessage
176 * S->C: Public key of the member requesting replay. 176 * S->C: Public key of the member requesting replay.
177 * C->S: Unused. 177 * C->S: Unused.
178 */ 178 */
179 struct GNUNET_CRYPTO_EcdsaPublicKey member_key; 179 struct GNUNET_CRYPTO_EcdsaPublicKey member_pub_key;
180 180
181 /** 181 /**
182 * ID of the message that is being requested. 182 * ID of the message that is being requested.
@@ -286,7 +286,7 @@ struct MulticastMemberJoinMessage
286 286
287 uint32_t relay_count GNUNET_PACKED; 287 uint32_t relay_count GNUNET_PACKED;
288 288
289 struct GNUNET_CRYPTO_EddsaPublicKey group_key; 289 struct GNUNET_CRYPTO_EddsaPublicKey group_pub_key;
290 290
291 struct GNUNET_CRYPTO_EcdsaPrivateKey member_key; 291 struct GNUNET_CRYPTO_EcdsaPrivateKey member_key;
292 292
@@ -354,7 +354,7 @@ struct MulticastJoinMessage
354 /** 354 /**
355 * Public non-ephemeral key of the mutlicast group. 355 * Public non-ephemeral key of the mutlicast group.
356 */ 356 */
357 struct GNUNET_CRYPTO_EddsaPublicKey group_key; 357 struct GNUNET_CRYPTO_EddsaPublicKey group_pub_key;
358 358
359 /** 359 /**
360 * Our private key for the group. 360 * Our private key for the group.
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c
index 774a8bf70..e50711060 100644
--- a/src/multicast/multicast_api.c
+++ b/src/multicast/multicast_api.c
@@ -163,7 +163,7 @@ struct GNUNET_MULTICAST_JoinHandle
163 /** 163 /**
164 * Public key of the member requesting join. 164 * Public key of the member requesting join.
165 */ 165 */
166 struct GNUNET_CRYPTO_EcdsaPublicKey member_key; 166 struct GNUNET_CRYPTO_EcdsaPublicKey member_pub_key;
167 167
168 /** 168 /**
169 * Peer identity of the member requesting join. 169 * Peer identity of the member requesting join.
@@ -254,9 +254,9 @@ group_recv_join_request (void *cls,
254 jmsg = NULL; 254 jmsg = NULL;
255 jh = GNUNET_malloc (sizeof (*jh)); 255 jh = GNUNET_malloc (sizeof (*jh));
256 jh->group = grp; 256 jh->group = grp;
257 jh->member_key = jreq->member_key; 257 jh->member_pub_key = jreq->member_pub_key;
258 jh->peer = jreq->peer; 258 jh->peer = jreq->peer;
259 grp->join_req_cb (grp->cb_cls, &jreq->member_key, jmsg, jh); 259 grp->join_req_cb (grp->cb_cls, &jreq->member_pub_key, jmsg, jh);
260} 260}
261 261
262 262
@@ -366,7 +366,7 @@ group_recv_replay_request (void *cls,
366 struct GNUNET_MULTICAST_ReplayHandle * rh = GNUNET_malloc (sizeof (*rh)); 366 struct GNUNET_MULTICAST_ReplayHandle * rh = GNUNET_malloc (sizeof (*rh));
367 rh->grp = grp; 367 rh->grp = grp;
368 rh->req = *rep; 368 rh->req = *rep;
369 grp->replay_frag_cb (grp->cb_cls, &rep->member_key, 369 grp->replay_frag_cb (grp->cb_cls, &rep->member_pub_key,
370 GNUNET_ntohll (rep->fragment_id), 370 GNUNET_ntohll (rep->fragment_id),
371 GNUNET_ntohll (rep->flags), rh); 371 GNUNET_ntohll (rep->flags), rh);
372 } 372 }
@@ -378,7 +378,7 @@ group_recv_replay_request (void *cls,
378 struct GNUNET_MULTICAST_ReplayHandle * rh = GNUNET_malloc (sizeof (*rh)); 378 struct GNUNET_MULTICAST_ReplayHandle * rh = GNUNET_malloc (sizeof (*rh));
379 rh->grp = grp; 379 rh->grp = grp;
380 rh->req = *rep; 380 rh->req = *rep;
381 grp->replay_msg_cb (grp->cb_cls, &rep->member_key, 381 grp->replay_msg_cb (grp->cb_cls, &rep->member_pub_key,
382 GNUNET_ntohll (rep->message_id), 382 GNUNET_ntohll (rep->message_id),
383 GNUNET_ntohll (rep->fragment_offset), 383 GNUNET_ntohll (rep->fragment_offset),
384 GNUNET_ntohll (rep->flags), rh); 384 GNUNET_ntohll (rep->flags), rh);
@@ -615,7 +615,7 @@ GNUNET_MULTICAST_join_decision (struct GNUNET_MULTICAST_JoinHandle *join,
615 hdcsn->header.size = htons (sizeof (*hdcsn) + sizeof (*dcsn) 615 hdcsn->header.size = htons (sizeof (*hdcsn) + sizeof (*dcsn)
616 + relay_size + join_resp_size); 616 + relay_size + join_resp_size);
617 hdcsn->header.type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION); 617 hdcsn->header.type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION);
618 hdcsn->member_key = join->member_key; 618 hdcsn->member_pub_key = join->member_pub_key;
619 hdcsn->peer = join->peer; 619 hdcsn->peer = join->peer;
620 620
621 dcsn = (struct MulticastJoinDecisionMessage *) &hdcsn[1]; 621 dcsn = (struct MulticastJoinDecisionMessage *) &hdcsn[1];
@@ -995,7 +995,7 @@ GNUNET_MULTICAST_origin_to_all_cancel (struct GNUNET_MULTICAST_OriginTransmitHan
995 */ 995 */
996struct GNUNET_MULTICAST_Member * 996struct GNUNET_MULTICAST_Member *
997GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, 997GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
998 const struct GNUNET_CRYPTO_EddsaPublicKey *group_key, 998 const struct GNUNET_CRYPTO_EddsaPublicKey *group_pub_key,
999 const struct GNUNET_CRYPTO_EcdsaPrivateKey *member_key, 999 const struct GNUNET_CRYPTO_EcdsaPrivateKey *member_key,
1000 const struct GNUNET_PeerIdentity *origin, 1000 const struct GNUNET_PeerIdentity *origin,
1001 uint16_t relay_count, 1001 uint16_t relay_count,
@@ -1017,7 +1017,7 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
1017 join = GNUNET_malloc (sizeof (*join) + relay_size + join_msg_size); 1017 join = GNUNET_malloc (sizeof (*join) + relay_size + join_msg_size);
1018 join->header.size = htons (sizeof (*join) + relay_size + join_msg_size); 1018 join->header.size = htons (sizeof (*join) + relay_size + join_msg_size);
1019 join->header.type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_MEMBER_JOIN); 1019 join->header.type = htons (GNUNET_MESSAGE_TYPE_MULTICAST_MEMBER_JOIN);
1020 join->group_key = *group_key; 1020 join->group_pub_key = *group_pub_key;
1021 join->member_key = *member_key; 1021 join->member_key = *member_key;
1022 join->origin = *origin; 1022 join->origin = *origin;
1023 join->relay_count = ntohl (relay_count); 1023 join->relay_count = ntohl (relay_count);
@@ -1122,6 +1122,7 @@ GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *mem,
1122 uint64_t flags) 1122 uint64_t flags)
1123{ 1123{
1124 member_replay_request (mem, fragment_id, 0, 0, flags); 1124 member_replay_request (mem, fragment_id, 0, 0, flags);
1125 // FIXME: return
1125} 1126}
1126 1127
1127 1128
@@ -1150,6 +1151,7 @@ GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *mem,
1150 uint64_t flags) 1151 uint64_t flags)
1151{ 1152{
1152 member_replay_request (mem, 0, message_id, fragment_offset, flags); 1153 member_replay_request (mem, 0, message_id, fragment_offset, flags);
1154 // FIXME: return
1153} 1155}
1154 1156
1155 1157
diff --git a/src/multicast/test_multicast.c b/src/multicast/test_multicast.c
index 083af2ecc..4aa944df1 100644
--- a/src/multicast/test_multicast.c
+++ b/src/multicast/test_multicast.c
@@ -432,7 +432,7 @@ origin_recv_request (void *cls,
432 if (++ocls->n != ocls->msgs_expected) 432 if (++ocls->n != ocls->msgs_expected)
433 return; 433 return;
434 434
435 GNUNET_assert (0 == memcmp (&req->member_key, 435 GNUNET_assert (0 == memcmp (&req->member_pub_key,
436 &member_pub_key, sizeof (member_pub_key))); 436 &member_pub_key, sizeof (member_pub_key)));
437 437
438 438
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c
index 827f3d79b..fa9e6b1d0 100644
--- a/src/psyc/gnunet-service-psyc.c
+++ b/src/psyc/gnunet-service-psyc.c
@@ -315,7 +315,7 @@ struct Master
315 315
316 /** 316 /**
317 * Incoming join requests from multicast. 317 * Incoming join requests from multicast.
318 * member_key -> struct GNUNET_MULTICAST_JoinHandle * 318 * member_pub_key -> struct GNUNET_MULTICAST_JoinHandle *
319 */ 319 */
320 struct GNUNET_CONTAINER_MultiHashMap *join_reqs; 320 struct GNUNET_CONTAINER_MultiHashMap *join_reqs;
321 321
@@ -697,7 +697,7 @@ client_send_result (struct GNUNET_SERVER_Client *client, uint64_t op_id,
697 */ 697 */
698struct JoinMemTestClosure 698struct JoinMemTestClosure
699{ 699{
700 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key; 700 struct GNUNET_CRYPTO_EcdsaPublicKey slave_pub_key;
701 struct Channel *chn; 701 struct Channel *chn;
702 struct GNUNET_MULTICAST_JoinHandle *jh; 702 struct GNUNET_MULTICAST_JoinHandle *jh;
703 struct GNUNET_PSYC_JoinRequestMessage *join_msg; 703 struct GNUNET_PSYC_JoinRequestMessage *join_msg;
@@ -716,10 +716,10 @@ join_mem_test_cb (void *cls, int64_t result,
716 if (GNUNET_NO == result && GNUNET_YES == jcls->chn->is_master) 716 if (GNUNET_NO == result && GNUNET_YES == jcls->chn->is_master)
717 { /* Pass on join request to client if this is a master channel */ 717 { /* Pass on join request to client if this is a master channel */
718 struct Master *mst = (struct Master *) jcls->chn; 718 struct Master *mst = (struct Master *) jcls->chn;
719 struct GNUNET_HashCode slave_key_hash; 719 struct GNUNET_HashCode slave_pub_hash;
720 GNUNET_CRYPTO_hash (&jcls->slave_key, sizeof (jcls->slave_key), 720 GNUNET_CRYPTO_hash (&jcls->slave_pub_key, sizeof (jcls->slave_pub_key),
721 &slave_key_hash); 721 &slave_pub_hash);
722 GNUNET_CONTAINER_multihashmap_put (mst->join_reqs, &slave_key_hash, jcls->jh, 722 GNUNET_CONTAINER_multihashmap_put (mst->join_reqs, &slave_pub_hash, jcls->jh,
723 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); 723 GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
724 client_send_msg (jcls->chn, &jcls->join_msg->header); 724 client_send_msg (jcls->chn, &jcls->join_msg->header);
725 } 725 }
@@ -744,7 +744,7 @@ join_mem_test_cb (void *cls, int64_t result,
744 */ 744 */
745static void 745static void
746mcast_recv_join_request (void *cls, 746mcast_recv_join_request (void *cls,
747 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 747 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
748 const struct GNUNET_MessageHeader *join_msg, 748 const struct GNUNET_MessageHeader *join_msg,
749 struct GNUNET_MULTICAST_JoinHandle *jh) 749 struct GNUNET_MULTICAST_JoinHandle *jh)
750{ 750{
@@ -770,17 +770,17 @@ mcast_recv_join_request (void *cls,
770 req = GNUNET_malloc (sizeof (*req) + join_msg_size); 770 req = GNUNET_malloc (sizeof (*req) + join_msg_size);
771 req->header.size = htons (sizeof (*req) + join_msg_size); 771 req->header.size = htons (sizeof (*req) + join_msg_size);
772 req->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST); 772 req->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST);
773 req->slave_key = *slave_key; 773 req->slave_pub_key = *slave_pub_key;
774 if (0 < join_msg_size) 774 if (0 < join_msg_size)
775 memcpy (&req[1], join_msg, join_msg_size); 775 memcpy (&req[1], join_msg, join_msg_size);
776 776
777 struct JoinMemTestClosure *jcls = GNUNET_malloc (sizeof (*jcls)); 777 struct JoinMemTestClosure *jcls = GNUNET_malloc (sizeof (*jcls));
778 jcls->slave_key = *slave_key; 778 jcls->slave_pub_key = *slave_pub_key;
779 jcls->chn = chn; 779 jcls->chn = chn;
780 jcls->jh = jh; 780 jcls->jh = jh;
781 jcls->join_msg = req; 781 jcls->join_msg = req;
782 782
783 GNUNET_PSYCSTORE_membership_test (store, &chn->pub_key, slave_key, 783 GNUNET_PSYCSTORE_membership_test (store, &chn->pub_key, slave_pub_key,
784 chn->max_message_id, 0, 784 chn->max_message_id, 0,
785 &join_mem_test_cb, jcls); 785 &join_mem_test_cb, jcls);
786} 786}
@@ -878,13 +878,13 @@ store_recv_fragment_replay_result (void *cls, int64_t result,
878 */ 878 */
879static void 879static void
880mcast_recv_replay_fragment (void *cls, 880mcast_recv_replay_fragment (void *cls,
881 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 881 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
882 uint64_t fragment_id, uint64_t flags, 882 uint64_t fragment_id, uint64_t flags,
883 struct GNUNET_MULTICAST_ReplayHandle *rh) 883 struct GNUNET_MULTICAST_ReplayHandle *rh)
884 884
885{ 885{
886 struct Channel *chn = cls; 886 struct Channel *chn = cls;
887 GNUNET_PSYCSTORE_fragment_get (store, &chn->pub_key, slave_key, 887 GNUNET_PSYCSTORE_fragment_get (store, &chn->pub_key, slave_pub_key,
888 fragment_id, fragment_id, 888 fragment_id, fragment_id,
889 &store_recv_fragment_replay, 889 &store_recv_fragment_replay,
890 &store_recv_fragment_replay_result, rh); 890 &store_recv_fragment_replay_result, rh);
@@ -896,14 +896,14 @@ mcast_recv_replay_fragment (void *cls,
896 */ 896 */
897static void 897static void
898mcast_recv_replay_message (void *cls, 898mcast_recv_replay_message (void *cls,
899 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 899 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
900 uint64_t message_id, 900 uint64_t message_id,
901 uint64_t fragment_offset, 901 uint64_t fragment_offset,
902 uint64_t flags, 902 uint64_t flags,
903 struct GNUNET_MULTICAST_ReplayHandle *rh) 903 struct GNUNET_MULTICAST_ReplayHandle *rh)
904{ 904{
905 struct Channel *chn = cls; 905 struct Channel *chn = cls;
906 GNUNET_PSYCSTORE_message_get (store, &chn->pub_key, slave_key, 906 GNUNET_PSYCSTORE_message_get (store, &chn->pub_key, slave_pub_key,
907 message_id, message_id, 1, NULL, 907 message_id, message_id, 1, NULL,
908 &store_recv_fragment_replay, 908 &store_recv_fragment_replay,
909 &store_recv_fragment_replay_result, rh); 909 &store_recv_fragment_replay_result, rh);
@@ -1029,7 +1029,7 @@ client_send_mcast_req (struct Master *mst,
1029 pmsg->message_id = req->request_id; 1029 pmsg->message_id = req->request_id;
1030 pmsg->fragment_offset = req->fragment_offset; 1030 pmsg->fragment_offset = req->fragment_offset;
1031 pmsg->flags = htonl (GNUNET_PSYC_MESSAGE_REQUEST); 1031 pmsg->flags = htonl (GNUNET_PSYC_MESSAGE_REQUEST);
1032 pmsg->slave_key = req->member_key; 1032 pmsg->slave_pub_key = req->member_pub_key;
1033 1033
1034 memcpy (&pmsg[1], &req[1], size - sizeof (*req)); 1034 memcpy (&pmsg[1], &req[1], size - sizeof (*req));
1035 client_send_msg (chn, &pmsg->header); 1035 client_send_msg (chn, &pmsg->header);
@@ -1535,7 +1535,7 @@ mcast_recv_request (void *cls,
1535 struct Master *mst = cls; 1535 struct Master *mst = cls;
1536 uint16_t size = ntohs (req->header.size); 1536 uint16_t size = ntohs (req->header.size);
1537 1537
1538 char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&req->member_key); 1538 char *str = GNUNET_CRYPTO_ecdsa_public_key_to_string (&req->member_pub_key);
1539 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1539 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1540 "%p Received multicast request of size %u from %s.\n", 1540 "%p Received multicast request of size %u from %s.\n",
1541 mst, size, str); 1541 mst, size, str);
@@ -1745,10 +1745,10 @@ client_recv_slave_join (void *cls, struct GNUNET_SERVER_Client *client,
1745 uint16_t req_size = ntohs (req->header.size); 1745 uint16_t req_size = ntohs (req->header.size);
1746 1746
1747 struct GNUNET_CRYPTO_EcdsaPublicKey slv_pub_key; 1747 struct GNUNET_CRYPTO_EcdsaPublicKey slv_pub_key;
1748 struct GNUNET_HashCode pub_key_hash, slv_pub_key_hash; 1748 struct GNUNET_HashCode pub_key_hash, slv_pub_hash;
1749 1749
1750 GNUNET_CRYPTO_ecdsa_key_get_public (&req->slave_key, &slv_pub_key); 1750 GNUNET_CRYPTO_ecdsa_key_get_public (&req->slave_key, &slv_pub_key);
1751 GNUNET_CRYPTO_hash (&slv_pub_key, sizeof (slv_pub_key), &slv_pub_key_hash); 1751 GNUNET_CRYPTO_hash (&slv_pub_key, sizeof (slv_pub_key), &slv_pub_hash);
1752 GNUNET_CRYPTO_hash (&req->channel_pub_key, sizeof (req->channel_pub_key), &pub_key_hash); 1752 GNUNET_CRYPTO_hash (&req->channel_pub_key, sizeof (req->channel_pub_key), &pub_key_hash);
1753 1753
1754 struct GNUNET_CONTAINER_MultiHashMap * 1754 struct GNUNET_CONTAINER_MultiHashMap *
@@ -1758,14 +1758,14 @@ client_recv_slave_join (void *cls, struct GNUNET_SERVER_Client *client,
1758 1758
1759 if (NULL != chn_slv) 1759 if (NULL != chn_slv)
1760 { 1760 {
1761 slv = GNUNET_CONTAINER_multihashmap_get (chn_slv, &slv_pub_key_hash); 1761 slv = GNUNET_CONTAINER_multihashmap_get (chn_slv, &slv_pub_hash);
1762 } 1762 }
1763 if (NULL == slv) 1763 if (NULL == slv)
1764 { 1764 {
1765 slv = GNUNET_new (struct Slave); 1765 slv = GNUNET_new (struct Slave);
1766 slv->priv_key = req->slave_key; 1766 slv->priv_key = req->slave_key;
1767 slv->pub_key = slv_pub_key; 1767 slv->pub_key = slv_pub_key;
1768 slv->pub_key_hash = slv_pub_key_hash; 1768 slv->pub_key_hash = slv_pub_hash;
1769 slv->origin = req->origin; 1769 slv->origin = req->origin;
1770 slv->relay_count = ntohl (req->relay_count); 1770 slv->relay_count = ntohl (req->relay_count);
1771 slv->join_flags = ntohl (req->flags); 1771 slv->join_flags = ntohl (req->flags);
@@ -1928,20 +1928,20 @@ client_recv_join_decision (void *cls, struct GNUNET_SERVER_Client *client,
1928 ? (struct GNUNET_MessageHeader *) &dcsn[1] 1928 ? (struct GNUNET_MessageHeader *) &dcsn[1]
1929 : NULL; 1929 : NULL;
1930 1930
1931 struct GNUNET_HashCode slave_key_hash; 1931 struct GNUNET_HashCode slave_pub_hash;
1932 GNUNET_CRYPTO_hash (&dcsn->slave_key, sizeof (dcsn->slave_key), 1932 GNUNET_CRYPTO_hash (&dcsn->slave_pub_key, sizeof (dcsn->slave_pub_key),
1933 &slave_key_hash); 1933 &slave_pub_hash);
1934 1934
1935 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1935 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1936 "%p Got join decision (%d) from client for channel %s..\n", 1936 "%p Got join decision (%d) from client for channel %s..\n",
1937 mst, jcls.is_admitted, GNUNET_h2s (&chn->pub_key_hash)); 1937 mst, jcls.is_admitted, GNUNET_h2s (&chn->pub_key_hash));
1938 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1938 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1939 "%p ..and slave %s.\n", 1939 "%p ..and slave %s.\n",
1940 mst, GNUNET_h2s (&slave_key_hash)); 1940 mst, GNUNET_h2s (&slave_pub_hash));
1941 1941
1942 GNUNET_CONTAINER_multihashmap_get_multiple (mst->join_reqs, &slave_key_hash, 1942 GNUNET_CONTAINER_multihashmap_get_multiple (mst->join_reqs, &slave_pub_hash,
1943 &mcast_send_join_decision, &jcls); 1943 &mcast_send_join_decision, &jcls);
1944 GNUNET_CONTAINER_multihashmap_remove_all (mst->join_reqs, &slave_key_hash); 1944 GNUNET_CONTAINER_multihashmap_remove_all (mst->join_reqs, &slave_pub_hash);
1945 GNUNET_SERVER_receive_done (client, GNUNET_OK); 1945 GNUNET_SERVER_receive_done (client, GNUNET_OK);
1946} 1946}
1947 1947
@@ -2326,7 +2326,7 @@ client_recv_membership_store (void *cls, struct GNUNET_SERVER_Client *client,
2326 "%p did_join: %u, announced_at: %" PRIu64 ", effective_since: %" PRIu64 "\n", 2326 "%p did_join: %u, announced_at: %" PRIu64 ", effective_since: %" PRIu64 "\n",
2327 chn, req->did_join, announced_at, effective_since); 2327 chn, req->did_join, announced_at, effective_since);
2328 2328
2329 GNUNET_PSYCSTORE_membership_store (store, &chn->pub_key, &req->slave_key, 2329 GNUNET_PSYCSTORE_membership_store (store, &chn->pub_key, &req->slave_pub_key,
2330 req->did_join, announced_at, effective_since, 2330 req->did_join, announced_at, effective_since,
2331 0, /* FIXME: group_generation */ 2331 0, /* FIXME: group_generation */
2332 &store_recv_membership_store_result, op); 2332 &store_recv_membership_store_result, op);
diff --git a/src/psyc/psyc.h b/src/psyc/psyc.h
index cc7475df7..5e8fd4920 100644
--- a/src/psyc/psyc.h
+++ b/src/psyc/psyc.h
@@ -118,7 +118,7 @@ struct ChannelMembershipStoreRequest
118 118
119 uint64_t op_id GNUNET_PACKED; 119 uint64_t op_id GNUNET_PACKED;
120 120
121 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key; 121 struct GNUNET_CRYPTO_EcdsaPublicKey slave_pub_key;
122 122
123 uint64_t announced_at GNUNET_PACKED; 123 uint64_t announced_at GNUNET_PACKED;
124 124
diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c
index c9d74f3c8..4e3d9fd7f 100644
--- a/src/psyc/psyc_api.c
+++ b/src/psyc/psyc_api.c
@@ -148,7 +148,7 @@ struct GNUNET_PSYC_Slave
148struct GNUNET_PSYC_JoinHandle 148struct GNUNET_PSYC_JoinHandle
149{ 149{
150 struct GNUNET_PSYC_Master *mst; 150 struct GNUNET_PSYC_Master *mst;
151 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key; 151 struct GNUNET_CRYPTO_EcdsaPublicKey slave_pub_key;
152}; 152};
153 153
154 154
@@ -470,10 +470,10 @@ master_recv_join_request (void *cls,
470 470
471 struct GNUNET_PSYC_JoinHandle *jh = GNUNET_malloc (sizeof (*jh)); 471 struct GNUNET_PSYC_JoinHandle *jh = GNUNET_malloc (sizeof (*jh));
472 jh->mst = mst; 472 jh->mst = mst;
473 jh->slave_key = req->slave_key; 473 jh->slave_pub_key = req->slave_pub_key;
474 474
475 if (NULL != mst->join_req_cb) 475 if (NULL != mst->join_req_cb)
476 mst->join_req_cb (mst->cb_cls, req, &req->slave_key, join_msg, jh); 476 mst->join_req_cb (mst->cb_cls, req, &req->slave_pub_key, join_msg, jh);
477} 477}
478 478
479 479
@@ -756,7 +756,7 @@ GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh,
756 dcsn->header.size = htons (sizeof (*dcsn) + relay_size + join_resp_size); 756 dcsn->header.size = htons (sizeof (*dcsn) + relay_size + join_resp_size);
757 dcsn->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION); 757 dcsn->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION);
758 dcsn->is_admitted = htonl (is_admitted); 758 dcsn->is_admitted = htonl (is_admitted);
759 dcsn->slave_key = jh->slave_key; 759 dcsn->slave_pub_key = jh->slave_pub_key;
760 760
761 if (0 < join_resp_size) 761 if (0 < join_resp_size)
762 memcpy (&dcsn[1], join_resp, join_resp_size); 762 memcpy (&dcsn[1], join_resp, join_resp_size);
@@ -1045,7 +1045,7 @@ GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slv)
1045 * 1045 *
1046 * @param chn 1046 * @param chn
1047 * Channel handle. 1047 * Channel handle.
1048 * @param slave_key 1048 * @param slave_pub_key
1049 * Identity of channel slave to add. 1049 * Identity of channel slave to add.
1050 * @param announced_at 1050 * @param announced_at
1051 * ID of the message that announced the membership change. 1051 * ID of the message that announced the membership change.
@@ -1061,7 +1061,7 @@ GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slv)
1061 */ 1061 */
1062void 1062void
1063GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn, 1063GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn,
1064 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 1064 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
1065 uint64_t announced_at, 1065 uint64_t announced_at,
1066 uint64_t effective_since, 1066 uint64_t effective_since,
1067 GNUNET_ResultCallback result_cb, 1067 GNUNET_ResultCallback result_cb,
@@ -1070,7 +1070,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn,
1070 struct ChannelMembershipStoreRequest *req = GNUNET_malloc (sizeof (*req)); 1070 struct ChannelMembershipStoreRequest *req = GNUNET_malloc (sizeof (*req));
1071 req->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_MEMBERSHIP_STORE); 1071 req->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_MEMBERSHIP_STORE);
1072 req->header.size = htons (sizeof (*req)); 1072 req->header.size = htons (sizeof (*req));
1073 req->slave_key = *slave_key; 1073 req->slave_pub_key = *slave_pub_key;
1074 req->announced_at = GNUNET_htonll (announced_at); 1074 req->announced_at = GNUNET_htonll (announced_at);
1075 req->effective_since = GNUNET_htonll (effective_since); 1075 req->effective_since = GNUNET_htonll (effective_since);
1076 req->did_join = GNUNET_YES; 1076 req->did_join = GNUNET_YES;
@@ -1100,7 +1100,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn,
1100 * 1100 *
1101 * @param chn 1101 * @param chn
1102 * Channel handle. 1102 * Channel handle.
1103 * @param slave_key 1103 * @param slave_pub_key
1104 * Identity of channel slave to remove. 1104 * Identity of channel slave to remove.
1105 * @param announced_at 1105 * @param announced_at
1106 * ID of the message that announced the membership change. 1106 * ID of the message that announced the membership change.
@@ -1114,7 +1114,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn,
1114 */ 1114 */
1115void 1115void
1116GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *chn, 1116GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *chn,
1117 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 1117 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
1118 uint64_t announced_at, 1118 uint64_t announced_at,
1119 GNUNET_ResultCallback result_cb, 1119 GNUNET_ResultCallback result_cb,
1120 void *cls) 1120 void *cls)
@@ -1122,7 +1122,7 @@ GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *chn,
1122 struct ChannelMembershipStoreRequest *req = GNUNET_malloc (sizeof (*req)); 1122 struct ChannelMembershipStoreRequest *req = GNUNET_malloc (sizeof (*req));
1123 req->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_MEMBERSHIP_STORE); 1123 req->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_MEMBERSHIP_STORE);
1124 req->header.size = htons (sizeof (*req)); 1124 req->header.size = htons (sizeof (*req));
1125 req->slave_key = *slave_key; 1125 req->slave_pub_key = *slave_pub_key;
1126 req->announced_at = GNUNET_htonll (announced_at); 1126 req->announced_at = GNUNET_htonll (announced_at);
1127 req->did_join = GNUNET_NO; 1127 req->did_join = GNUNET_NO;
1128 req->op_id = GNUNET_htonll (GNUNET_CLIENT_MANAGER_op_add (chn->client, 1128 req->op_id = GNUNET_htonll (GNUNET_CLIENT_MANAGER_op_add (chn->client,
diff --git a/src/psycutil/psyc_message.c b/src/psycutil/psyc_message.c
index 8c214d2b6..2bdd4497a 100644
--- a/src/psycutil/psyc_message.c
+++ b/src/psycutil/psyc_message.c
@@ -135,7 +135,7 @@ struct GNUNET_PSYC_ReceiveHandle
135 /** 135 /**
136 * Public key of the slave from which a message is being received. 136 * Public key of the slave from which a message is being received.
137 */ 137 */
138 struct GNUNET_CRYPTO_EcdsaPublicKey slave_key; 138 struct GNUNET_CRYPTO_EcdsaPublicKey slave_pub_key;
139 139
140 /** 140 /**
141 * State of the currently being received message from the PSYC service. 141 * State of the currently being received message from the PSYC service.
@@ -913,7 +913,7 @@ GNUNET_PSYC_receive_message (struct GNUNET_PSYC_ReceiveHandle *recv,
913 { 913 {
914 recv->message_id = GNUNET_ntohll (msg->message_id); 914 recv->message_id = GNUNET_ntohll (msg->message_id);
915 recv->flags = flags; 915 recv->flags = flags;
916 recv->slave_key = msg->slave_key; 916 recv->slave_pub_key = msg->slave_pub_key;
917 recv->mod_value_size = 0; 917 recv->mod_value_size = 0;
918 recv->mod_value_size_expected = 0; 918 recv->mod_value_size_expected = 0;
919 } 919 }
@@ -1099,7 +1099,7 @@ GNUNET_PSYC_receive_message (struct GNUNET_PSYC_ReceiveHandle *recv,
1099 } 1099 }
1100 1100
1101 if (NULL != recv->message_part_cb) 1101 if (NULL != recv->message_part_cb)
1102 recv->message_part_cb (recv->cb_cls, &recv->slave_key, 1102 recv->message_part_cb (recv->cb_cls, &recv->slave_pub_key,
1103 recv->message_id, recv->flags, 1103 recv->message_id, recv->flags,
1104 0, // FIXME: data_offset 1104 0, // FIXME: data_offset
1105 pmsg); 1105 pmsg);
@@ -1180,7 +1180,7 @@ struct ParseMessageClosure
1180 1180
1181static void 1181static void
1182parse_message_part_cb (void *cls, 1182parse_message_part_cb (void *cls,
1183 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, 1183 const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_pub_key,
1184 uint64_t message_id, uint32_t flags, uint64_t data_offset, 1184 uint64_t message_id, uint32_t flags, uint64_t data_offset,
1185 const struct GNUNET_MessageHeader *msg) 1185 const struct GNUNET_MessageHeader *msg)
1186{ 1186{