aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-10 14:38:55 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-10 14:38:55 +0000
commit9351b1e9bdf2b067b6db06562c26ba658cff42b8 (patch)
tree68dc4ab447e7e8b6a20a706858cd36238c1c7c5f /src/testing/testing.c
parent8beabcd96c0cf1e1873c0b5ff96e537f1beb0b34 (diff)
downloadgnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.tar.gz
gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.zip
separating ECC crypto into functions/structs for ECDHE, ECDSA and EDDSA
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 89d4c0f50..cfca8ce9b 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -701,12 +701,12 @@ GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system,
701 * key; if NULL, GNUNET_SYSERR is returned immediately 701 * key; if NULL, GNUNET_SYSERR is returned immediately
702 * @return NULL on error (not enough keys) 702 * @return NULL on error (not enough keys)
703 */ 703 */
704struct GNUNET_CRYPTO_EccPrivateKey * 704struct GNUNET_CRYPTO_EddsaPrivateKey *
705GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system, 705GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system,
706 uint32_t key_number, 706 uint32_t key_number,
707 struct GNUNET_PeerIdentity *id) 707 struct GNUNET_PeerIdentity *id)
708{ 708{
709 struct GNUNET_CRYPTO_EccPrivateKey *private_key; 709 struct GNUNET_CRYPTO_EddsaPrivateKey *private_key;
710 710
711 if ((NULL == id) || (NULL == system->hostkeys_data)) 711 if ((NULL == id) || (NULL == system->hostkeys_data))
712 return NULL; 712 return NULL;
@@ -716,12 +716,12 @@ GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system,
716 _("Key number %u does not exist\n"), key_number); 716 _("Key number %u does not exist\n"), key_number);
717 return NULL; 717 return NULL;
718 } 718 }
719 private_key = GNUNET_new (struct GNUNET_CRYPTO_EccPrivateKey); 719 private_key = GNUNET_new (struct GNUNET_CRYPTO_EddsaPrivateKey);
720 memcpy (private_key, 720 memcpy (private_key,
721 system->hostkeys_data + 721 system->hostkeys_data +
722 (key_number * GNUNET_TESTING_HOSTKEYFILESIZE), 722 (key_number * GNUNET_TESTING_HOSTKEYFILESIZE),
723 GNUNET_TESTING_HOSTKEYFILESIZE); 723 GNUNET_TESTING_HOSTKEYFILESIZE);
724 GNUNET_CRYPTO_ecc_key_get_public_for_signature (private_key, 724 GNUNET_CRYPTO_eddsa_key_get_public (private_key,
725 &id->public_key); 725 &id->public_key);
726 return private_key; 726 return private_key;
727} 727}
@@ -1137,7 +1137,7 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1137 char *config_filename; 1137 char *config_filename;
1138 char *libexec_binary; 1138 char *libexec_binary;
1139 char *emsg_; 1139 char *emsg_;
1140 struct GNUNET_CRYPTO_EccPrivateKey *pk; 1140 struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
1141 uint16_t *ports; 1141 uint16_t *ports;
1142 struct SharedService *ss; 1142 struct SharedService *ss;
1143 struct SharedServiceInstance **ss_instances; 1143 struct SharedServiceInstance **ss_instances;