aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_iteration_specific_zone.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_specific_zone.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_specific_zone.c')
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index a34e742f0..7707c418e 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.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)
@@ -181,7 +181,7 @@ zone_proc (void *cls,
181 } 181 }
182 else 182 else
183 { 183 {
184 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 184 if (0 == memcmp (zone, privkey, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
185 { 185 {
186 if (0 == strcmp (label, s_name_1)) 186 if (0 == strcmp (label, s_name_1))
187 { 187 {
@@ -225,7 +225,7 @@ zone_proc (void *cls,
225 GNUNET_break (0); 225 GNUNET_break (0);
226 } 226 }
227 } 227 }
228 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 228 else if (0 == memcmp (zone, privkey2, sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)))
229 { 229 {
230 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received data for not requested zone\n"); 230 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received data for not requested zone\n");
231 failed = GNUNET_YES; 231 failed = GNUNET_YES;
@@ -323,7 +323,7 @@ create_record (unsigned int count)
323 */ 323 */
324static void 324static void
325empty_zone_proc (void *cls, 325empty_zone_proc (void *cls,
326 const struct GNUNET_CRYPTO_EccPrivateKey *zone, 326 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
327 const char *label, 327 const char *label,
328 unsigned int rd_count, 328 unsigned int rd_count,
329 const struct GNUNET_NAMESTORE_RecordData *rd) 329 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -357,14 +357,14 @@ empty_zone_proc (void *cls,
357 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 357 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
358 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 358 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
359 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 359 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
360 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 360 privkey = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
361 GNUNET_free (hostkey_file); 361 GNUNET_free (hostkey_file);
362 GNUNET_assert (privkey != NULL); 362 GNUNET_assert (privkey != NULL);
363 363
364 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 364 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
365 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); 365 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
366 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 366 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
367 privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); 367 privkey2 = GNUNET_CRYPTO_ecdsa_key_create_from_file(hostkey_file);
368 GNUNET_free (hostkey_file); 368 GNUNET_free (hostkey_file);
369 GNUNET_assert (privkey2 != NULL); 369 GNUNET_assert (privkey2 != NULL);
370 370