summaryrefslogtreecommitdiff
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)
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;
/**
* Our public key.
*/
-struct GNUNET_CRYPTO_EccPublicKey GST_my_public_key;
+struct GNUNET_CRYPTO_EccPublicSignKey GST_my_public_key;
/**
* Our private key.
@@ -769,7 +769,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
GST_stats = GNUNET_STATISTICS_create ("transport", GST_cfg);
GST_peerinfo = GNUNET_PEERINFO_connect (GST_cfg);
- GNUNET_CRYPTO_ecc_key_get_public (GST_my_private_key, &GST_my_public_key);
+ GNUNET_CRYPTO_ecc_key_get_public_for_signature (GST_my_private_key, &GST_my_public_key);
GNUNET_CRYPTO_hash (&GST_my_public_key, sizeof (GST_my_public_key),
&GST_my_identity.hashPubKey);
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;
/**
* Our public key.
*/
-extern struct GNUNET_CRYPTO_EccPublicKey GST_my_public_key;
+extern struct GNUNET_CRYPTO_EccPublicSignKey GST_my_public_key;
/**
* 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
/**
* Public key of the sender.
*/
- struct GNUNET_CRYPTO_EccPublicKey public_key;
+ struct GNUNET_CRYPTO_EccPublicSignKey public_key;
/**
* Signature of the peer that sends us the disconnect. Only
@@ -1195,7 +1195,7 @@ send_disconnect (struct NeighbourMapEntry *n)
disconnect_msg.reserved = htonl (0);
disconnect_msg.purpose.size =
htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
- sizeof (struct GNUNET_CRYPTO_EccPublicKey) +
+ sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) +
sizeof (struct GNUNET_TIME_AbsoluteNBO));
disconnect_msg.purpose.purpose =
htonl (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT);
@@ -3155,7 +3155,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity
return;
}
GNUNET_CRYPTO_hash (&sdm->public_key,
- sizeof (struct GNUNET_CRYPTO_EccPublicKey),
+ sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
&hc);
if (0 != memcmp (peer, &hc, sizeof (struct GNUNET_PeerIdentity)))
{
@@ -3164,7 +3164,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity
}
if (ntohl (sdm->purpose.size) !=
sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
- sizeof (struct GNUNET_CRYPTO_EccPublicKey) +
+ sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) +
sizeof (struct GNUNET_TIME_AbsoluteNBO))
{
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
/**
* Public key of the peer.
*/
- struct GNUNET_CRYPTO_EccPublicKey public_key;
+ struct GNUNET_CRYPTO_EccPublicSignKey public_key;
/**
* The identity of the peer. FIXME: duplicated (also in 'address')
@@ -678,7 +678,7 @@ revalidate_address (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* if we don't have an existing entry and no public key was given
*/
static struct ValidationEntry *
-find_validation_entry (const struct GNUNET_CRYPTO_EccPublicKey *public_key,
+find_validation_entry (const struct GNUNET_CRYPTO_EccPublicSignKey *public_key,
const struct GNUNET_HELLO_Address *address)
{
struct ValidationEntryMatchContext vemc;
@@ -733,7 +733,7 @@ add_valid_address (void *cls, const struct GNUNET_HELLO_Address *address,
struct ValidationEntry *ve;
struct GNUNET_PeerIdentity pid;
struct GNUNET_ATS_Information ats;
- struct GNUNET_CRYPTO_EccPublicKey public_key;
+ struct GNUNET_CRYPTO_EccPublicSignKey public_key;
if (0 == GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us)
return GNUNET_OK; /* expired */
@@ -855,7 +855,7 @@ GST_validation_stop ()
*/
static void
multicast_pong (void *cls,
- const struct GNUNET_CRYPTO_EccPublicKey *public_key,
+ const struct GNUNET_CRYPTO_EccPublicSignKey *public_key,
struct GNUNET_TIME_Absolute valid_until,
struct GNUNET_TIME_Absolute validation_block,
const struct GNUNET_HELLO_Address *address)
@@ -1141,7 +1141,7 @@ struct ValidateAddressContext
/**
* Public key of the peer whose address is being validated.
*/
- struct GNUNET_CRYPTO_EccPublicKey public_key;
+ struct GNUNET_CRYPTO_EccPublicSignKey public_key;
};
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);
*/
typedef void (*GST_ValidationAddressCallback) (void *cls,
const struct
- GNUNET_CRYPTO_EccPublicKey *public_key,
+ GNUNET_CRYPTO_EccPublicSignKey *public_key,
struct GNUNET_TIME_Absolute
valid_until,
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 @@
/**
* Our public key.
*/
-static struct GNUNET_CRYPTO_EccPublicKey my_public_key;
+static struct GNUNET_CRYPTO_EccPublicSignKey my_public_key;
/**
* Our identity.
@@ -634,7 +634,7 @@ run (void *cls, char *const *args, const char *cfgfile,
end_badly_now ();
return;
}
- GNUNET_CRYPTO_ecc_key_get_public (my_private_key, &my_public_key);
+ GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key, &my_public_key);
GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key),
&my_identity.hashPubKey);