aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_iteration_stop.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/namestore/test_namestore_api_zone_iteration_stop.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/namestore/test_namestore_api_zone_iteration_stop.c')
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index ebc26db79..e56559f96 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -34,9 +34,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh;
34 34
35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; 35static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
36 36
37static struct GNUNET_CRYPTO_EccPrivateKey * privkey; 37static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey;
38 38
39static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; 39static struct GNUNET_CRYPTO_EcdsaPrivateKey * privkey2;
40 40
41static struct GNUNET_NAMESTORE_ZoneIterator *zi; 41static struct GNUNET_NAMESTORE_ZoneIterator *zi;
42 42
@@ -156,7 +156,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
156 156
157static void 157static void
158zone_proc (void *cls, 158zone_proc (void *cls,
159 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 159 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
160 const char *label, 160 const char *label,
161 unsigned int rd_count, 161 unsigned int rd_count,
162 const struct GNUNET_NAMESTORE_RecordData *rd) 162 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -178,7 +178,7 @@ zone_proc (void *cls,
178 } 178 }
179 else 179 else
180 { 180 {
181 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 181 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
182 { 182 {
183 if (0 == strcmp (label, s_name_1)) 183 if (0 == strcmp (label, s_name_1))
184 { 184 {
@@ -222,7 +222,7 @@ zone_proc (void *cls,
222 GNUNET_break (0); 222 GNUNET_break (0);
223 } 223 }
224 } 224 }
225 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 225 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
226 { 226 {
227 if (0 == strcmp (label, s_name_3)) 227 if (0 == strcmp (label, s_name_3))
228 { 228 {
@@ -357,7 +357,7 @@ create_record (unsigned int count)
357 */ 357 */
358static void 358static void
359empty_zone_proc (void *cls, 359empty_zone_proc (void *cls,
360 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 360 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
361 const char *label, 361 const char *label,
362 unsigned int rd_count, 362 unsigned int rd_count,
363 const struct GNUNET_NAMESTORE_RecordData *rd) 363 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -391,14 +391,14 @@ empty_zone_proc (void *cls,
391 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 391 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
392 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 392 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
393 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 393 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
394 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 394 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
395 GNUNET_free (hostkey_file); 395 GNUNET_free (hostkey_file);
396 GNUNET_assert (privkey != NULL); 396 GNUNET_assert (privkey != NULL);
397 397
398 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 398 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
399 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); 399 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
400 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 400 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
401 privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 401 privkey2 = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
402 GNUNET_free (hostkey_file); 402 GNUNET_free (hostkey_file);
403 GNUNET_assert (privkey2 != NULL); 403 GNUNET_assert (privkey2 != NULL);
404 404