aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_iteration_stop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_stop.c')
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index dcb6f8c7d..666e09ee8 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -36,15 +36,15 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task;
36 36
37static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task; 37static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task;
38 38
39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; 39static struct GNUNET_CRYPTO_EccPrivateKey * privkey;
40 40
41static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; 41static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey;
42 42
43static struct GNUNET_HashCode zone; 43static struct GNUNET_HashCode zone;
44 44
45static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; 45static struct GNUNET_CRYPTO_EccPrivateKey * privkey2;
46 46
47static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; 47static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey2;
48 48
49static struct GNUNET_HashCode zone2; 49static struct GNUNET_HashCode zone2;
50 50
@@ -54,19 +54,19 @@ static int res;
54 54
55static int returned_records; 55static int returned_records;
56 56
57static struct GNUNET_CRYPTO_RsaSignature *sig_1; 57static struct GNUNET_CRYPTO_EccSignature *sig_1;
58 58
59static char * s_name_1; 59static char * s_name_1;
60 60
61static struct GNUNET_NAMESTORE_RecordData *s_rd_1; 61static struct GNUNET_NAMESTORE_RecordData *s_rd_1;
62 62
63static struct GNUNET_CRYPTO_RsaSignature *sig_2; 63static struct GNUNET_CRYPTO_EccSignature *sig_2;
64 64
65static char * s_name_2; 65static char * s_name_2;
66 66
67static struct GNUNET_NAMESTORE_RecordData *s_rd_2; 67static struct GNUNET_NAMESTORE_RecordData *s_rd_2;
68 68
69static struct GNUNET_CRYPTO_RsaSignature *sig_3; 69static struct GNUNET_CRYPTO_EccSignature *sig_3;
70 70
71static char * s_name_3; 71static char * s_name_3;
72 72
@@ -112,11 +112,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
112 GNUNET_free (s_rd_3); 112 GNUNET_free (s_rd_3);
113 } 113 }
114 if (privkey != NULL) 114 if (privkey != NULL)
115 GNUNET_CRYPTO_rsa_key_free (privkey); 115 GNUNET_CRYPTO_ecc_key_free (privkey);
116 privkey = NULL; 116 privkey = NULL;
117 117
118 if (privkey2 != NULL) 118 if (privkey2 != NULL)
119 GNUNET_CRYPTO_rsa_key_free (privkey2); 119 GNUNET_CRYPTO_ecc_key_free (privkey2);
120 privkey2 = NULL; 120 privkey2 = NULL;
121 res = 1; 121 res = 1;
122} 122}
@@ -137,10 +137,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
137 endbadly_task = GNUNET_SCHEDULER_NO_TASK; 137 endbadly_task = GNUNET_SCHEDULER_NO_TASK;
138 } 138 }
139 if (privkey != NULL) 139 if (privkey != NULL)
140 GNUNET_CRYPTO_rsa_key_free (privkey); 140 GNUNET_CRYPTO_ecc_key_free (privkey);
141 privkey = NULL; 141 privkey = NULL;
142 if (privkey2 != NULL) 142 if (privkey2 != NULL)
143 GNUNET_CRYPTO_rsa_key_free (privkey2); 143 GNUNET_CRYPTO_ecc_key_free (privkey2);
144 privkey2 = NULL; 144 privkey2 = NULL;
145 145
146 GNUNET_free (sig_1); 146 GNUNET_free (sig_1);
@@ -177,12 +177,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
177 177
178static void 178static void
179zone_proc (void *cls, 179zone_proc (void *cls,
180 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, 180 const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key,
181 struct GNUNET_TIME_Absolute expire, 181 struct GNUNET_TIME_Absolute expire,
182 const char *name, 182 const char *name,
183 unsigned int rd_count, 183 unsigned int rd_count,
184 const struct GNUNET_NAMESTORE_RecordData *rd, 184 const struct GNUNET_NAMESTORE_RecordData *rd,
185 const struct GNUNET_CRYPTO_RsaSignature *signature) 185 const struct GNUNET_CRYPTO_EccSignature *signature)
186{ 186{
187 int failed = GNUNET_NO; 187 int failed = GNUNET_NO;
188 188
@@ -383,19 +383,19 @@ run (void *cls,
383 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 383 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
384 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); 384 "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey");
385 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 385 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
386 privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); 386 privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file);
387 GNUNET_free (hostkey_file); 387 GNUNET_free (hostkey_file);
388 GNUNET_assert (privkey != NULL); 388 GNUNET_assert (privkey != NULL);
389 GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); 389 GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey);
390 GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone); 390 GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone);
391 391
392 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, 392 GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR,
393 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); 393 "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey");
394 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); 394 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file);
395 privkey2 = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); 395 privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file);
396 GNUNET_free (hostkey_file); 396 GNUNET_free (hostkey_file);
397 GNUNET_assert (privkey2 != NULL); 397 GNUNET_assert (privkey2 != NULL);
398 GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2); 398 GNUNET_CRYPTO_ecc_key_get_public(privkey2, &pubkey2);
399 GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2); 399 GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2);
400 400
401 nsh = GNUNET_NAMESTORE_connect (cfg); 401 nsh = GNUNET_NAMESTORE_connect (cfg);