aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_plugin_transport.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-02-05 20:49:21 +0000
committerChristian Grothoff <christian@grothoff.org>2013-02-05 20:49:21 +0000
commitca35f67faee8371fa763bdf49f04a8d5d4cdc021 (patch)
tree5535df5e5a2428ed838c6a0e60b2c6c68a7842c5 /src/transport/test_plugin_transport.c
parentdd7cca21c5dbaef4d56f92bab3932f0f73d092d1 (diff)
downloadgnunet-ca35f67faee8371fa763bdf49f04a8d5d4cdc021.tar.gz
gnunet-ca35f67faee8371fa763bdf49f04a8d5d4cdc021.zip
switching to ECDHE cryptography f, implementation is incomplete and INSECURE, do not use for anything but testing
Diffstat (limited to 'src/transport/test_plugin_transport.c')
-rw-r--r--src/transport/test_plugin_transport.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index f0dbc411b..7fcbe9d63 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -43,12 +43,12 @@
43#define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) 43#define WAIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
44#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) 44#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
45 45
46#define HOSTKEY_FILE "test_plugin_hostkey" 46#define HOSTKEY_FILE "test_plugin_hostkey.ecc"
47 47
48/** 48/**
49 * Our public key. 49 * Our public key.
50 */ 50 */
51static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded my_public_key; 51static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded my_public_key;
52 52
53/** 53/**
54 * Our identity. 54 * Our identity.
@@ -58,7 +58,7 @@ static struct GNUNET_PeerIdentity my_identity;
58/** 58/**
59 * Our private key. 59 * Our private key.
60 */ 60 */
61static struct GNUNET_CRYPTO_RsaPrivateKey *my_private_key; 61static struct GNUNET_CRYPTO_EccPrivateKey *my_private_key;
62 62
63/** 63/**
64 * Our configuration. 64 * Our configuration.
@@ -533,7 +533,7 @@ run (void *cls, char *const *args, const char *cfgfile,
533 "NEIGHBOUR_LIMIT", 533 "NEIGHBOUR_LIMIT",
534 &tneigh)) || 534 &tneigh)) ||
535 (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (c, 535 (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (c,
536 "GNUNETD", "HOSTKEY", 536 "PEER", "PRIVATE_KEY",
537 &keyfile))) 537 &keyfile)))
538 { 538 {
539 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 539 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -576,7 +576,7 @@ run (void *cls, char *const *args, const char *cfgfile,
576 576
577 577
578 max_connect_per_transport = (uint32_t) tneigh; 578 max_connect_per_transport = (uint32_t) tneigh;
579 my_private_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); 579 my_private_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
580 GNUNET_free (keyfile); 580 GNUNET_free (keyfile);
581 if (NULL == my_private_key) 581 if (NULL == my_private_key)
582 { 582 {
@@ -585,7 +585,7 @@ run (void *cls, char *const *args, const char *cfgfile,
585 end_badly_now (); 585 end_badly_now ();
586 return; 586 return;
587 } 587 }
588 GNUNET_CRYPTO_rsa_key_get_public (my_private_key, &my_public_key); 588 GNUNET_CRYPTO_ecc_key_get_public (my_private_key, &my_public_key);
589 GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), 589 GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key),
590 &my_identity.hashPubKey); 590 &my_identity.hashPubKey);
591 591