aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-13 12:00:01 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-13 12:00:01 +0000
commita35c5a11d32bdd0bc24f64de36fbc6b0d0b20aae (patch)
treeb7768c5cb22e8a4f84d51cbd06dc04861fdb8510 /src/transport
parent95d42fdcb47eedcf2747614a22dacd676bc7faae (diff)
downloadgnunet-a35c5a11d32bdd0bc24f64de36fbc6b0d0b20aae.tar.gz
gnunet-a35c5a11d32bdd0bc24f64de36fbc6b0d0b20aae.zip
splitting 'struct GNUNET_CRYPTO_EccPublicKey' into one struct for signing and another for encryption
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport.c4
-rw-r--r--src/transport/gnunet-service-transport.h2
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c8
-rw-r--r--src/transport/gnunet-service-transport_validation.c10
-rw-r--r--src/transport/gnunet-service-transport_validation.h2
-rw-r--r--src/transport/test_plugin_transport.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 50cd367d5..6291266f6 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -70,7 +70,7 @@ static struct GNUNET_SERVER_Handle *GST_server;
70/** 70/**
71 * Our public key. 71 * Our public key.
72 */ 72 */
73struct GNUNET_CRYPTO_EccPublicKey GST_my_public_key; 73struct GNUNET_CRYPTO_EccPublicSignKey GST_my_public_key;
74 74
75/** 75/**
76 * Our private key. 76 * Our private key.
@@ -769,7 +769,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
769 769
770 GST_stats = GNUNET_STATISTICS_create ("transport", GST_cfg); 770 GST_stats = GNUNET_STATISTICS_create ("transport", GST_cfg);
771 GST_peerinfo = GNUNET_PEERINFO_connect (GST_cfg); 771 GST_peerinfo = GNUNET_PEERINFO_connect (GST_cfg);
772 GNUNET_CRYPTO_ecc_key_get_public (GST_my_private_key, &GST_my_public_key); 772 GNUNET_CRYPTO_ecc_key_get_public_for_signature (GST_my_private_key, &GST_my_public_key);
773 GNUNET_CRYPTO_hash (&GST_my_public_key, sizeof (GST_my_public_key), 773 GNUNET_CRYPTO_hash (&GST_my_public_key, sizeof (GST_my_public_key),
774 &GST_my_identity.hashPubKey); 774 &GST_my_identity.hashPubKey);
775 GNUNET_assert (NULL != GST_my_private_key); 775 GNUNET_assert (NULL != GST_my_private_key);
diff --git a/src/transport/gnunet-service-transport.h b/src/transport/gnunet-service-transport.h
index a9f455b6a..44b375dd8 100644
--- a/src/transport/gnunet-service-transport.h
+++ b/src/transport/gnunet-service-transport.h
@@ -55,7 +55,7 @@ extern struct GNUNET_PEERINFO_Handle *GST_peerinfo;
55/** 55/**
56 * Our public key. 56 * Our public key.
57 */ 57 */
58extern struct GNUNET_CRYPTO_EccPublicKey GST_my_public_key; 58extern struct GNUNET_CRYPTO_EccPublicSignKey GST_my_public_key;
59 59
60/** 60/**
61 * Our private key. 61 * Our private key.
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index e04407f02..8e5dd15c5 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -329,7 +329,7 @@ struct SessionDisconnectMessage
329 /** 329 /**
330 * Public key of the sender. 330 * Public key of the sender.
331 */ 331 */
332 struct GNUNET_CRYPTO_EccPublicKey public_key; 332 struct GNUNET_CRYPTO_EccPublicSignKey public_key;
333 333
334 /** 334 /**
335 * Signature of the peer that sends us the disconnect. Only 335 * Signature of the peer that sends us the disconnect. Only
@@ -1195,7 +1195,7 @@ send_disconnect (struct NeighbourMapEntry *n)
1195 disconnect_msg.reserved = htonl (0); 1195 disconnect_msg.reserved = htonl (0);
1196 disconnect_msg.purpose.size = 1196 disconnect_msg.purpose.size =
1197 htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + 1197 htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
1198 sizeof (struct GNUNET_CRYPTO_EccPublicKey) + 1198 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) +
1199 sizeof (struct GNUNET_TIME_AbsoluteNBO)); 1199 sizeof (struct GNUNET_TIME_AbsoluteNBO));
1200 disconnect_msg.purpose.purpose = 1200 disconnect_msg.purpose.purpose =
1201 htonl (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT); 1201 htonl (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT);
@@ -3155,7 +3155,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity
3155 return; 3155 return;
3156 } 3156 }
3157 GNUNET_CRYPTO_hash (&sdm->public_key, 3157 GNUNET_CRYPTO_hash (&sdm->public_key,
3158 sizeof (struct GNUNET_CRYPTO_EccPublicKey), 3158 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
3159 &hc); 3159 &hc);
3160 if (0 != memcmp (peer, &hc, sizeof (struct GNUNET_PeerIdentity))) 3160 if (0 != memcmp (peer, &hc, sizeof (struct GNUNET_PeerIdentity)))
3161 { 3161 {
@@ -3164,7 +3164,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity
3164 } 3164 }
3165 if (ntohl (sdm->purpose.size) != 3165 if (ntohl (sdm->purpose.size) !=
3166 sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + 3166 sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
3167 sizeof (struct GNUNET_CRYPTO_EccPublicKey) + 3167 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) +
3168 sizeof (struct GNUNET_TIME_AbsoluteNBO)) 3168 sizeof (struct GNUNET_TIME_AbsoluteNBO))
3169 { 3169 {
3170 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 3170 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 95a7eb04a..fe493f822 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -189,7 +189,7 @@ struct ValidationEntry
189 /** 189 /**
190 * Public key of the peer. 190 * Public key of the peer.
191 */ 191 */
192 struct GNUNET_CRYPTO_EccPublicKey public_key; 192 struct GNUNET_CRYPTO_EccPublicSignKey public_key;
193 193
194 /** 194 /**
195 * The identity of the peer. FIXME: duplicated (also in 'address') 195 * The identity of the peer. FIXME: duplicated (also in 'address')
@@ -678,7 +678,7 @@ revalidate_address (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
678 * if we don't have an existing entry and no public key was given 678 * if we don't have an existing entry and no public key was given
679 */ 679 */
680static struct ValidationEntry * 680static struct ValidationEntry *
681find_validation_entry (const struct GNUNET_CRYPTO_EccPublicKey *public_key, 681find_validation_entry (const struct GNUNET_CRYPTO_EccPublicSignKey *public_key,
682 const struct GNUNET_HELLO_Address *address) 682 const struct GNUNET_HELLO_Address *address)
683{ 683{
684 struct ValidationEntryMatchContext vemc; 684 struct ValidationEntryMatchContext vemc;
@@ -733,7 +733,7 @@ add_valid_address (void *cls, const struct GNUNET_HELLO_Address *address,
733 struct ValidationEntry *ve; 733 struct ValidationEntry *ve;
734 struct GNUNET_PeerIdentity pid; 734 struct GNUNET_PeerIdentity pid;
735 struct GNUNET_ATS_Information ats; 735 struct GNUNET_ATS_Information ats;
736 struct GNUNET_CRYPTO_EccPublicKey public_key; 736 struct GNUNET_CRYPTO_EccPublicSignKey public_key;
737 737
738 if (0 == GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us) 738 if (0 == GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us)
739 return GNUNET_OK; /* expired */ 739 return GNUNET_OK; /* expired */
@@ -855,7 +855,7 @@ GST_validation_stop ()
855 */ 855 */
856static void 856static void
857multicast_pong (void *cls, 857multicast_pong (void *cls,
858 const struct GNUNET_CRYPTO_EccPublicKey *public_key, 858 const struct GNUNET_CRYPTO_EccPublicSignKey *public_key,
859 struct GNUNET_TIME_Absolute valid_until, 859 struct GNUNET_TIME_Absolute valid_until,
860 struct GNUNET_TIME_Absolute validation_block, 860 struct GNUNET_TIME_Absolute validation_block,
861 const struct GNUNET_HELLO_Address *address) 861 const struct GNUNET_HELLO_Address *address)
@@ -1141,7 +1141,7 @@ struct ValidateAddressContext
1141 /** 1141 /**
1142 * Public key of the peer whose address is being validated. 1142 * Public key of the peer whose address is being validated.
1143 */ 1143 */
1144 struct GNUNET_CRYPTO_EccPublicKey public_key; 1144 struct GNUNET_CRYPTO_EccPublicSignKey public_key;
1145}; 1145};
1146 1146
1147 1147
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index 46d3162c4..c935b97cf 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -134,7 +134,7 @@ GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello);
134 */ 134 */
135typedef void (*GST_ValidationAddressCallback) (void *cls, 135typedef void (*GST_ValidationAddressCallback) (void *cls,
136 const struct 136 const struct
137 GNUNET_CRYPTO_EccPublicKey *public_key, 137 GNUNET_CRYPTO_EccPublicSignKey *public_key,
138 struct GNUNET_TIME_Absolute 138 struct GNUNET_TIME_Absolute
139 valid_until, 139 valid_until,
140 struct GNUNET_TIME_Absolute 140 struct GNUNET_TIME_Absolute
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index 97a88beb5..eecb30605 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -48,7 +48,7 @@
48/** 48/**
49 * Our public key. 49 * Our public key.
50 */ 50 */
51static struct GNUNET_CRYPTO_EccPublicKey my_public_key; 51static struct GNUNET_CRYPTO_EccPublicSignKey my_public_key;
52 52
53/** 53/**
54 * Our identity. 54 * Our identity.
@@ -634,7 +634,7 @@ run (void *cls, char *const *args, const char *cfgfile,
634 end_badly_now (); 634 end_badly_now ();
635 return; 635 return;
636 } 636 }
637 GNUNET_CRYPTO_ecc_key_get_public (my_private_key, &my_public_key); 637 GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, &my_public_key);
638 GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), 638 GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key),
639 &my_identity.hashPubKey); 639 &my_identity.hashPubKey);
640 640