aboutsummaryrefslogtreecommitdiff
path: root/src/hello/hello.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hello/hello.c')
-rw-r--r--src/hello/hello.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/hello/hello.c b/src/hello/hello.c
index a6fe6102f..780c1f127 100644
--- a/src/hello/hello.c
+++ b/src/hello/hello.c
@@ -59,7 +59,7 @@ struct GNUNET_HELLO_Message
59 /** 59 /**
60 * The public key of the peer. 60 * The public key of the peer.
61 */ 61 */
62 struct GNUNET_CRYPTO_EccPublicKey publicKey; 62 struct GNUNET_CRYPTO_EccPublicSignKey publicKey;
63 63
64}; 64};
65GNUNET_NETWORK_STRUCT_END 65GNUNET_NETWORK_STRUCT_END
@@ -216,7 +216,7 @@ get_hello_address_size (const char *buf, size_t max, uint16_t * ralen)
216 * @return the hello message 216 * @return the hello message
217 */ 217 */
218struct GNUNET_HELLO_Message * 218struct GNUNET_HELLO_Message *
219GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicKey *publicKey, 219GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicSignKey *publicKey,
220 GNUNET_HELLO_GenerateAddressListCallback addrgen, 220 GNUNET_HELLO_GenerateAddressListCallback addrgen,
221 void *addrgen_cls, 221 void *addrgen_cls,
222 int friend_only) 222 int friend_only)
@@ -247,7 +247,7 @@ GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EccPublicKey *publicKey,
247 hello->friend_only = htonl (friend_only); 247 hello->friend_only = htonl (friend_only);
248 248
249 memcpy (&hello->publicKey, publicKey, 249 memcpy (&hello->publicKey, publicKey,
250 sizeof (struct GNUNET_CRYPTO_EccPublicKey)); 250 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey));
251 memcpy (&hello[1], buffer, used); 251 memcpy (&hello[1], buffer, used);
252 return hello; 252 return hello;
253} 253}
@@ -295,7 +295,7 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
295 wpos = 0; 295 wpos = 0;
296 woff = (ret != NULL) ? (char *) &ret[1] : NULL; 296 woff = (ret != NULL) ? (char *) &ret[1] : NULL;
297 GNUNET_CRYPTO_hash (&msg->publicKey, 297 GNUNET_CRYPTO_hash (&msg->publicKey,
298 sizeof (struct GNUNET_CRYPTO_EccPublicKey), 298 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
299 &address.peer.hashPubKey); 299 &address.peer.hashPubKey);
300 while (insize > 0) 300 while (insize > 0)
301 { 301 {
@@ -530,7 +530,7 @@ GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello)
530 */ 530 */
531int 531int
532GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello, 532GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
533 struct GNUNET_CRYPTO_EccPublicKey *publicKey) 533 struct GNUNET_CRYPTO_EccPublicSignKey *publicKey)
534{ 534{
535 uint16_t ret = ntohs (hello->header.size); 535 uint16_t ret = ntohs (hello->header.size);
536 536
@@ -559,7 +559,7 @@ GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
559 (ntohs (hello->header.type) != GNUNET_MESSAGE_TYPE_HELLO)) 559 (ntohs (hello->header.type) != GNUNET_MESSAGE_TYPE_HELLO))
560 return GNUNET_SYSERR; 560 return GNUNET_SYSERR;
561 GNUNET_CRYPTO_hash (&hello->publicKey, 561 GNUNET_CRYPTO_hash (&hello->publicKey,
562 sizeof (struct GNUNET_CRYPTO_EccPublicKey), 562 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
563 &peer->hashPubKey); 563 &peer->hashPubKey);
564 return GNUNET_OK; 564 return GNUNET_OK;
565} 565}
@@ -671,7 +671,7 @@ GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1,
671 671
672 if (0 != 672 if (0 !=
673 memcmp (&h1->publicKey, &h2->publicKey, 673 memcmp (&h1->publicKey, &h2->publicKey,
674 sizeof (struct GNUNET_CRYPTO_EccPublicKey))) 674 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)))
675 return GNUNET_TIME_UNIT_ZERO_ABS; 675 return GNUNET_TIME_UNIT_ZERO_ABS;
676 ec.expiration_limit = now; 676 ec.expiration_limit = now;
677 ec.result = GNUNET_TIME_UNIT_FOREVER_ABS; 677 ec.result = GNUNET_TIME_UNIT_FOREVER_ABS;
@@ -1046,7 +1046,7 @@ add_address_to_hello (void *cls, size_t max, void *buffer)
1046 */ 1046 */
1047int 1047int
1048GNUNET_HELLO_parse_uri (const char *uri, 1048GNUNET_HELLO_parse_uri (const char *uri,
1049 struct GNUNET_CRYPTO_EccPublicKey *pubkey, 1049 struct GNUNET_CRYPTO_EccPublicSignKey *pubkey,
1050 struct GNUNET_HELLO_Message **hello, 1050 struct GNUNET_HELLO_Message **hello,
1051 GNUNET_HELLO_TransportPluginsFind plugins_find) 1051 GNUNET_HELLO_TransportPluginsFind plugins_find)
1052{ 1052{