diff options
Diffstat (limited to 'src/namestore')
23 files changed, 295 insertions, 293 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index a79ec5e78..699df0670 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -36,7 +36,7 @@ | |||
36 | /** | 36 | /** |
37 | * Hostkey generation context | 37 | * Hostkey generation context |
38 | */ | 38 | */ |
39 | struct GNUNET_CRYPTO_RsaKeyGenerationContext * keygen; | 39 | struct GNUNET_CRYPTO_EccKeyGenerationContext * keygen; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Handle to the namestore. | 42 | * Handle to the namestore. |
@@ -51,7 +51,7 @@ static struct GNUNET_CRYPTO_ShortHashCode zone; | |||
51 | /** | 51 | /** |
52 | * Private key for the our zone. | 52 | * Private key for the our zone. |
53 | */ | 53 | */ |
54 | static struct GNUNET_CRYPTO_RsaPrivateKey *zone_pkey; | 54 | static struct GNUNET_CRYPTO_EccPrivateKey *zone_pkey; |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * Keyfile to manipulate. | 57 | * Keyfile to manipulate. |
@@ -146,7 +146,7 @@ do_shutdown (void *cls, | |||
146 | { | 146 | { |
147 | if (NULL != keygen) | 147 | if (NULL != keygen) |
148 | { | 148 | { |
149 | GNUNET_CRYPTO_rsa_key_create_stop (keygen); | 149 | GNUNET_CRYPTO_ecc_key_create_stop (keygen); |
150 | keygen = NULL; | 150 | keygen = NULL; |
151 | } | 151 | } |
152 | 152 | ||
@@ -177,7 +177,7 @@ do_shutdown (void *cls, | |||
177 | } | 177 | } |
178 | if (NULL != zone_pkey) | 178 | if (NULL != zone_pkey) |
179 | { | 179 | { |
180 | GNUNET_CRYPTO_rsa_key_free (zone_pkey); | 180 | GNUNET_CRYPTO_ecc_key_free (zone_pkey); |
181 | zone_pkey = NULL; | 181 | zone_pkey = NULL; |
182 | } | 182 | } |
183 | if (NULL != uri) | 183 | if (NULL != uri) |
@@ -267,12 +267,12 @@ del_continuation (void *cls, | |||
267 | */ | 267 | */ |
268 | static void | 268 | static void |
269 | display_record (void *cls, | 269 | display_record (void *cls, |
270 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 270 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
271 | struct GNUNET_TIME_Absolute expire, | 271 | struct GNUNET_TIME_Absolute expire, |
272 | const char *name, | 272 | const char *name, |
273 | unsigned int rd_len, | 273 | unsigned int rd_len, |
274 | const struct GNUNET_NAMESTORE_RecordData *rd, | 274 | const struct GNUNET_NAMESTORE_RecordData *rd, |
275 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 275 | const struct GNUNET_CRYPTO_EccSignature *signature) |
276 | { | 276 | { |
277 | const char *typestring; | 277 | const char *typestring; |
278 | char *s; | 278 | char *s; |
@@ -328,11 +328,11 @@ display_record (void *cls, | |||
328 | 328 | ||
329 | static void | 329 | static void |
330 | key_generation_cb (void *cls, | 330 | key_generation_cb (void *cls, |
331 | struct GNUNET_CRYPTO_RsaPrivateKey *pk, | 331 | struct GNUNET_CRYPTO_EccPrivateKey *pk, |
332 | const char *emsg) | 332 | const char *emsg) |
333 | { | 333 | { |
334 | struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 334 | struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
335 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; | 335 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pub; |
336 | uint32_t type; | 336 | uint32_t type; |
337 | void *data = NULL; | 337 | void *data = NULL; |
338 | size_t data_size = 0; | 338 | size_t data_size = 0; |
@@ -354,7 +354,7 @@ key_generation_cb (void *cls, | |||
354 | /* nothing more to be done */ | 354 | /* nothing more to be done */ |
355 | fprintf (stderr, | 355 | fprintf (stderr, |
356 | _("No options given\n")); | 356 | _("No options given\n")); |
357 | GNUNET_CRYPTO_rsa_key_free (zone_pkey); | 357 | GNUNET_CRYPTO_ecc_key_free (zone_pkey); |
358 | zone_pkey = NULL; | 358 | zone_pkey = NULL; |
359 | return; | 359 | return; |
360 | } | 360 | } |
@@ -364,7 +364,7 @@ key_generation_cb (void *cls, | |||
364 | _("Failed to read or create private zone key\n")); | 364 | _("Failed to read or create private zone key\n")); |
365 | return; | 365 | return; |
366 | } | 366 | } |
367 | GNUNET_CRYPTO_rsa_key_get_public (zone_pkey, | 367 | GNUNET_CRYPTO_ecc_key_get_public (zone_pkey, |
368 | &pub); | 368 | &pub); |
369 | GNUNET_CRYPTO_short_hash (&pub, sizeof (pub), &zone); | 369 | GNUNET_CRYPTO_short_hash (&pub, sizeof (pub), &zone); |
370 | 370 | ||
@@ -625,7 +625,7 @@ testservice_task (void *cls, | |||
625 | _("Using default zone file `%s'\n"), | 625 | _("Using default zone file `%s'\n"), |
626 | keyfile); | 626 | keyfile); |
627 | } | 627 | } |
628 | keygen = GNUNET_CRYPTO_rsa_key_create_start (keyfile, key_generation_cb, cfg); | 628 | keygen = GNUNET_CRYPTO_ecc_key_create_start (keyfile, key_generation_cb, cfg); |
629 | GNUNET_free (keyfile); | 629 | GNUNET_free (keyfile); |
630 | keyfile = NULL; | 630 | keyfile = NULL; |
631 | if (NULL == keygen) | 631 | if (NULL == keygen) |
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index a14ad923d..02f33679b 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -143,7 +143,7 @@ struct GNUNET_NAMESTORE_CryptoContainer | |||
143 | /** | 143 | /** |
144 | * Zone's private key | 144 | * Zone's private key |
145 | */ | 145 | */ |
146 | struct GNUNET_CRYPTO_RsaPrivateKey *privkey; | 146 | struct GNUNET_CRYPTO_EccPrivateKey *privkey; |
147 | 147 | ||
148 | }; | 148 | }; |
149 | 149 | ||
@@ -205,7 +205,7 @@ struct KeyLoadContext | |||
205 | { | 205 | { |
206 | struct KeyLoadContext *next; | 206 | struct KeyLoadContext *next; |
207 | struct KeyLoadContext *prev; | 207 | struct KeyLoadContext *prev; |
208 | struct GNUNET_CRYPTO_RsaKeyGenerationContext *keygen; | 208 | struct GNUNET_CRYPTO_EccKeyGenerationContext *keygen; |
209 | char *filename; | 209 | char *filename; |
210 | unsigned int *counter; | 210 | unsigned int *counter; |
211 | }; | 211 | }; |
@@ -222,19 +222,19 @@ static int | |||
222 | write_key_to_file (const char *filename, | 222 | write_key_to_file (const char *filename, |
223 | struct GNUNET_NAMESTORE_CryptoContainer *c) | 223 | struct GNUNET_NAMESTORE_CryptoContainer *c) |
224 | { | 224 | { |
225 | struct GNUNET_CRYPTO_RsaPrivateKey *ret = c->privkey; | 225 | struct GNUNET_CRYPTO_EccPrivateKey *ret = c->privkey; |
226 | struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded *enc; | 226 | struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded *enc; |
227 | struct GNUNET_DISK_FileHandle *fd; | 227 | struct GNUNET_DISK_FileHandle *fd; |
228 | struct GNUNET_CRYPTO_ShortHashCode zone; | 228 | struct GNUNET_CRYPTO_ShortHashCode zone; |
229 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 229 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
230 | struct GNUNET_CRYPTO_RsaPrivateKey *privkey; | 230 | struct GNUNET_CRYPTO_EccPrivateKey *privkey; |
231 | 231 | ||
232 | fd = GNUNET_DISK_file_open (filename, | 232 | fd = GNUNET_DISK_file_open (filename, |
233 | GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE | GNUNET_DISK_OPEN_FAILIFEXISTS, | 233 | GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE | GNUNET_DISK_OPEN_FAILIFEXISTS, |
234 | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE); | 234 | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE); |
235 | if ( (NULL == fd) && (EEXIST == errno) ) | 235 | if ( (NULL == fd) && (EEXIST == errno) ) |
236 | { | 236 | { |
237 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file (filename); | 237 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (filename); |
238 | if (NULL == privkey) | 238 | if (NULL == privkey) |
239 | { | 239 | { |
240 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 240 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -243,9 +243,9 @@ write_key_to_file (const char *filename, | |||
243 | _("file exists but reading key failed")); | 243 | _("file exists but reading key failed")); |
244 | return GNUNET_SYSERR; | 244 | return GNUNET_SYSERR; |
245 | } | 245 | } |
246 | GNUNET_CRYPTO_rsa_key_get_public (privkey, &pubkey); | 246 | GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey); |
247 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone); | 247 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &zone); |
248 | GNUNET_CRYPTO_rsa_key_free (privkey); | 248 | GNUNET_CRYPTO_ecc_key_free (privkey); |
249 | if (0 == memcmp (&zone, &c->zone, sizeof(zone))) | 249 | if (0 == memcmp (&zone, &c->zone, sizeof(zone))) |
250 | { | 250 | { |
251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -264,17 +264,17 @@ write_key_to_file (const char *filename, | |||
264 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "open", filename); | 264 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "open", filename); |
265 | return GNUNET_SYSERR; | 265 | return GNUNET_SYSERR; |
266 | } | 266 | } |
267 | if (GNUNET_YES != GNUNET_DISK_file_lock (fd, 0, sizeof (struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded), GNUNET_YES)) | 267 | if (GNUNET_YES != GNUNET_DISK_file_lock (fd, 0, sizeof (struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded), GNUNET_YES)) |
268 | { | 268 | { |
269 | GNUNET_break (GNUNET_YES == GNUNET_DISK_file_close (fd)); | 269 | GNUNET_break (GNUNET_YES == GNUNET_DISK_file_close (fd)); |
270 | return GNUNET_SYSERR; | 270 | return GNUNET_SYSERR; |
271 | } | 271 | } |
272 | enc = GNUNET_CRYPTO_rsa_encode_key (ret); | 272 | enc = GNUNET_CRYPTO_ecc_encode_key (ret); |
273 | GNUNET_assert (NULL != enc); | 273 | GNUNET_assert (NULL != enc); |
274 | GNUNET_assert (ntohs (enc->len) == GNUNET_DISK_file_write (fd, enc, ntohs (enc->len))); | 274 | GNUNET_assert (ntohs (enc->size) == GNUNET_DISK_file_write (fd, enc, ntohs (enc->size))); |
275 | GNUNET_free (enc); | 275 | GNUNET_free (enc); |
276 | GNUNET_DISK_file_sync (fd); | 276 | GNUNET_DISK_file_sync (fd); |
277 | if (GNUNET_YES != GNUNET_DISK_file_unlock (fd, 0, sizeof (struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded))) | 277 | if (GNUNET_YES != GNUNET_DISK_file_unlock (fd, 0, sizeof (struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded))) |
278 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); | 278 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fcntl", filename); |
279 | GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); | 279 | GNUNET_assert (GNUNET_YES == GNUNET_DISK_file_close (fd)); |
280 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 280 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -308,7 +308,7 @@ zone_to_disk_it (void *cls, | |||
308 | GNUNET_short_h2s (&c->zone)); | 308 | GNUNET_short_h2s (&c->zone)); |
309 | (void) write_key_to_file(c->filename, c); | 309 | (void) write_key_to_file(c->filename, c); |
310 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap_remove (zonekeys, key, value)); | 310 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap_remove (zonekeys, key, value)); |
311 | GNUNET_CRYPTO_rsa_key_free (c->privkey); | 311 | GNUNET_CRYPTO_ecc_key_free (c->privkey); |
312 | GNUNET_free (c->filename); | 312 | GNUNET_free (c->filename); |
313 | GNUNET_free (c); | 313 | GNUNET_free (c); |
314 | return GNUNET_OK; | 314 | return GNUNET_OK; |
@@ -323,22 +323,22 @@ zone_to_disk_it (void *cls, | |||
323 | * be taken over or freed and should not be used afterwards) | 323 | * be taken over or freed and should not be used afterwards) |
324 | */ | 324 | */ |
325 | static void | 325 | static void |
326 | learn_private_key (struct GNUNET_CRYPTO_RsaPrivateKey *pkey) | 326 | learn_private_key (struct GNUNET_CRYPTO_EccPrivateKey *pkey) |
327 | { | 327 | { |
328 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; | 328 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pub; |
329 | struct GNUNET_HashCode long_hash; | 329 | struct GNUNET_HashCode long_hash; |
330 | struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; | 330 | struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; |
331 | struct GNUNET_NAMESTORE_CryptoContainer *cc; | 331 | struct GNUNET_NAMESTORE_CryptoContainer *cc; |
332 | 332 | ||
333 | GNUNET_CRYPTO_rsa_key_get_public (pkey, &pub); | 333 | GNUNET_CRYPTO_ecc_key_get_public (pkey, &pub); |
334 | GNUNET_CRYPTO_short_hash (&pub, | 334 | GNUNET_CRYPTO_short_hash (&pub, |
335 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 335 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
336 | &pubkey_hash); | 336 | &pubkey_hash); |
337 | GNUNET_CRYPTO_short_hash_double (&pubkey_hash, &long_hash); | 337 | GNUNET_CRYPTO_short_hash_double (&pubkey_hash, &long_hash); |
338 | 338 | ||
339 | if (GNUNET_NO != GNUNET_CONTAINER_multihashmap_contains(zonekeys, &long_hash)) | 339 | if (GNUNET_NO != GNUNET_CONTAINER_multihashmap_contains(zonekeys, &long_hash)) |
340 | { | 340 | { |
341 | GNUNET_CRYPTO_rsa_key_free (pkey); | 341 | GNUNET_CRYPTO_ecc_key_free (pkey); |
342 | return; | 342 | return; |
343 | } | 343 | } |
344 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 344 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -414,7 +414,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
414 | { | 414 | { |
415 | GNUNET_CONTAINER_DLL_remove (kl_head, kl_tail, kl); | 415 | GNUNET_CONTAINER_DLL_remove (kl_head, kl_tail, kl); |
416 | if (NULL != kl->keygen) | 416 | if (NULL != kl->keygen) |
417 | GNUNET_CRYPTO_rsa_key_create_stop (kl->keygen); | 417 | GNUNET_CRYPTO_ecc_key_create_stop (kl->keygen); |
418 | GNUNET_free (kl->filename); | 418 | GNUNET_free (kl->filename); |
419 | GNUNET_free (kl); | 419 | GNUNET_free (kl); |
420 | } | 420 | } |
@@ -570,18 +570,18 @@ struct LookupNameContext | |||
570 | */ | 570 | */ |
571 | static void | 571 | static void |
572 | handle_lookup_name_it (void *cls, | 572 | handle_lookup_name_it (void *cls, |
573 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 573 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
574 | struct GNUNET_TIME_Absolute expire, | 574 | struct GNUNET_TIME_Absolute expire, |
575 | const char *name, | 575 | const char *name, |
576 | unsigned int rd_count, | 576 | unsigned int rd_count, |
577 | const struct GNUNET_NAMESTORE_RecordData *rd, | 577 | const struct GNUNET_NAMESTORE_RecordData *rd, |
578 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 578 | const struct GNUNET_CRYPTO_EccSignature *signature) |
579 | { | 579 | { |
580 | struct LookupNameContext *lnc = cls; | 580 | struct LookupNameContext *lnc = cls; |
581 | struct LookupNameResponseMessage *lnr_msg; | 581 | struct LookupNameResponseMessage *lnr_msg; |
582 | struct GNUNET_NAMESTORE_RecordData *rd_selected; | 582 | struct GNUNET_NAMESTORE_RecordData *rd_selected; |
583 | struct GNUNET_NAMESTORE_CryptoContainer *cc; | 583 | struct GNUNET_NAMESTORE_CryptoContainer *cc; |
584 | struct GNUNET_CRYPTO_RsaSignature *signature_new; | 584 | struct GNUNET_CRYPTO_EccSignature *signature_new; |
585 | struct GNUNET_TIME_Absolute e; | 585 | struct GNUNET_TIME_Absolute e; |
586 | struct GNUNET_TIME_Relative re; | 586 | struct GNUNET_TIME_Relative re; |
587 | struct GNUNET_CRYPTO_ShortHashCode zone_key_hash; | 587 | struct GNUNET_CRYPTO_ShortHashCode zone_key_hash; |
@@ -607,7 +607,7 @@ handle_lookup_name_it (void *cls, | |||
607 | if (NULL != zone_key) | 607 | if (NULL != zone_key) |
608 | { | 608 | { |
609 | GNUNET_CRYPTO_short_hash (zone_key, | 609 | GNUNET_CRYPTO_short_hash (zone_key, |
610 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 610 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
611 | &zone_key_hash); | 611 | &zone_key_hash); |
612 | GNUNET_CRYPTO_short_hash_double (&zone_key_hash, &long_hash); | 612 | GNUNET_CRYPTO_short_hash_double (&zone_key_hash, &long_hash); |
613 | if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys, &long_hash))) | 613 | if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get (zonekeys, &long_hash))) |
@@ -728,7 +728,7 @@ handle_lookup_name_it (void *cls, | |||
728 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (copied_elements, rd_selected); | 728 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (copied_elements, rd_selected); |
729 | name_len = (NULL == name) ? 0 : strlen(name) + 1; | 729 | name_len = (NULL == name) ? 0 : strlen(name) + 1; |
730 | r_size = sizeof (struct LookupNameResponseMessage) + | 730 | r_size = sizeof (struct LookupNameResponseMessage) + |
731 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) + | 731 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) + |
732 | name_len + | 732 | name_len + |
733 | rd_ser_len; | 733 | rd_ser_len; |
734 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 734 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -885,7 +885,7 @@ handle_record_put (void *cls, | |||
885 | struct GNUNET_NAMESTORE_Client *nc; | 885 | struct GNUNET_NAMESTORE_Client *nc; |
886 | const struct RecordPutMessage *rp_msg; | 886 | const struct RecordPutMessage *rp_msg; |
887 | struct GNUNET_TIME_Absolute expire; | 887 | struct GNUNET_TIME_Absolute expire; |
888 | const struct GNUNET_CRYPTO_RsaSignature *signature; | 888 | const struct GNUNET_CRYPTO_EccSignature *signature; |
889 | struct RecordPutResponseMessage rpr_msg; | 889 | struct RecordPutResponseMessage rpr_msg; |
890 | struct GNUNET_CRYPTO_ShortHashCode zone_hash; | 890 | struct GNUNET_CRYPTO_ShortHashCode zone_hash; |
891 | size_t name_len; | 891 | size_t name_len; |
@@ -1008,7 +1008,7 @@ struct CreateRecordContext | |||
1008 | /** | 1008 | /** |
1009 | * Zone's public key | 1009 | * Zone's public key |
1010 | */ | 1010 | */ |
1011 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 1011 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
1012 | 1012 | ||
1013 | /** | 1013 | /** |
1014 | * Name for the record to create | 1014 | * Name for the record to create |
@@ -1044,14 +1044,14 @@ struct CreateRecordContext | |||
1044 | */ | 1044 | */ |
1045 | static void | 1045 | static void |
1046 | handle_create_record_it (void *cls, | 1046 | handle_create_record_it (void *cls, |
1047 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pubkey, | 1047 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *pubkey, |
1048 | struct GNUNET_TIME_Absolute expire, | 1048 | struct GNUNET_TIME_Absolute expire, |
1049 | const char *name, | 1049 | const char *name, |
1050 | unsigned int rd_count, | 1050 | unsigned int rd_count, |
1051 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1051 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1052 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 1052 | const struct GNUNET_CRYPTO_EccSignature *signature) |
1053 | { | 1053 | { |
1054 | static struct GNUNET_CRYPTO_RsaSignature dummy_signature; | 1054 | static struct GNUNET_CRYPTO_EccSignature dummy_signature; |
1055 | struct CreateRecordContext *crc = cls; | 1055 | struct CreateRecordContext *crc = cls; |
1056 | struct GNUNET_NAMESTORE_RecordData *rd_new; | 1056 | struct GNUNET_NAMESTORE_RecordData *rd_new; |
1057 | struct GNUNET_TIME_Absolute block_expiration; | 1057 | struct GNUNET_TIME_Absolute block_expiration; |
@@ -1159,7 +1159,7 @@ handle_record_create (void *cls, | |||
1159 | struct GNUNET_NAMESTORE_Client *nc; | 1159 | struct GNUNET_NAMESTORE_Client *nc; |
1160 | const struct RecordCreateMessage *rp_msg; | 1160 | const struct RecordCreateMessage *rp_msg; |
1161 | struct CreateRecordContext crc; | 1161 | struct CreateRecordContext crc; |
1162 | struct GNUNET_CRYPTO_RsaPrivateKey *pkey; | 1162 | struct GNUNET_CRYPTO_EccPrivateKey *pkey; |
1163 | struct RecordCreateResponseMessage rcr_msg; | 1163 | struct RecordCreateResponseMessage rcr_msg; |
1164 | size_t name_len; | 1164 | size_t name_len; |
1165 | size_t msg_size; | 1165 | size_t msg_size; |
@@ -1219,7 +1219,8 @@ handle_record_create (void *cls, | |||
1219 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 1219 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
1220 | return; | 1220 | return; |
1221 | } | 1221 | } |
1222 | if (NULL == (pkey = GNUNET_CRYPTO_rsa_decode_key (pkey_tmp, key_len))) | 1222 | if (NULL == (pkey = GNUNET_CRYPTO_ecc_decode_key (pkey_tmp, key_len, |
1223 | GNUNET_NO))) | ||
1223 | { | 1224 | { |
1224 | GNUNET_break (0); | 1225 | GNUNET_break (0); |
1225 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 1226 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
@@ -1229,15 +1230,15 @@ handle_record_create (void *cls, | |||
1229 | GNUNET_NAMESTORE_records_deserialize (rd_ser_len, rd_ser, rd_count, &rd)) | 1230 | GNUNET_NAMESTORE_records_deserialize (rd_ser_len, rd_ser, rd_count, &rd)) |
1230 | { | 1231 | { |
1231 | GNUNET_break (0); | 1232 | GNUNET_break (0); |
1232 | GNUNET_CRYPTO_rsa_key_free (pkey); | 1233 | GNUNET_CRYPTO_ecc_key_free (pkey); |
1233 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 1234 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
1234 | return; | 1235 | return; |
1235 | } | 1236 | } |
1236 | 1237 | ||
1237 | /* Extracting and converting private key */ | 1238 | /* Extracting and converting private key */ |
1238 | GNUNET_CRYPTO_rsa_key_get_public (pkey, &crc.pubkey); | 1239 | GNUNET_CRYPTO_ecc_key_get_public (pkey, &crc.pubkey); |
1239 | GNUNET_CRYPTO_short_hash (&crc.pubkey, | 1240 | GNUNET_CRYPTO_short_hash (&crc.pubkey, |
1240 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 1241 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
1241 | &pubkey_hash); | 1242 | &pubkey_hash); |
1242 | learn_private_key (pkey); | 1243 | learn_private_key (pkey); |
1243 | 1244 | ||
@@ -1318,14 +1319,14 @@ struct RemoveRecordContext | |||
1318 | */ | 1319 | */ |
1319 | static void | 1320 | static void |
1320 | handle_record_remove_it (void *cls, | 1321 | handle_record_remove_it (void *cls, |
1321 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 1322 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
1322 | struct GNUNET_TIME_Absolute expire, | 1323 | struct GNUNET_TIME_Absolute expire, |
1323 | const char *name, | 1324 | const char *name, |
1324 | unsigned int rd_count, | 1325 | unsigned int rd_count, |
1325 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1326 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1326 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 1327 | const struct GNUNET_CRYPTO_EccSignature *signature) |
1327 | { | 1328 | { |
1328 | static struct GNUNET_CRYPTO_RsaSignature dummy_signature; | 1329 | static struct GNUNET_CRYPTO_EccSignature dummy_signature; |
1329 | struct RemoveRecordContext *rrc = cls; | 1330 | struct RemoveRecordContext *rrc = cls; |
1330 | unsigned int c; | 1331 | unsigned int c; |
1331 | int found; | 1332 | int found; |
@@ -1364,7 +1365,7 @@ handle_record_remove_it (void *cls, | |||
1364 | "No records left for name `%s', removing name\n", | 1365 | "No records left for name `%s', removing name\n", |
1365 | name); | 1366 | name); |
1366 | GNUNET_CRYPTO_short_hash (zone_key, | 1367 | GNUNET_CRYPTO_short_hash (zone_key, |
1367 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 1368 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
1368 | &pubkey_hash); | 1369 | &pubkey_hash); |
1369 | if (GNUNET_OK != | 1370 | if (GNUNET_OK != |
1370 | GSN_database->remove_records (GSN_database->cls, | 1371 | GSN_database->remove_records (GSN_database->cls, |
@@ -1421,8 +1422,8 @@ handle_record_remove (void *cls, | |||
1421 | struct GNUNET_NAMESTORE_Client *nc; | 1422 | struct GNUNET_NAMESTORE_Client *nc; |
1422 | const struct RecordRemoveMessage *rr_msg; | 1423 | const struct RecordRemoveMessage *rr_msg; |
1423 | struct RecordRemoveResponseMessage rrr_msg; | 1424 | struct RecordRemoveResponseMessage rrr_msg; |
1424 | struct GNUNET_CRYPTO_RsaPrivateKey *pkey; | 1425 | struct GNUNET_CRYPTO_EccPrivateKey *pkey; |
1425 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; | 1426 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pub; |
1426 | struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; | 1427 | struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; |
1427 | struct GNUNET_NAMESTORE_RecordData rd; | 1428 | struct GNUNET_NAMESTORE_RecordData rd; |
1428 | const char *pkey_tmp; | 1429 | const char *pkey_tmp; |
@@ -1484,15 +1485,16 @@ handle_record_remove (void *cls, | |||
1484 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 1485 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
1485 | return; | 1486 | return; |
1486 | } | 1487 | } |
1487 | if (NULL == (pkey = GNUNET_CRYPTO_rsa_decode_key (pkey_tmp, key_len))) | 1488 | if (NULL == (pkey = GNUNET_CRYPTO_ecc_decode_key (pkey_tmp, key_len, |
1489 | GNUNET_NO))) | ||
1488 | { | 1490 | { |
1489 | GNUNET_break (0); | 1491 | GNUNET_break (0); |
1490 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 1492 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
1491 | return; | 1493 | return; |
1492 | } | 1494 | } |
1493 | GNUNET_CRYPTO_rsa_key_get_public (pkey, &pub); | 1495 | GNUNET_CRYPTO_ecc_key_get_public (pkey, &pub); |
1494 | GNUNET_CRYPTO_short_hash (&pub, | 1496 | GNUNET_CRYPTO_short_hash (&pub, |
1495 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 1497 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
1496 | &pubkey_hash); | 1498 | &pubkey_hash); |
1497 | learn_private_key (pkey); | 1499 | learn_private_key (pkey); |
1498 | if (GNUNET_OK != | 1500 | if (GNUNET_OK != |
@@ -1618,12 +1620,12 @@ struct ZoneToNameCtx | |||
1618 | */ | 1620 | */ |
1619 | static void | 1621 | static void |
1620 | handle_zone_to_name_it (void *cls, | 1622 | handle_zone_to_name_it (void *cls, |
1621 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 1623 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
1622 | struct GNUNET_TIME_Absolute expire, | 1624 | struct GNUNET_TIME_Absolute expire, |
1623 | const char *name, | 1625 | const char *name, |
1624 | unsigned int rd_count, | 1626 | unsigned int rd_count, |
1625 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1627 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1626 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 1628 | const struct GNUNET_CRYPTO_EccSignature *signature) |
1627 | { | 1629 | { |
1628 | struct ZoneToNameCtx *ztn_ctx = cls; | 1630 | struct ZoneToNameCtx *ztn_ctx = cls; |
1629 | struct ZoneToNameResponseMessage *ztnr_msg; | 1631 | struct ZoneToNameResponseMessage *ztnr_msg; |
@@ -1658,7 +1660,7 @@ handle_zone_to_name_it (void *cls, | |||
1658 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 1660 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); |
1659 | msg_size = sizeof (struct ZoneToNameResponseMessage) + name_len + rd_ser_len; | 1661 | msg_size = sizeof (struct ZoneToNameResponseMessage) + name_len + rd_ser_len; |
1660 | if (NULL != signature) | 1662 | if (NULL != signature) |
1661 | msg_size += sizeof (struct GNUNET_CRYPTO_RsaSignature); | 1663 | msg_size += sizeof (struct GNUNET_CRYPTO_EccSignature); |
1662 | if (msg_size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) | 1664 | if (msg_size >= GNUNET_SERVER_MAX_MESSAGE_SIZE) |
1663 | { | 1665 | { |
1664 | GNUNET_break (0); | 1666 | GNUNET_break (0); |
@@ -1683,7 +1685,7 @@ handle_zone_to_name_it (void *cls, | |||
1683 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_tmp); | 1685 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_tmp); |
1684 | sig_tmp = &rd_tmp[rd_ser_len]; | 1686 | sig_tmp = &rd_tmp[rd_ser_len]; |
1685 | if (NULL != signature) | 1687 | if (NULL != signature) |
1686 | memcpy (sig_tmp, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature)); | 1688 | memcpy (sig_tmp, signature, sizeof (struct GNUNET_CRYPTO_EccSignature)); |
1687 | ztn_ctx->success = GNUNET_OK; | 1689 | ztn_ctx->success = GNUNET_OK; |
1688 | GNUNET_SERVER_notification_context_unicast (snc, ztn_ctx->nc->client, | 1690 | GNUNET_SERVER_notification_context_unicast (snc, ztn_ctx->nc->client, |
1689 | &ztnr_msg->gns_header.header, | 1691 | &ztnr_msg->gns_header.header, |
@@ -1797,16 +1799,16 @@ struct ZoneIterationProcResult | |||
1797 | */ | 1799 | */ |
1798 | static void | 1800 | static void |
1799 | zone_iteraterate_proc (void *cls, | 1801 | zone_iteraterate_proc (void *cls, |
1800 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 1802 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
1801 | struct GNUNET_TIME_Absolute expire, | 1803 | struct GNUNET_TIME_Absolute expire, |
1802 | const char *name, | 1804 | const char *name, |
1803 | unsigned int rd_count, | 1805 | unsigned int rd_count, |
1804 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1806 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1805 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 1807 | const struct GNUNET_CRYPTO_EccSignature *signature) |
1806 | { | 1808 | { |
1807 | struct ZoneIterationProcResult *proc = cls; | 1809 | struct ZoneIterationProcResult *proc = cls; |
1808 | struct GNUNET_NAMESTORE_RecordData rd_filtered[rd_count]; | 1810 | struct GNUNET_NAMESTORE_RecordData rd_filtered[rd_count]; |
1809 | struct GNUNET_CRYPTO_RsaSignature *new_signature = NULL; | 1811 | struct GNUNET_CRYPTO_EccSignature *new_signature = NULL; |
1810 | struct GNUNET_NAMESTORE_CryptoContainer *cc; | 1812 | struct GNUNET_NAMESTORE_CryptoContainer *cc; |
1811 | struct GNUNET_HashCode long_hash; | 1813 | struct GNUNET_HashCode long_hash; |
1812 | struct GNUNET_CRYPTO_ShortHashCode zone_hash; | 1814 | struct GNUNET_CRYPTO_ShortHashCode zone_hash; |
@@ -1884,7 +1886,7 @@ zone_iteraterate_proc (void *cls, | |||
1884 | /* compute / obtain signature, but only if we (a) have records and (b) expiration times were | 1886 | /* compute / obtain signature, but only if we (a) have records and (b) expiration times were |
1885 | converted to absolute expiration times */ | 1887 | converted to absolute expiration times */ |
1886 | GNUNET_CRYPTO_short_hash (zone_key, | 1888 | GNUNET_CRYPTO_short_hash (zone_key, |
1887 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 1889 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
1888 | &zone_hash); | 1890 | &zone_hash); |
1889 | GNUNET_CRYPTO_short_hash_double (&zone_hash, &long_hash); | 1891 | GNUNET_CRYPTO_short_hash_double (&zone_hash, &long_hash); |
1890 | if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get(zonekeys, &long_hash))) | 1892 | if (NULL != (cc = GNUNET_CONTAINER_multihashmap_get(zonekeys, &long_hash))) |
@@ -2160,7 +2162,7 @@ handle_iteration_next (void *cls, | |||
2160 | 2162 | ||
2161 | static void | 2163 | static void |
2162 | zonekey_it_key_cb (void *cls, | 2164 | zonekey_it_key_cb (void *cls, |
2163 | struct GNUNET_CRYPTO_RsaPrivateKey *pk, | 2165 | struct GNUNET_CRYPTO_EccPrivateKey *pk, |
2164 | const char *emsg) | 2166 | const char *emsg) |
2165 | { | 2167 | { |
2166 | struct KeyLoadContext *kl = cls; | 2168 | struct KeyLoadContext *kl = cls; |
@@ -2201,7 +2203,7 @@ zonekey_file_it (void *cls, const char *filename) | |||
2201 | kl = GNUNET_malloc (sizeof (struct KeyLoadContext)); | 2203 | kl = GNUNET_malloc (sizeof (struct KeyLoadContext)); |
2202 | kl->filename = strdup (filename); | 2204 | kl->filename = strdup (filename); |
2203 | kl->counter = cls; | 2205 | kl->counter = cls; |
2204 | kl->keygen = GNUNET_CRYPTO_rsa_key_create_start (filename, zonekey_it_key_cb, kl); | 2206 | kl->keygen = GNUNET_CRYPTO_ecc_key_create_start (filename, zonekey_it_key_cb, kl); |
2205 | if (NULL == kl->keygen) | 2207 | if (NULL == kl->keygen) |
2206 | { | 2208 | { |
2207 | GNUNET_free (kl->filename); | 2209 | GNUNET_free (kl->filename); |
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h index 0e7ecfda3..b0d3ffad0 100644 --- a/src/namestore/namestore.h +++ b/src/namestore/namestore.h | |||
@@ -62,8 +62,8 @@ GNUNET_short_h2s (const struct GNUNET_CRYPTO_ShortHashCode * hc); | |||
62 | * | 62 | * |
63 | * @return the signature | 63 | * @return the signature |
64 | */ | 64 | */ |
65 | struct GNUNET_CRYPTO_RsaSignature * | 65 | struct GNUNET_CRYPTO_EccSignature * |
66 | GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key, | 66 | GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_EccPrivateKey *key, |
67 | struct GNUNET_TIME_Absolute expire, | 67 | struct GNUNET_TIME_Absolute expire, |
68 | const char *name, | 68 | const char *name, |
69 | const struct GNUNET_NAMESTORE_RecordData *rd, | 69 | const struct GNUNET_NAMESTORE_RecordData *rd, |
@@ -212,12 +212,12 @@ struct LookupNameResponseMessage | |||
212 | /** | 212 | /** |
213 | * All zeros if 'contains_sig' is GNUNET_NO. | 213 | * All zeros if 'contains_sig' is GNUNET_NO. |
214 | */ | 214 | */ |
215 | struct GNUNET_CRYPTO_RsaSignature signature; | 215 | struct GNUNET_CRYPTO_EccSignature signature; |
216 | 216 | ||
217 | /** | 217 | /** |
218 | * The public key for the name | 218 | * The public key for the name |
219 | */ | 219 | */ |
220 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key; | 220 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded public_key; |
221 | 221 | ||
222 | /* 0-terminated name and serialized record data */ | 222 | /* 0-terminated name and serialized record data */ |
223 | /* rd_len bytes serialized record data */ | 223 | /* rd_len bytes serialized record data */ |
@@ -262,12 +262,12 @@ struct RecordPutMessage | |||
262 | /** | 262 | /** |
263 | * The signature | 263 | * The signature |
264 | */ | 264 | */ |
265 | struct GNUNET_CRYPTO_RsaSignature signature; | 265 | struct GNUNET_CRYPTO_EccSignature signature; |
266 | 266 | ||
267 | /** | 267 | /** |
268 | * The public key | 268 | * The public key |
269 | */ | 269 | */ |
270 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key; | 270 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded public_key; |
271 | 271 | ||
272 | /* name (0-terminated) followed by "rd_count" serialized records */ | 272 | /* name (0-terminated) followed by "rd_count" serialized records */ |
273 | 273 | ||
@@ -327,7 +327,7 @@ struct RecordCreateMessage | |||
327 | uint16_t pkey_len; | 327 | uint16_t pkey_len; |
328 | 328 | ||
329 | /* followed by: | 329 | /* followed by: |
330 | * GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded private key with length pkey_len | 330 | * GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private key with length pkey_len |
331 | * name with length name_len | 331 | * name with length name_len |
332 | * serialized record data with length rd_len | 332 | * serialized record data with length rd_len |
333 | * */ | 333 | * */ |
@@ -383,7 +383,7 @@ struct RecordRemoveMessage | |||
383 | uint16_t pkey_len; | 383 | uint16_t pkey_len; |
384 | 384 | ||
385 | /* followed by: | 385 | /* followed by: |
386 | * GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded private key with length pkey_len | 386 | * GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private key with length pkey_len |
387 | * name with length name_len | 387 | * name with length name_len |
388 | * serialized record data with length rd_len | 388 | * serialized record data with length rd_len |
389 | * */ | 389 | * */ |
@@ -507,12 +507,12 @@ struct ZoneToNameResponseMessage | |||
507 | /** | 507 | /** |
508 | * Signature | 508 | * Signature |
509 | */ | 509 | */ |
510 | struct GNUNET_CRYPTO_RsaSignature signature; | 510 | struct GNUNET_CRYPTO_EccSignature signature; |
511 | 511 | ||
512 | /** | 512 | /** |
513 | * Publik key | 513 | * Publik key |
514 | */ | 514 | */ |
515 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded zone_key; | 515 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded zone_key; |
516 | 516 | ||
517 | }; | 517 | }; |
518 | 518 | ||
@@ -600,12 +600,12 @@ struct ZoneIterationResponseMessage | |||
600 | /** | 600 | /** |
601 | * All zeros if 'contains_sig' is GNUNET_NO. | 601 | * All zeros if 'contains_sig' is GNUNET_NO. |
602 | */ | 602 | */ |
603 | struct GNUNET_CRYPTO_RsaSignature signature; | 603 | struct GNUNET_CRYPTO_EccSignature signature; |
604 | 604 | ||
605 | /** | 605 | /** |
606 | * The public key | 606 | * The public key |
607 | */ | 607 | */ |
608 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded public_key; | 608 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded public_key; |
609 | 609 | ||
610 | 610 | ||
611 | 611 | ||
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 5e82e08ba..7a7c3eabb 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -264,9 +264,9 @@ handle_lookup_name_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
264 | { | 264 | { |
265 | const char *name; | 265 | const char *name; |
266 | const char * rd_tmp; | 266 | const char * rd_tmp; |
267 | const struct GNUNET_CRYPTO_RsaSignature *signature; | 267 | const struct GNUNET_CRYPTO_EccSignature *signature; |
268 | struct GNUNET_TIME_Absolute expire; | 268 | struct GNUNET_TIME_Absolute expire; |
269 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key_tmp; | 269 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *public_key_tmp; |
270 | size_t exp_msg_len; | 270 | size_t exp_msg_len; |
271 | size_t msg_len; | 271 | size_t msg_len; |
272 | size_t name_len; | 272 | size_t name_len; |
@@ -282,7 +282,7 @@ handle_lookup_name_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
282 | contains_sig = ntohs (msg->contains_sig); | 282 | contains_sig = ntohs (msg->contains_sig); |
283 | expire = GNUNET_TIME_absolute_ntoh (msg->expire); | 283 | expire = GNUNET_TIME_absolute_ntoh (msg->expire); |
284 | exp_msg_len = sizeof (struct LookupNameResponseMessage) + | 284 | exp_msg_len = sizeof (struct LookupNameResponseMessage) + |
285 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) + | 285 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) + |
286 | name_len + rd_len; | 286 | name_len + rd_len; |
287 | if (msg_len != exp_msg_len) | 287 | if (msg_len != exp_msg_len) |
288 | { | 288 | { |
@@ -589,7 +589,7 @@ handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze, | |||
589 | const struct ZoneIterationResponseMessage *msg, | 589 | const struct ZoneIterationResponseMessage *msg, |
590 | size_t size) | 590 | size_t size) |
591 | { | 591 | { |
592 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubdummy; | 592 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubdummy; |
593 | size_t msg_len; | 593 | size_t msg_len; |
594 | size_t exp_msg_len; | 594 | size_t exp_msg_len; |
595 | size_t name_len; | 595 | size_t name_len; |
@@ -1003,12 +1003,12 @@ GNUNET_NAMESTORE_disconnect (struct GNUNET_NAMESTORE_Handle *h) | |||
1003 | */ | 1003 | */ |
1004 | struct GNUNET_NAMESTORE_QueueEntry * | 1004 | struct GNUNET_NAMESTORE_QueueEntry * |
1005 | GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h, | 1005 | GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h, |
1006 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 1006 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
1007 | const char *name, | 1007 | const char *name, |
1008 | struct GNUNET_TIME_Absolute freshness, | 1008 | struct GNUNET_TIME_Absolute freshness, |
1009 | unsigned int rd_count, | 1009 | unsigned int rd_count, |
1010 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1010 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1011 | const struct GNUNET_CRYPTO_RsaSignature *signature, | 1011 | const struct GNUNET_CRYPTO_EccSignature *signature, |
1012 | GNUNET_NAMESTORE_ContinuationWithStatus cont, | 1012 | GNUNET_NAMESTORE_ContinuationWithStatus cont, |
1013 | void *cont_cls) | 1013 | void *cont_cls) |
1014 | { | 1014 | { |
@@ -1088,18 +1088,18 @@ GNUNET_NAMESTORE_record_put (struct GNUNET_NAMESTORE_Handle *h, | |||
1088 | * @return GNUNET_OK if the signature is valid | 1088 | * @return GNUNET_OK if the signature is valid |
1089 | */ | 1089 | */ |
1090 | int | 1090 | int |
1091 | GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *public_key, | 1091 | GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *public_key, |
1092 | const struct GNUNET_TIME_Absolute freshness, | 1092 | const struct GNUNET_TIME_Absolute freshness, |
1093 | const char *name, | 1093 | const char *name, |
1094 | unsigned int rd_count, | 1094 | unsigned int rd_count, |
1095 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1095 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1096 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 1096 | const struct GNUNET_CRYPTO_EccSignature *signature) |
1097 | { | 1097 | { |
1098 | size_t rd_ser_len; | 1098 | size_t rd_ser_len; |
1099 | size_t name_len; | 1099 | size_t name_len; |
1100 | char *name_tmp; | 1100 | char *name_tmp; |
1101 | char *rd_ser; | 1101 | char *rd_ser; |
1102 | struct GNUNET_CRYPTO_RsaSignaturePurpose *sig_purpose; | 1102 | struct GNUNET_CRYPTO_EccSignaturePurpose *sig_purpose; |
1103 | struct GNUNET_TIME_AbsoluteNBO *expire_tmp; | 1103 | struct GNUNET_TIME_AbsoluteNBO *expire_tmp; |
1104 | struct GNUNET_TIME_AbsoluteNBO expire_nbo = GNUNET_TIME_absolute_hton (freshness); | 1104 | struct GNUNET_TIME_AbsoluteNBO expire_nbo = GNUNET_TIME_absolute_hton (freshness); |
1105 | uint32_t sig_len; | 1105 | uint32_t sig_len; |
@@ -1115,11 +1115,11 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary | |||
1115 | return GNUNET_SYSERR; | 1115 | return GNUNET_SYSERR; |
1116 | } | 1116 | } |
1117 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 1117 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); |
1118 | sig_len = sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose) + sizeof (struct GNUNET_TIME_AbsoluteNBO) + rd_ser_len + name_len; | 1118 | sig_len = sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + sizeof (struct GNUNET_TIME_AbsoluteNBO) + rd_ser_len + name_len; |
1119 | { | 1119 | { |
1120 | char sig_buf[sig_len] GNUNET_ALIGN; | 1120 | char sig_buf[sig_len] GNUNET_ALIGN; |
1121 | 1121 | ||
1122 | sig_purpose = (struct GNUNET_CRYPTO_RsaSignaturePurpose *) sig_buf; | 1122 | sig_purpose = (struct GNUNET_CRYPTO_EccSignaturePurpose *) sig_buf; |
1123 | sig_purpose->size = htonl (sig_len); | 1123 | sig_purpose->size = htonl (sig_len); |
1124 | sig_purpose->purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); | 1124 | sig_purpose->purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); |
1125 | expire_tmp = (struct GNUNET_TIME_AbsoluteNBO *) &sig_purpose[1]; | 1125 | expire_tmp = (struct GNUNET_TIME_AbsoluteNBO *) &sig_purpose[1]; |
@@ -1129,7 +1129,7 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary | |||
1129 | rd_ser = &name_tmp[name_len]; | 1129 | rd_ser = &name_tmp[name_len]; |
1130 | GNUNET_assert (rd_ser_len == | 1130 | GNUNET_assert (rd_ser_len == |
1131 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser)); | 1131 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser)); |
1132 | return GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN, sig_purpose, signature, public_key); | 1132 | return GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN, sig_purpose, signature, public_key); |
1133 | } | 1133 | } |
1134 | } | 1134 | } |
1135 | 1135 | ||
@@ -1149,7 +1149,7 @@ GNUNET_NAMESTORE_verify_signature (const struct GNUNET_CRYPTO_RsaPublicKeyBinary | |||
1149 | */ | 1149 | */ |
1150 | struct GNUNET_NAMESTORE_QueueEntry * | 1150 | struct GNUNET_NAMESTORE_QueueEntry * |
1151 | GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, | 1151 | GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, |
1152 | const struct GNUNET_CRYPTO_RsaPrivateKey *pkey, | 1152 | const struct GNUNET_CRYPTO_EccPrivateKey *pkey, |
1153 | const char *name, | 1153 | const char *name, |
1154 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1154 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1155 | GNUNET_NAMESTORE_ContinuationWithStatus cont, | 1155 | GNUNET_NAMESTORE_ContinuationWithStatus cont, |
@@ -1166,7 +1166,7 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, | |||
1166 | size_t key_len; | 1166 | size_t key_len; |
1167 | uint32_t rid; | 1167 | uint32_t rid; |
1168 | struct RecordCreateMessage * msg; | 1168 | struct RecordCreateMessage * msg; |
1169 | struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded * pkey_enc; | 1169 | struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded * pkey_enc; |
1170 | 1170 | ||
1171 | GNUNET_assert (NULL != h); | 1171 | GNUNET_assert (NULL != h); |
1172 | GNUNET_assert (NULL != pkey); | 1172 | GNUNET_assert (NULL != pkey); |
@@ -1190,11 +1190,11 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, | |||
1190 | qe->op_id = rid; | 1190 | qe->op_id = rid; |
1191 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe); | 1191 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe); |
1192 | 1192 | ||
1193 | pkey_enc = GNUNET_CRYPTO_rsa_encode_key (pkey); | 1193 | pkey_enc = GNUNET_CRYPTO_ecc_encode_key (pkey); |
1194 | GNUNET_assert (NULL != pkey_enc); | 1194 | GNUNET_assert (NULL != pkey_enc); |
1195 | 1195 | ||
1196 | /* setup msg */ | 1196 | /* setup msg */ |
1197 | key_len = ntohs (pkey_enc->len); | 1197 | key_len = ntohs (pkey_enc->size); |
1198 | rd_ser_len = GNUNET_NAMESTORE_records_get_size(1, rd); | 1198 | rd_ser_len = GNUNET_NAMESTORE_records_get_size(1, rd); |
1199 | msg_size = sizeof (struct RecordCreateMessage) + key_len + name_len + rd_ser_len; | 1199 | msg_size = sizeof (struct RecordCreateMessage) + key_len + name_len + rd_ser_len; |
1200 | pe = GNUNET_malloc(sizeof (struct PendingMessage) + msg_size); | 1200 | pe = GNUNET_malloc(sizeof (struct PendingMessage) + msg_size); |
@@ -1244,14 +1244,14 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h, | |||
1244 | */ | 1244 | */ |
1245 | struct GNUNET_NAMESTORE_QueueEntry * | 1245 | struct GNUNET_NAMESTORE_QueueEntry * |
1246 | GNUNET_NAMESTORE_record_remove (struct GNUNET_NAMESTORE_Handle *h, | 1246 | GNUNET_NAMESTORE_record_remove (struct GNUNET_NAMESTORE_Handle *h, |
1247 | const struct GNUNET_CRYPTO_RsaPrivateKey *pkey, | 1247 | const struct GNUNET_CRYPTO_EccPrivateKey *pkey, |
1248 | const char *name, | 1248 | const char *name, |
1249 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1249 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1250 | GNUNET_NAMESTORE_ContinuationWithStatus cont, | 1250 | GNUNET_NAMESTORE_ContinuationWithStatus cont, |
1251 | void *cont_cls) | 1251 | void *cont_cls) |
1252 | { | 1252 | { |
1253 | struct GNUNET_NAMESTORE_QueueEntry *qe; | 1253 | struct GNUNET_NAMESTORE_QueueEntry *qe; |
1254 | struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded * pkey_enc; | 1254 | struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded *pkey_enc; |
1255 | struct PendingMessage *pe; | 1255 | struct PendingMessage *pe; |
1256 | struct RecordRemoveMessage * msg; | 1256 | struct RecordRemoveMessage * msg; |
1257 | char *pkey_tmp; | 1257 | char *pkey_tmp; |
@@ -1282,15 +1282,15 @@ GNUNET_NAMESTORE_record_remove (struct GNUNET_NAMESTORE_Handle *h, | |||
1282 | qe->op_id = rid; | 1282 | qe->op_id = rid; |
1283 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe); | 1283 | GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, qe); |
1284 | 1284 | ||
1285 | pkey_enc = GNUNET_CRYPTO_rsa_encode_key (pkey); | 1285 | pkey_enc = GNUNET_CRYPTO_ecc_encode_key (pkey); |
1286 | GNUNET_assert (NULL != pkey_enc); | 1286 | GNUNET_assert (NULL != pkey_enc); |
1287 | key_len = ntohs (pkey_enc->len); | 1287 | key_len = ntohs (pkey_enc->size); |
1288 | 1288 | ||
1289 | rd_count = (NULL == rd) ? 0 : 1; | 1289 | rd_count = (NULL == rd) ? 0 : 1; |
1290 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 1290 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); |
1291 | name_len = strlen (name) + 1; | 1291 | name_len = strlen (name) + 1; |
1292 | msg_size = sizeof (struct RecordRemoveMessage) + key_len + name_len + rd_ser_len; | 1292 | msg_size = sizeof (struct RecordRemoveMessage) + key_len + name_len + rd_ser_len; |
1293 | pe = GNUNET_malloc(sizeof (struct PendingMessage) + msg_size); | 1293 | pe = GNUNET_malloc (sizeof (struct PendingMessage) + msg_size); |
1294 | pe->size = msg_size; | 1294 | pe->size = msg_size; |
1295 | pe->is_init = GNUNET_NO; | 1295 | pe->is_init = GNUNET_NO; |
1296 | msg = (struct RecordRemoveMessage *) &pe[1]; | 1296 | msg = (struct RecordRemoveMessage *) &pe[1]; |
diff --git a/src/namestore/namestore_common.c b/src/namestore/namestore_common.c index 573a8d0a8..826eae504 100644 --- a/src/namestore/namestore_common.c +++ b/src/namestore/namestore_common.c | |||
@@ -279,15 +279,15 @@ GNUNET_NAMESTORE_records_deserialize (size_t len, | |||
279 | * | 279 | * |
280 | * @return the signature | 280 | * @return the signature |
281 | */ | 281 | */ |
282 | struct GNUNET_CRYPTO_RsaSignature * | 282 | struct GNUNET_CRYPTO_EccSignature * |
283 | GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key, | 283 | GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_EccPrivateKey *key, |
284 | struct GNUNET_TIME_Absolute expire, | 284 | struct GNUNET_TIME_Absolute expire, |
285 | const char *name, | 285 | const char *name, |
286 | const struct GNUNET_NAMESTORE_RecordData *rd, | 286 | const struct GNUNET_NAMESTORE_RecordData *rd, |
287 | unsigned int rd_count) | 287 | unsigned int rd_count) |
288 | { | 288 | { |
289 | struct GNUNET_CRYPTO_RsaSignature *sig; | 289 | struct GNUNET_CRYPTO_EccSignature *sig; |
290 | struct GNUNET_CRYPTO_RsaSignaturePurpose *sig_purpose; | 290 | struct GNUNET_CRYPTO_EccSignaturePurpose *sig_purpose; |
291 | struct GNUNET_TIME_AbsoluteNBO expire_nbo; | 291 | struct GNUNET_TIME_AbsoluteNBO expire_nbo; |
292 | size_t rd_ser_len; | 292 | size_t rd_ser_len; |
293 | size_t name_len; | 293 | size_t name_len; |
@@ -302,7 +302,7 @@ GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key | |||
302 | GNUNET_break (0); | 302 | GNUNET_break (0); |
303 | return NULL; | 303 | return NULL; |
304 | } | 304 | } |
305 | sig = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_RsaSignature)); | 305 | sig = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_EccSignature)); |
306 | name_len = strlen (name) + 1; | 306 | name_len = strlen (name) + 1; |
307 | expire_nbo = GNUNET_TIME_absolute_hton (expire); | 307 | expire_nbo = GNUNET_TIME_absolute_hton (expire); |
308 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 308 | rd_ser_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); |
@@ -311,7 +311,7 @@ GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key | |||
311 | 311 | ||
312 | GNUNET_assert (rd_ser_len == | 312 | GNUNET_assert (rd_ser_len == |
313 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser)); | 313 | GNUNET_NAMESTORE_records_serialize (rd_count, rd, rd_ser_len, rd_ser)); |
314 | sig_len = sizeof (struct GNUNET_CRYPTO_RsaSignaturePurpose) + sizeof (struct GNUNET_TIME_AbsoluteNBO) + rd_ser_len + name_len; | 314 | sig_len = sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + sizeof (struct GNUNET_TIME_AbsoluteNBO) + rd_ser_len + name_len; |
315 | sig_purpose = GNUNET_malloc (sig_len); | 315 | sig_purpose = GNUNET_malloc (sig_len); |
316 | sig_purpose->size = htonl (sig_len); | 316 | sig_purpose->size = htonl (sig_len); |
317 | sig_purpose->purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); | 317 | sig_purpose->purpose = htonl (GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN); |
@@ -321,7 +321,7 @@ GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key | |||
321 | memcpy (name_tmp, name, name_len); | 321 | memcpy (name_tmp, name, name_len); |
322 | rd_tmp = &name_tmp[name_len]; | 322 | rd_tmp = &name_tmp[name_len]; |
323 | memcpy (rd_tmp, rd_ser, rd_ser_len); | 323 | memcpy (rd_tmp, rd_ser, rd_ser_len); |
324 | res = GNUNET_CRYPTO_rsa_sign (key, sig_purpose, sig); | 324 | res = GNUNET_CRYPTO_ecc_sign (key, sig_purpose, sig); |
325 | GNUNET_free (sig_purpose); | 325 | GNUNET_free (sig_purpose); |
326 | } | 326 | } |
327 | if (GNUNET_OK != res) | 327 | if (GNUNET_OK != res) |
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index 3cddc952d..070549b33 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -269,12 +269,12 @@ namestore_postgres_remove_records (void *cls, | |||
269 | */ | 269 | */ |
270 | static int | 270 | static int |
271 | namestore_postgres_put_records (void *cls, | 271 | namestore_postgres_put_records (void *cls, |
272 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 272 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
273 | struct GNUNET_TIME_Absolute expire, | 273 | struct GNUNET_TIME_Absolute expire, |
274 | const char *name, | 274 | const char *name, |
275 | unsigned int rd_count, | 275 | unsigned int rd_count, |
276 | const struct GNUNET_NAMESTORE_RecordData *rd, | 276 | const struct GNUNET_NAMESTORE_RecordData *rd, |
277 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 277 | const struct GNUNET_CRYPTO_EccSignature *signature) |
278 | { | 278 | { |
279 | struct Plugin *plugin = cls; | 279 | struct Plugin *plugin = cls; |
280 | PGresult *ret; | 280 | PGresult *ret; |
@@ -287,7 +287,7 @@ namestore_postgres_put_records (void *cls, | |||
287 | unsigned int i; | 287 | unsigned int i; |
288 | 288 | ||
289 | GNUNET_CRYPTO_short_hash (zone_key, | 289 | GNUNET_CRYPTO_short_hash (zone_key, |
290 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 290 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
291 | &zone); | 291 | &zone); |
292 | (void) namestore_postgres_remove_records (plugin, &zone, name); | 292 | (void) namestore_postgres_remove_records (plugin, &zone, name); |
293 | name_len = strlen (name); | 293 | name_len = strlen (name); |
@@ -327,12 +327,12 @@ namestore_postgres_put_records (void *cls, | |||
327 | (const char *) &rvalue_be | 327 | (const char *) &rvalue_be |
328 | }; | 328 | }; |
329 | int paramLengths[] = { | 329 | int paramLengths[] = { |
330 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 330 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
331 | name_len, | 331 | name_len, |
332 | sizeof (uint32_t), | 332 | sizeof (uint32_t), |
333 | data_size, | 333 | data_size, |
334 | sizeof (uint64_t), | 334 | sizeof (uint64_t), |
335 | sizeof (struct GNUNET_CRYPTO_RsaSignature), | 335 | sizeof (struct GNUNET_CRYPTO_EccSignature), |
336 | sizeof (struct GNUNET_CRYPTO_ShortHashCode), | 336 | sizeof (struct GNUNET_CRYPTO_ShortHashCode), |
337 | sizeof (struct GNUNET_CRYPTO_ShortHashCode), | 337 | sizeof (struct GNUNET_CRYPTO_ShortHashCode), |
338 | sizeof (struct GNUNET_CRYPTO_ShortHashCode), | 338 | sizeof (struct GNUNET_CRYPTO_ShortHashCode), |
@@ -378,8 +378,8 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
378 | { | 378 | { |
379 | unsigned int record_count; | 379 | unsigned int record_count; |
380 | size_t data_size; | 380 | size_t data_size; |
381 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key; | 381 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key; |
382 | const struct GNUNET_CRYPTO_RsaSignature *sig; | 382 | const struct GNUNET_CRYPTO_EccSignature *sig; |
383 | struct GNUNET_TIME_Absolute expiration; | 383 | struct GNUNET_TIME_Absolute expiration; |
384 | const char *data; | 384 | const char *data; |
385 | const char *name; | 385 | const char *name; |
@@ -406,16 +406,16 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
406 | } | 406 | } |
407 | GNUNET_assert (1 == cnt); | 407 | GNUNET_assert (1 == cnt); |
408 | if ((6 != PQnfields (res)) || | 408 | if ((6 != PQnfields (res)) || |
409 | (sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) != PQgetlength (res, 0, 0)) || | 409 | (sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) != PQgetlength (res, 0, 0)) || |
410 | (sizeof (uint32_t) != PQfsize (res, 2)) || | 410 | (sizeof (uint32_t) != PQfsize (res, 2)) || |
411 | (sizeof (uint64_t) != PQfsize (res, 4)) || | 411 | (sizeof (uint64_t) != PQfsize (res, 4)) || |
412 | (sizeof (struct GNUNET_CRYPTO_RsaSignature) != PQgetlength (res, 0, 5))) | 412 | (sizeof (struct GNUNET_CRYPTO_EccSignature) != PQgetlength (res, 0, 5))) |
413 | { | 413 | { |
414 | GNUNET_break (0); | 414 | GNUNET_break (0); |
415 | PQclear (res); | 415 | PQclear (res); |
416 | return GNUNET_SYSERR; | 416 | return GNUNET_SYSERR; |
417 | } | 417 | } |
418 | zone_key = (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *) PQgetvalue (res, 0, 0); | 418 | zone_key = (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *) PQgetvalue (res, 0, 0); |
419 | name = PQgetvalue (res, 0, 1); | 419 | name = PQgetvalue (res, 0, 1); |
420 | name_len = PQgetlength (res, 0, 1); | 420 | name_len = PQgetlength (res, 0, 1); |
421 | record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); | 421 | record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); |
@@ -423,7 +423,7 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
423 | data = PQgetvalue (res, 0, 3); | 423 | data = PQgetvalue (res, 0, 3); |
424 | expiration.abs_value = | 424 | expiration.abs_value = |
425 | GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 4)); | 425 | GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 4)); |
426 | sig = (const struct GNUNET_CRYPTO_RsaSignature*) PQgetvalue (res, 0, 5); | 426 | sig = (const struct GNUNET_CRYPTO_EccSignature*) PQgetvalue (res, 0, 5); |
427 | if (record_count > 64 * 1024) | 427 | if (record_count > 64 * 1024) |
428 | { | 428 | { |
429 | /* sanity check, don't stack allocate far too much just | 429 | /* sanity check, don't stack allocate far too much just |
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index f0deb7fa9..f0b801d1e 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -450,12 +450,12 @@ namestore_sqlite_remove_records (void *cls, | |||
450 | */ | 450 | */ |
451 | static int | 451 | static int |
452 | namestore_sqlite_put_records (void *cls, | 452 | namestore_sqlite_put_records (void *cls, |
453 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 453 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
454 | struct GNUNET_TIME_Absolute expire, | 454 | struct GNUNET_TIME_Absolute expire, |
455 | const char *name, | 455 | const char *name, |
456 | unsigned int rd_count, | 456 | unsigned int rd_count, |
457 | const struct GNUNET_NAMESTORE_RecordData *rd, | 457 | const struct GNUNET_NAMESTORE_RecordData *rd, |
458 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 458 | const struct GNUNET_CRYPTO_EccSignature *signature) |
459 | { | 459 | { |
460 | struct Plugin *plugin = cls; | 460 | struct Plugin *plugin = cls; |
461 | int n; | 461 | int n; |
@@ -467,7 +467,7 @@ namestore_sqlite_put_records (void *cls, | |||
467 | size_t data_size; | 467 | size_t data_size; |
468 | unsigned int i; | 468 | unsigned int i; |
469 | 469 | ||
470 | GNUNET_CRYPTO_short_hash (zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone); | 470 | GNUNET_CRYPTO_short_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &zone); |
471 | (void) namestore_sqlite_remove_records (plugin, &zone, name); | 471 | (void) namestore_sqlite_remove_records (plugin, &zone, name); |
472 | name_len = strlen (name); | 472 | name_len = strlen (name); |
473 | GNUNET_CRYPTO_short_hash (name, name_len, &nh); | 473 | GNUNET_CRYPTO_short_hash (name, name_len, &nh); |
@@ -497,12 +497,12 @@ namestore_sqlite_put_records (void *cls, | |||
497 | GNUNET_break (0); | 497 | GNUNET_break (0); |
498 | return GNUNET_SYSERR; | 498 | return GNUNET_SYSERR; |
499 | } | 499 | } |
500 | if ((SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 1, zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), SQLITE_STATIC)) || | 500 | if ((SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 1, zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), SQLITE_STATIC)) || |
501 | (SQLITE_OK != sqlite3_bind_text (plugin->put_records, 2, name, -1, SQLITE_STATIC)) || | 501 | (SQLITE_OK != sqlite3_bind_text (plugin->put_records, 2, name, -1, SQLITE_STATIC)) || |
502 | (SQLITE_OK != sqlite3_bind_int (plugin->put_records, 3, rd_count)) || | 502 | (SQLITE_OK != sqlite3_bind_int (plugin->put_records, 3, rd_count)) || |
503 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 4, data, data_size, SQLITE_STATIC)) || | 503 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 4, data, data_size, SQLITE_STATIC)) || |
504 | (SQLITE_OK != sqlite3_bind_int64 (plugin->put_records, 5, expire.abs_value)) || | 504 | (SQLITE_OK != sqlite3_bind_int64 (plugin->put_records, 5, expire.abs_value)) || |
505 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 6, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature), SQLITE_STATIC)) || | 505 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 6, signature, sizeof (struct GNUNET_CRYPTO_EccSignature), SQLITE_STATIC)) || |
506 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 7, &zone_delegation, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || | 506 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 7, &zone_delegation, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || |
507 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 8, &zone, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || | 507 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 8, &zone, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || |
508 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 9, &nh, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || | 508 | (SQLITE_OK != sqlite3_bind_blob (plugin->put_records, 9, &nh, sizeof (struct GNUNET_CRYPTO_ShortHashCode), SQLITE_STATIC)) || |
@@ -560,8 +560,8 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
560 | int sret; | 560 | int sret; |
561 | unsigned int record_count; | 561 | unsigned int record_count; |
562 | size_t data_size; | 562 | size_t data_size; |
563 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key; | 563 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key; |
564 | const struct GNUNET_CRYPTO_RsaSignature *sig; | 564 | const struct GNUNET_CRYPTO_EccSignature *sig; |
565 | struct GNUNET_TIME_Absolute expiration; | 565 | struct GNUNET_TIME_Absolute expiration; |
566 | const char *data; | 566 | const char *data; |
567 | const char *name; | 567 | const char *name; |
@@ -578,8 +578,8 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
578 | expiration.abs_value = (uint64_t) sqlite3_column_int64 (stmt, 4); | 578 | expiration.abs_value = (uint64_t) sqlite3_column_int64 (stmt, 4); |
579 | sig = sqlite3_column_blob (stmt, 5); | 579 | sig = sqlite3_column_blob (stmt, 5); |
580 | 580 | ||
581 | if ( (sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) != sqlite3_column_bytes (stmt, 0)) || | 581 | if ( (sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) != sqlite3_column_bytes (stmt, 0)) || |
582 | (sizeof (struct GNUNET_CRYPTO_RsaSignature) != sqlite3_column_bytes (stmt, 5)) ) | 582 | (sizeof (struct GNUNET_CRYPTO_EccSignature) != sqlite3_column_bytes (stmt, 5)) ) |
583 | { | 583 | { |
584 | GNUNET_break (0); | 584 | GNUNET_break (0); |
585 | ret = GNUNET_SYSERR; | 585 | ret = GNUNET_SYSERR; |
diff --git a/src/namestore/test_namestore_api.c b/src/namestore/test_namestore_api.c index c290673fa..32dd4844c 100644 --- a/src/namestore/test_namestore_api.c +++ b/src/namestore/test_namestore_api.c | |||
@@ -39,9 +39,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
39 | 39 | ||
40 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 40 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_RsaPrivateKey *privkey; | 42 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 44 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
45 | 45 | ||
46 | static struct GNUNET_CRYPTO_ShortHashCode zone; | 46 | static struct GNUNET_CRYPTO_ShortHashCode zone; |
47 | 47 | ||
@@ -60,7 +60,7 @@ cleanup () | |||
60 | } | 60 | } |
61 | if (NULL != privkey) | 61 | if (NULL != privkey) |
62 | { | 62 | { |
63 | GNUNET_CRYPTO_rsa_key_free (privkey); | 63 | GNUNET_CRYPTO_ecc_key_free (privkey); |
64 | privkey = NULL; | 64 | privkey = NULL; |
65 | } | 65 | } |
66 | GNUNET_SCHEDULER_shutdown (); | 66 | GNUNET_SCHEDULER_shutdown (); |
@@ -96,12 +96,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
96 | 96 | ||
97 | static void | 97 | static void |
98 | name_lookup_proc (void *cls, | 98 | name_lookup_proc (void *cls, |
99 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 99 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
100 | struct GNUNET_TIME_Absolute expire, | 100 | struct GNUNET_TIME_Absolute expire, |
101 | const char *name, | 101 | const char *name, |
102 | unsigned int rd_count, | 102 | unsigned int rd_count, |
103 | const struct GNUNET_NAMESTORE_RecordData *rd, | 103 | const struct GNUNET_NAMESTORE_RecordData *rd, |
104 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 104 | const struct GNUNET_CRYPTO_EccSignature *signature) |
105 | { | 105 | { |
106 | nsqe = NULL; | 106 | nsqe = NULL; |
107 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 107 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -135,7 +135,7 @@ run (void *cls, | |||
135 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 135 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
136 | struct GNUNET_TESTING_Peer *peer) | 136 | struct GNUNET_TESTING_Peer *peer) |
137 | { | 137 | { |
138 | struct GNUNET_CRYPTO_RsaSignature signature; | 138 | struct GNUNET_CRYPTO_EccSignature signature; |
139 | struct GNUNET_NAMESTORE_RecordData rd; | 139 | struct GNUNET_NAMESTORE_RecordData rd; |
140 | char *hostkey_file; | 140 | char *hostkey_file; |
141 | const char * name = "dummy.dummy.gnunet"; | 141 | const char * name = "dummy.dummy.gnunet"; |
@@ -147,10 +147,10 @@ run (void *cls, | |||
147 | DIR_SEPARATOR_STR, | 147 | DIR_SEPARATOR_STR, |
148 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 148 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
149 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 149 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
150 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file (hostkey_file); | 150 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); |
151 | GNUNET_free (hostkey_file); | 151 | GNUNET_free (hostkey_file); |
152 | GNUNET_assert (privkey != NULL); | 152 | GNUNET_assert (privkey != NULL); |
153 | GNUNET_CRYPTO_rsa_key_get_public (privkey, &pubkey); | 153 | GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey); |
154 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (pubkey), &zone); | 154 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (pubkey), &zone); |
155 | memset (&signature, '\0', sizeof (signature)); | 155 | memset (&signature, '\0', sizeof (signature)); |
156 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value; | 156 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value; |
diff --git a/src/namestore/test_namestore_api_create.c b/src/namestore/test_namestore_api_create.c index 8bdf1338d..6db832149 100644 --- a/src/namestore/test_namestore_api_create.c +++ b/src/namestore/test_namestore_api_create.c | |||
@@ -50,13 +50,13 @@ static struct GNUNET_NAMESTORE_Handle * nsh; | |||
50 | 50 | ||
51 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 51 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
52 | 52 | ||
53 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 53 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
54 | 54 | ||
55 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 55 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
56 | 56 | ||
57 | static struct GNUNET_CRYPTO_RsaSignature *s_signature; | 57 | static struct GNUNET_CRYPTO_EccSignature *s_signature; |
58 | 58 | ||
59 | static struct GNUNET_CRYPTO_RsaSignature *s_signature_updated; | 59 | static struct GNUNET_CRYPTO_EccSignature *s_signature_updated; |
60 | 60 | ||
61 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; | 61 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; |
62 | 62 | ||
@@ -82,7 +82,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
82 | GNUNET_NAMESTORE_disconnect (nsh); | 82 | GNUNET_NAMESTORE_disconnect (nsh); |
83 | nsh = NULL; | 83 | nsh = NULL; |
84 | if (privkey != NULL) | 84 | if (privkey != NULL) |
85 | GNUNET_CRYPTO_rsa_key_free (privkey); | 85 | GNUNET_CRYPTO_ecc_key_free (privkey); |
86 | privkey = NULL; | 86 | privkey = NULL; |
87 | GNUNET_free_non_null (s_name); | 87 | GNUNET_free_non_null (s_name); |
88 | res = 1; | 88 | res = 1; |
@@ -102,7 +102,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
102 | GNUNET_free_non_null (s_second_record); | 102 | GNUNET_free_non_null (s_second_record); |
103 | GNUNET_free_non_null (s_name); | 103 | GNUNET_free_non_null (s_name); |
104 | if (privkey != NULL) | 104 | if (privkey != NULL) |
105 | GNUNET_CRYPTO_rsa_key_free (privkey); | 105 | GNUNET_CRYPTO_ecc_key_free (privkey); |
106 | privkey = NULL; | 106 | privkey = NULL; |
107 | if (nsh != NULL) | 107 | if (nsh != NULL) |
108 | GNUNET_NAMESTORE_disconnect (nsh); | 108 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -112,12 +112,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
112 | 112 | ||
113 | static void | 113 | static void |
114 | name_lookup_second_proc (void *cls, | 114 | name_lookup_second_proc (void *cls, |
115 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 115 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
116 | struct GNUNET_TIME_Absolute expire, | 116 | struct GNUNET_TIME_Absolute expire, |
117 | const char *n, | 117 | const char *n, |
118 | unsigned int rd_count, | 118 | unsigned int rd_count, |
119 | const struct GNUNET_NAMESTORE_RecordData *rd, | 119 | const struct GNUNET_NAMESTORE_RecordData *rd, |
120 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 120 | const struct GNUNET_CRYPTO_EccSignature *signature) |
121 | { | 121 | { |
122 | static int found = GNUNET_NO; | 122 | static int found = GNUNET_NO; |
123 | int failed = GNUNET_NO; | 123 | int failed = GNUNET_NO; |
@@ -126,7 +126,7 @@ name_lookup_second_proc (void *cls, | |||
126 | if (n != NULL) | 126 | if (n != NULL) |
127 | { | 127 | { |
128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); | 128 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); |
129 | if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) | 129 | if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))) |
130 | { | 130 | { |
131 | GNUNET_break (0); | 131 | GNUNET_break (0); |
132 | failed = GNUNET_YES; | 132 | failed = GNUNET_YES; |
@@ -172,7 +172,7 @@ name_lookup_second_proc (void *cls, | |||
172 | rd_new[1].flags = 0; /* unset GNUNET_NAMESTORE_RF_AUTHORITY */ | 172 | rd_new[1].flags = 0; /* unset GNUNET_NAMESTORE_RF_AUTHORITY */ |
173 | s_signature_updated = GNUNET_NAMESTORE_create_signature (privkey, expire, s_name, rd_new, 2); | 173 | s_signature_updated = GNUNET_NAMESTORE_create_signature (privkey, expire, s_name, rd_new, 2); |
174 | 174 | ||
175 | if (0 != memcmp (s_signature_updated, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 175 | if (0 != memcmp (s_signature_updated, signature, sizeof (struct GNUNET_CRYPTO_EccSignature))) |
176 | { | 176 | { |
177 | GNUNET_break (0); | 177 | GNUNET_break (0); |
178 | failed = GNUNET_YES; | 178 | failed = GNUNET_YES; |
@@ -219,12 +219,12 @@ create_second_cont (void *cls, int32_t success, const char *emsg) | |||
219 | 219 | ||
220 | static void | 220 | static void |
221 | name_lookup_initial_proc (void *cls, | 221 | name_lookup_initial_proc (void *cls, |
222 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 222 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
223 | struct GNUNET_TIME_Absolute expire, | 223 | struct GNUNET_TIME_Absolute expire, |
224 | const char *n, | 224 | const char *n, |
225 | unsigned int rd_count, | 225 | unsigned int rd_count, |
226 | const struct GNUNET_NAMESTORE_RecordData *rd, | 226 | const struct GNUNET_NAMESTORE_RecordData *rd, |
227 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 227 | const struct GNUNET_CRYPTO_EccSignature *signature) |
228 | { | 228 | { |
229 | char * name = cls; | 229 | char * name = cls; |
230 | static int found = GNUNET_NO; | 230 | static int found = GNUNET_NO; |
@@ -234,7 +234,7 @@ name_lookup_initial_proc (void *cls, | |||
234 | if (n != NULL) | 234 | if (n != NULL) |
235 | { | 235 | { |
236 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); | 236 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); |
237 | if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) | 237 | if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))) |
238 | { | 238 | { |
239 | GNUNET_break (0); | 239 | GNUNET_break (0); |
240 | failed = GNUNET_YES; | 240 | failed = GNUNET_YES; |
@@ -267,7 +267,7 @@ name_lookup_initial_proc (void *cls, | |||
267 | failed = GNUNET_YES; | 267 | failed = GNUNET_YES; |
268 | } | 268 | } |
269 | 269 | ||
270 | if (0 != memcmp (s_signature, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 270 | if (0 != memcmp (s_signature, signature, sizeof (struct GNUNET_CRYPTO_EccSignature))) |
271 | { | 271 | { |
272 | GNUNET_break (0); | 272 | GNUNET_break (0); |
273 | failed = GNUNET_YES; | 273 | failed = GNUNET_YES; |
@@ -357,10 +357,10 @@ run (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_rsa_key_create_from_file(hostkey_file); | 360 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
361 | GNUNET_free (hostkey_file); | 361 | GNUNET_free (hostkey_file); |
362 | /* get public key */ | 362 | /* get public key */ |
363 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 363 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
364 | 364 | ||
365 | /* create record */ | 365 | /* create record */ |
366 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); | 366 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); |
@@ -373,7 +373,7 @@ run (void *cls, | |||
373 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_first_record, 1); | 373 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_first_record, 1); |
374 | 374 | ||
375 | /* create random zone hash */ | 375 | /* create random zone hash */ |
376 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); | 376 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); |
377 | 377 | ||
378 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_short_h2s (&s_zone)); | 378 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_short_h2s (&s_zone)); |
379 | nsh = GNUNET_NAMESTORE_connect (cfg); | 379 | nsh = GNUNET_NAMESTORE_connect (cfg); |
diff --git a/src/namestore/test_namestore_api_create_update.c b/src/namestore/test_namestore_api_create_update.c index 2a5c45e75..5df7c4934 100644 --- a/src/namestore/test_namestore_api_create_update.c +++ b/src/namestore/test_namestore_api_create_update.c | |||
@@ -50,11 +50,11 @@ static struct GNUNET_NAMESTORE_Handle * nsh; | |||
50 | 50 | ||
51 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 51 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
52 | 52 | ||
53 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 53 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
54 | 54 | ||
55 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 55 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
56 | 56 | ||
57 | static struct GNUNET_CRYPTO_RsaSignature *s_signature; | 57 | static struct GNUNET_CRYPTO_EccSignature *s_signature; |
58 | 58 | ||
59 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; | 59 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; |
60 | 60 | ||
@@ -80,7 +80,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
80 | GNUNET_NAMESTORE_disconnect (nsh); | 80 | GNUNET_NAMESTORE_disconnect (nsh); |
81 | nsh = NULL; | 81 | nsh = NULL; |
82 | if (privkey != NULL) | 82 | if (privkey != NULL) |
83 | GNUNET_CRYPTO_rsa_key_free (privkey); | 83 | GNUNET_CRYPTO_ecc_key_free (privkey); |
84 | privkey = NULL; | 84 | privkey = NULL; |
85 | GNUNET_free_non_null (s_name); | 85 | GNUNET_free_non_null (s_name); |
86 | res = 1; | 86 | res = 1; |
@@ -99,7 +99,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
99 | GNUNET_free (s_first_record); | 99 | GNUNET_free (s_first_record); |
100 | GNUNET_free_non_null (s_second_record); | 100 | GNUNET_free_non_null (s_second_record); |
101 | if (privkey != NULL) | 101 | if (privkey != NULL) |
102 | GNUNET_CRYPTO_rsa_key_free (privkey); | 102 | GNUNET_CRYPTO_ecc_key_free (privkey); |
103 | privkey = NULL; | 103 | privkey = NULL; |
104 | if (nsh != NULL) | 104 | if (nsh != NULL) |
105 | GNUNET_NAMESTORE_disconnect (nsh); | 105 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -208,11 +208,11 @@ run (void *cls, | |||
208 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 208 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
209 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 209 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
210 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 210 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
211 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 211 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
212 | GNUNET_free (hostkey_file); | 212 | GNUNET_free (hostkey_file); |
213 | GNUNET_assert (privkey != NULL); | 213 | GNUNET_assert (privkey != NULL); |
214 | /* get public key */ | 214 | /* get public key */ |
215 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 215 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
216 | 216 | ||
217 | /* create record */ | 217 | /* create record */ |
218 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); | 218 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); |
@@ -226,7 +226,7 @@ run (void *cls, | |||
226 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_first_record, 1); | 226 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_first_record, 1); |
227 | 227 | ||
228 | /* create random zone hash */ | 228 | /* create random zone hash */ |
229 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); | 229 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); |
230 | 230 | ||
231 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_short_h2s (&s_zone)); | 231 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_short_h2s (&s_zone)); |
232 | nsh = GNUNET_NAMESTORE_connect (cfg); | 232 | nsh = GNUNET_NAMESTORE_connect (cfg); |
diff --git a/src/namestore/test_namestore_api_lookup.c b/src/namestore/test_namestore_api_lookup.c index 7d2f86e86..fdd229b23 100644 --- a/src/namestore/test_namestore_api_lookup.c +++ b/src/namestore/test_namestore_api_lookup.c | |||
@@ -43,11 +43,11 @@ static struct GNUNET_NAMESTORE_Handle * nsh; | |||
43 | 43 | ||
44 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 44 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
45 | 45 | ||
46 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 46 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
47 | 47 | ||
48 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 48 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
49 | 49 | ||
50 | static struct GNUNET_CRYPTO_RsaSignature *s_signature; | 50 | static struct GNUNET_CRYPTO_EccSignature *s_signature; |
51 | 51 | ||
52 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; | 52 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; |
53 | 53 | ||
@@ -70,7 +70,7 @@ cleanup () | |||
70 | } | 70 | } |
71 | if (NULL != privkey) | 71 | if (NULL != privkey) |
72 | { | 72 | { |
73 | GNUNET_CRYPTO_rsa_key_free (privkey); | 73 | GNUNET_CRYPTO_ecc_key_free (privkey); |
74 | privkey = NULL; | 74 | privkey = NULL; |
75 | } | 75 | } |
76 | GNUNET_SCHEDULER_shutdown (); | 76 | GNUNET_SCHEDULER_shutdown (); |
@@ -105,12 +105,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
105 | 105 | ||
106 | static void | 106 | static void |
107 | name_lookup_proc (void *cls, | 107 | name_lookup_proc (void *cls, |
108 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 108 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
109 | struct GNUNET_TIME_Absolute expire, | 109 | struct GNUNET_TIME_Absolute expire, |
110 | const char *n, | 110 | const char *n, |
111 | unsigned int rd_count, | 111 | unsigned int rd_count, |
112 | const struct GNUNET_NAMESTORE_RecordData *rd, | 112 | const struct GNUNET_NAMESTORE_RecordData *rd, |
113 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 113 | const struct GNUNET_CRYPTO_EccSignature *signature) |
114 | { | 114 | { |
115 | static int found = GNUNET_NO; | 115 | static int found = GNUNET_NO; |
116 | int c; | 116 | int c; |
@@ -119,13 +119,13 @@ name_lookup_proc (void *cls, | |||
119 | { | 119 | { |
120 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); | 120 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking returned results\n"); |
121 | if (0 != memcmp (zone_key, &pubkey, | 121 | if (0 != memcmp (zone_key, &pubkey, |
122 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) | 122 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))) |
123 | { | 123 | { |
124 | GNUNET_break (0); | 124 | GNUNET_break (0); |
125 | } | 125 | } |
126 | GNUNET_assert (NULL != signature); | 126 | GNUNET_assert (NULL != signature); |
127 | if (0 != memcmp (signature, s_signature, | 127 | if (0 != memcmp (signature, s_signature, |
128 | sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 128 | sizeof (struct GNUNET_CRYPTO_EccSignature))) |
129 | { | 129 | { |
130 | GNUNET_break (0); | 130 | GNUNET_break (0); |
131 | } | 131 | } |
@@ -222,10 +222,10 @@ run (void *cls, | |||
222 | &endbadly, NULL); | 222 | &endbadly, NULL); |
223 | 223 | ||
224 | /* load privat key from file not included in zonekey dir */ | 224 | /* load privat key from file not included in zonekey dir */ |
225 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file("test_hostkey"); | 225 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file("test_hostkey"); |
226 | GNUNET_assert (NULL != privkey); | 226 | GNUNET_assert (NULL != privkey); |
227 | /* get public key */ | 227 | /* get public key */ |
228 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 228 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
229 | 229 | ||
230 | /* create record */ | 230 | /* create record */ |
231 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); | 231 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); |
@@ -243,7 +243,7 @@ run (void *cls, | |||
243 | 243 | ||
244 | /* create random zone hash */ | 244 | /* create random zone hash */ |
245 | GNUNET_CRYPTO_short_hash (&pubkey, | 245 | GNUNET_CRYPTO_short_hash (&pubkey, |
246 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 246 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
247 | &s_zone); | 247 | &s_zone); |
248 | nsh = GNUNET_NAMESTORE_connect (cfg); | 248 | nsh = GNUNET_NAMESTORE_connect (cfg); |
249 | GNUNET_break (NULL != nsh); | 249 | GNUNET_break (NULL != nsh); |
diff --git a/src/namestore/test_namestore_api_lookup_specific_type.c b/src/namestore/test_namestore_api_lookup_specific_type.c index 4d2aa1cfe..49988ed3f 100644 --- a/src/namestore/test_namestore_api_lookup_specific_type.c +++ b/src/namestore/test_namestore_api_lookup_specific_type.c | |||
@@ -48,11 +48,11 @@ static struct GNUNET_NAMESTORE_Handle * nsh; | |||
48 | 48 | ||
49 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 49 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
50 | 50 | ||
51 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 51 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
52 | 52 | ||
53 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 53 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
54 | 54 | ||
55 | static struct GNUNET_CRYPTO_RsaSignature *s_signature; | 55 | static struct GNUNET_CRYPTO_EccSignature *s_signature; |
56 | 56 | ||
57 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; | 57 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; |
58 | 58 | ||
@@ -76,7 +76,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
76 | GNUNET_NAMESTORE_disconnect (nsh); | 76 | GNUNET_NAMESTORE_disconnect (nsh); |
77 | nsh = NULL; | 77 | nsh = NULL; |
78 | if (privkey != NULL) | 78 | if (privkey != NULL) |
79 | GNUNET_CRYPTO_rsa_key_free (privkey); | 79 | GNUNET_CRYPTO_ecc_key_free (privkey); |
80 | privkey = NULL; | 80 | privkey = NULL; |
81 | GNUNET_free_non_null (s_name); | 81 | GNUNET_free_non_null (s_name); |
82 | res = 1; | 82 | res = 1; |
@@ -100,7 +100,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
100 | GNUNET_free (s_rd); | 100 | GNUNET_free (s_rd); |
101 | GNUNET_free_non_null (s_name); | 101 | GNUNET_free_non_null (s_name); |
102 | if (privkey != NULL) | 102 | if (privkey != NULL) |
103 | GNUNET_CRYPTO_rsa_key_free (privkey); | 103 | GNUNET_CRYPTO_ecc_key_free (privkey); |
104 | privkey = NULL; | 104 | privkey = NULL; |
105 | if (nsh != NULL) | 105 | if (nsh != NULL) |
106 | GNUNET_NAMESTORE_disconnect (nsh); | 106 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -110,18 +110,18 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
110 | 110 | ||
111 | static void | 111 | static void |
112 | name_lookup_existing_record_type (void *cls, | 112 | name_lookup_existing_record_type (void *cls, |
113 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 113 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
114 | struct GNUNET_TIME_Absolute expire, | 114 | struct GNUNET_TIME_Absolute expire, |
115 | const char *n, | 115 | const char *n, |
116 | unsigned int rd_count, | 116 | unsigned int rd_count, |
117 | const struct GNUNET_NAMESTORE_RecordData *rd, | 117 | const struct GNUNET_NAMESTORE_RecordData *rd, |
118 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 118 | const struct GNUNET_CRYPTO_EccSignature *signature) |
119 | { | 119 | { |
120 | int failed = GNUNET_NO; | 120 | int failed = GNUNET_NO; |
121 | 121 | ||
122 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore returned %u records\n", rd_count); | 122 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore returned %u records\n", rd_count); |
123 | 123 | ||
124 | if ((NULL == n) || (0 != memcmp(zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)))) | 124 | if ((NULL == n) || (0 != memcmp(zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)))) |
125 | { | 125 | { |
126 | GNUNET_break(0); | 126 | GNUNET_break(0); |
127 | failed = GNUNET_YES; | 127 | failed = GNUNET_YES; |
@@ -156,12 +156,12 @@ name_lookup_existing_record_type (void *cls, | |||
156 | 156 | ||
157 | static void | 157 | static void |
158 | name_lookup_non_existing_record_type (void *cls, | 158 | name_lookup_non_existing_record_type (void *cls, |
159 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 159 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
160 | struct GNUNET_TIME_Absolute expire, | 160 | struct GNUNET_TIME_Absolute expire, |
161 | const char *n, | 161 | const char *n, |
162 | unsigned int rd_count, | 162 | unsigned int rd_count, |
163 | const struct GNUNET_NAMESTORE_RecordData *rd, | 163 | const struct GNUNET_NAMESTORE_RecordData *rd, |
164 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 164 | const struct GNUNET_CRYPTO_EccSignature *signature) |
165 | { | 165 | { |
166 | int failed = GNUNET_NO; | 166 | int failed = GNUNET_NO; |
167 | /* We expect zone key != NULL, name != NULL, rd_count 0, rd NULL, signature NULL */ | 167 | /* We expect zone key != NULL, name != NULL, rd_count 0, rd NULL, signature NULL */ |
@@ -280,11 +280,11 @@ run (void *cls, | |||
280 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 280 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
281 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 281 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
282 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 282 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
283 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 283 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
284 | GNUNET_free (hostkey_file); | 284 | GNUNET_free (hostkey_file); |
285 | GNUNET_assert (privkey != NULL); | 285 | GNUNET_assert (privkey != NULL); |
286 | /* get public key */ | 286 | /* get public key */ |
287 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 287 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
288 | 288 | ||
289 | /* create record */ | 289 | /* create record */ |
290 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); | 290 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); |
@@ -300,7 +300,7 @@ run (void *cls, | |||
300 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); | 300 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); |
301 | 301 | ||
302 | /* create random zone hash */ | 302 | /* create random zone hash */ |
303 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); | 303 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); |
304 | nsh = GNUNET_NAMESTORE_connect (cfg); | 304 | nsh = GNUNET_NAMESTORE_connect (cfg); |
305 | GNUNET_break (NULL != nsh); | 305 | GNUNET_break (NULL != nsh); |
306 | GNUNET_break (s_rd != NULL); | 306 | GNUNET_break (s_rd != NULL); |
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c index e4bc5e4bb..df5cb336e 100644 --- a/src/namestore/test_namestore_api_put.c +++ b/src/namestore/test_namestore_api_put.c | |||
@@ -42,9 +42,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh; | |||
42 | 42 | ||
43 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 43 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
44 | 44 | ||
45 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 45 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
46 | 46 | ||
47 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 47 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
48 | 48 | ||
49 | static struct GNUNET_NAMESTORE_RecordData *s_rd; | 49 | static struct GNUNET_NAMESTORE_RecordData *s_rd; |
50 | 50 | ||
@@ -66,7 +66,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
66 | 66 | ||
67 | if (privkey != NULL) | 67 | if (privkey != NULL) |
68 | { | 68 | { |
69 | GNUNET_CRYPTO_rsa_key_free (privkey); | 69 | GNUNET_CRYPTO_ecc_key_free (privkey); |
70 | privkey = NULL; | 70 | privkey = NULL; |
71 | } | 71 | } |
72 | GNUNET_SCHEDULER_shutdown (); | 72 | GNUNET_SCHEDULER_shutdown (); |
@@ -85,7 +85,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
85 | 85 | ||
86 | if (privkey != NULL) | 86 | if (privkey != NULL) |
87 | { | 87 | { |
88 | GNUNET_CRYPTO_rsa_key_free (privkey); | 88 | GNUNET_CRYPTO_ecc_key_free (privkey); |
89 | privkey = NULL; | 89 | privkey = NULL; |
90 | } | 90 | } |
91 | if (nsh != NULL) | 91 | if (nsh != NULL) |
@@ -136,7 +136,7 @@ run (void *cls, | |||
136 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 136 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
137 | struct GNUNET_TESTING_Peer *peer) | 137 | struct GNUNET_TESTING_Peer *peer) |
138 | { | 138 | { |
139 | struct GNUNET_CRYPTO_RsaSignature *signature; | 139 | struct GNUNET_CRYPTO_EccSignature *signature; |
140 | char * s_name; | 140 | char * s_name; |
141 | int c; | 141 | int c; |
142 | char *hostkey_file; | 142 | char *hostkey_file; |
@@ -147,11 +147,11 @@ run (void *cls, | |||
147 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 147 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
148 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 148 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
149 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 149 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
150 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 150 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
151 | GNUNET_assert (privkey != NULL); | 151 | GNUNET_assert (privkey != NULL); |
152 | GNUNET_free (hostkey_file); | 152 | GNUNET_free (hostkey_file); |
153 | /* get public key */ | 153 | /* get public key */ |
154 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 154 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
155 | nsh = GNUNET_NAMESTORE_connect (cfg); | 155 | nsh = GNUNET_NAMESTORE_connect (cfg); |
156 | GNUNET_break (NULL != nsh); | 156 | GNUNET_break (NULL != nsh); |
157 | /* create record */ | 157 | /* create record */ |
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index 8583e69c9..265a93b81 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -49,11 +49,11 @@ static struct GNUNET_NAMESTORE_Handle * nsh; | |||
49 | 49 | ||
50 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 50 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
51 | 51 | ||
52 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 52 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
53 | 53 | ||
54 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 54 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
55 | 55 | ||
56 | static struct GNUNET_CRYPTO_RsaSignature *s_signature; | 56 | static struct GNUNET_CRYPTO_EccSignature *s_signature; |
57 | 57 | ||
58 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; | 58 | static struct GNUNET_CRYPTO_ShortHashCode s_zone; |
59 | 59 | ||
@@ -77,7 +77,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
77 | GNUNET_NAMESTORE_disconnect (nsh); | 77 | GNUNET_NAMESTORE_disconnect (nsh); |
78 | nsh = NULL; | 78 | nsh = NULL; |
79 | if (privkey != NULL) | 79 | if (privkey != NULL) |
80 | GNUNET_CRYPTO_rsa_key_free (privkey); | 80 | GNUNET_CRYPTO_ecc_key_free (privkey); |
81 | privkey = NULL; | 81 | privkey = NULL; |
82 | GNUNET_free_non_null (s_name); | 82 | GNUNET_free_non_null (s_name); |
83 | res = 1; | 83 | res = 1; |
@@ -98,7 +98,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
98 | GNUNET_free_non_null((void *) s_rd[c].data); | 98 | GNUNET_free_non_null((void *) s_rd[c].data); |
99 | GNUNET_free (s_rd); | 99 | GNUNET_free (s_rd); |
100 | if (privkey != NULL) | 100 | if (privkey != NULL) |
101 | GNUNET_CRYPTO_rsa_key_free (privkey); | 101 | GNUNET_CRYPTO_ecc_key_free (privkey); |
102 | privkey = NULL; | 102 | privkey = NULL; |
103 | if (nsh != NULL) | 103 | if (nsh != NULL) |
104 | GNUNET_NAMESTORE_disconnect (nsh); | 104 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -109,12 +109,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
109 | 109 | ||
110 | static void | 110 | static void |
111 | name_lookup_proc (void *cls, | 111 | name_lookup_proc (void *cls, |
112 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 112 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
113 | struct GNUNET_TIME_Absolute expire, | 113 | struct GNUNET_TIME_Absolute expire, |
114 | const char *n, | 114 | const char *n, |
115 | unsigned int rd_count, | 115 | unsigned int rd_count, |
116 | const struct GNUNET_NAMESTORE_RecordData *rd, | 116 | const struct GNUNET_NAMESTORE_RecordData *rd, |
117 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 117 | const struct GNUNET_CRYPTO_EccSignature *signature) |
118 | { | 118 | { |
119 | static int found = GNUNET_NO; | 119 | static int found = GNUNET_NO; |
120 | int failed = GNUNET_NO; | 120 | int failed = GNUNET_NO; |
@@ -123,7 +123,7 @@ name_lookup_proc (void *cls, | |||
123 | if (n != NULL) | 123 | if (n != NULL) |
124 | { | 124 | { |
125 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Lookup for name `%s' returned %u records\n", n, rd_count); | 125 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Lookup for name `%s' returned %u records\n", n, rd_count); |
126 | if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))) | 126 | if (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))) |
127 | { | 127 | { |
128 | GNUNET_break (0); | 128 | GNUNET_break (0); |
129 | failed = GNUNET_YES; | 129 | failed = GNUNET_YES; |
@@ -254,11 +254,11 @@ run (void *cls, | |||
254 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 254 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
255 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 255 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
256 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 256 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
257 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 257 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
258 | GNUNET_free (hostkey_file); | 258 | GNUNET_free (hostkey_file); |
259 | GNUNET_assert (privkey != NULL); | 259 | GNUNET_assert (privkey != NULL); |
260 | /* get public key */ | 260 | /* get public key */ |
261 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 261 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
262 | 262 | ||
263 | /* create record */ | 263 | /* create record */ |
264 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); | 264 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); |
@@ -273,7 +273,7 @@ run (void *cls, | |||
273 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); | 273 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); |
274 | 274 | ||
275 | /* create random zone hash */ | 275 | /* create random zone hash */ |
276 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); | 276 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); |
277 | 277 | ||
278 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_short_h2s (&s_zone)); | 278 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_short_h2s (&s_zone)); |
279 | nsh = GNUNET_NAMESTORE_connect (cfg); | 279 | nsh = GNUNET_NAMESTORE_connect (cfg); |
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c index 973cf94e4..16586240a 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c | |||
@@ -49,11 +49,11 @@ static struct GNUNET_NAMESTORE_Handle * nsh; | |||
49 | 49 | ||
50 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 50 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
51 | 51 | ||
52 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 52 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
53 | 53 | ||
54 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 54 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
55 | 55 | ||
56 | static struct GNUNET_CRYPTO_RsaSignature *s_signature; | 56 | static struct GNUNET_CRYPTO_EccSignature *s_signature; |
57 | 57 | ||
58 | static struct GNUNET_HashCode s_zone; | 58 | static struct GNUNET_HashCode s_zone; |
59 | 59 | ||
@@ -77,7 +77,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
77 | GNUNET_NAMESTORE_disconnect (nsh); | 77 | GNUNET_NAMESTORE_disconnect (nsh); |
78 | nsh = NULL; | 78 | nsh = NULL; |
79 | if (privkey != NULL) | 79 | if (privkey != NULL) |
80 | GNUNET_CRYPTO_rsa_key_free (privkey); | 80 | GNUNET_CRYPTO_ecc_key_free (privkey); |
81 | privkey = NULL; | 81 | privkey = NULL; |
82 | GNUNET_free_non_null (s_name); | 82 | GNUNET_free_non_null (s_name); |
83 | res = 1; | 83 | res = 1; |
@@ -99,7 +99,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
99 | GNUNET_free (s_rd); | 99 | GNUNET_free (s_rd); |
100 | 100 | ||
101 | if (privkey != NULL) | 101 | if (privkey != NULL) |
102 | GNUNET_CRYPTO_rsa_key_free (privkey); | 102 | GNUNET_CRYPTO_ecc_key_free (privkey); |
103 | privkey = NULL; | 103 | privkey = NULL; |
104 | if (nsh != NULL) | 104 | if (nsh != NULL) |
105 | GNUNET_NAMESTORE_disconnect (nsh); | 105 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -190,11 +190,11 @@ run (void *cls, | |||
190 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 190 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
191 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 191 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
192 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 192 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
193 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 193 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
194 | GNUNET_free (hostkey_file); | 194 | GNUNET_free (hostkey_file); |
195 | GNUNET_assert (privkey != NULL); | 195 | GNUNET_assert (privkey != NULL); |
196 | /* get public key */ | 196 | /* get public key */ |
197 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 197 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
198 | 198 | ||
199 | /* create record */ | 199 | /* create record */ |
200 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); | 200 | s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet"); |
@@ -209,7 +209,7 @@ run (void *cls, | |||
209 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); | 209 | s_signature = GNUNET_NAMESTORE_create_signature(privkey, et, s_name, s_rd, RECORDS); |
210 | 210 | ||
211 | /* create random zone hash */ | 211 | /* create random zone hash */ |
212 | GNUNET_CRYPTO_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); | 212 | GNUNET_CRYPTO_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); |
213 | 213 | ||
214 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_h2s_full(&s_zone)); | 214 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Name: `%s' Zone: `%s' \n", s_name, GNUNET_h2s_full(&s_zone)); |
215 | nsh = GNUNET_NAMESTORE_connect (cfg); | 215 | nsh = GNUNET_NAMESTORE_connect (cfg); |
diff --git a/src/namestore/test_namestore_api_sign_verify.c b/src/namestore/test_namestore_api_sign_verify.c index 10be25bb4..647cc59be 100644 --- a/src/namestore/test_namestore_api_sign_verify.c +++ b/src/namestore/test_namestore_api_sign_verify.c | |||
@@ -42,9 +42,9 @@ | |||
42 | #define TEST_REMOVE_RECORD_DATA 'b' | 42 | #define TEST_REMOVE_RECORD_DATA 'b' |
43 | 43 | ||
44 | 44 | ||
45 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 45 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
46 | 46 | ||
47 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 47 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
48 | 48 | ||
49 | static struct GNUNET_NAMESTORE_RecordData *s_rd; | 49 | static struct GNUNET_NAMESTORE_RecordData *s_rd; |
50 | 50 | ||
@@ -76,19 +76,19 @@ static void | |||
76 | run (void *cls, char *const *args, const char *cfgfile, | 76 | run (void *cls, char *const *args, const char *cfgfile, |
77 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 77 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
78 | { | 78 | { |
79 | struct GNUNET_CRYPTO_RsaSignature * signature; | 79 | struct GNUNET_CRYPTO_EccSignature * signature; |
80 | 80 | ||
81 | /* load privat key */ | 81 | /* load privat key */ |
82 | char *hostkey_file; | 82 | char *hostkey_file; |
83 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 83 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
84 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 84 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
85 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 85 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
86 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 86 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
87 | GNUNET_free (hostkey_file); | 87 | GNUNET_free (hostkey_file); |
88 | GNUNET_assert (privkey != NULL); | 88 | GNUNET_assert (privkey != NULL); |
89 | struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get(); | 89 | struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get(); |
90 | /* get public key */ | 90 | /* get public key */ |
91 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 91 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
92 | 92 | ||
93 | int res_c; | 93 | int res_c; |
94 | int res_w; | 94 | int res_w; |
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index e61fb67d4..48ac35f71 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c | |||
@@ -37,15 +37,15 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | |||
37 | 37 | ||
38 | static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task; | 38 | static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task; |
39 | 39 | ||
40 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 40 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 42 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
43 | 43 | ||
44 | static struct GNUNET_HashCode zone; | 44 | static struct GNUNET_HashCode zone; |
45 | 45 | ||
46 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; | 46 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; |
47 | 47 | ||
48 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; | 48 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey2; |
49 | 49 | ||
50 | static struct GNUNET_HashCode zone2; | 50 | static struct GNUNET_HashCode zone2; |
51 | 51 | ||
@@ -55,19 +55,19 @@ static int res; | |||
55 | 55 | ||
56 | static int returned_records; | 56 | static int returned_records; |
57 | 57 | ||
58 | static struct GNUNET_CRYPTO_RsaSignature *sig_1; | 58 | static struct GNUNET_CRYPTO_EccSignature *sig_1; |
59 | 59 | ||
60 | static char * s_name_1; | 60 | static char * s_name_1; |
61 | 61 | ||
62 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; | 62 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; |
63 | 63 | ||
64 | static struct GNUNET_CRYPTO_RsaSignature *sig_2; | 64 | static struct GNUNET_CRYPTO_EccSignature *sig_2; |
65 | 65 | ||
66 | static char * s_name_2; | 66 | static char * s_name_2; |
67 | 67 | ||
68 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 68 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; |
69 | 69 | ||
70 | static struct GNUNET_CRYPTO_RsaSignature *sig_3; | 70 | static struct GNUNET_CRYPTO_EccSignature *sig_3; |
71 | 71 | ||
72 | static char * s_name_3; | 72 | static char * s_name_3; |
73 | 73 | ||
@@ -117,11 +117,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
117 | } | 117 | } |
118 | 118 | ||
119 | if (privkey != NULL) | 119 | if (privkey != NULL) |
120 | GNUNET_CRYPTO_rsa_key_free (privkey); | 120 | GNUNET_CRYPTO_ecc_key_free (privkey); |
121 | privkey = NULL; | 121 | privkey = NULL; |
122 | 122 | ||
123 | if (privkey2 != NULL) | 123 | if (privkey2 != NULL) |
124 | GNUNET_CRYPTO_rsa_key_free (privkey2); | 124 | GNUNET_CRYPTO_ecc_key_free (privkey2); |
125 | privkey2 = NULL; | 125 | privkey2 = NULL; |
126 | res = 1; | 126 | res = 1; |
127 | } | 127 | } |
@@ -143,11 +143,11 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
143 | } | 143 | } |
144 | 144 | ||
145 | if (privkey != NULL) | 145 | if (privkey != NULL) |
146 | GNUNET_CRYPTO_rsa_key_free (privkey); | 146 | GNUNET_CRYPTO_ecc_key_free (privkey); |
147 | privkey = NULL; | 147 | privkey = NULL; |
148 | 148 | ||
149 | if (privkey2 != NULL) | 149 | if (privkey2 != NULL) |
150 | GNUNET_CRYPTO_rsa_key_free (privkey2); | 150 | GNUNET_CRYPTO_ecc_key_free (privkey2); |
151 | privkey2 = NULL; | 151 | privkey2 = NULL; |
152 | 152 | ||
153 | GNUNET_free (sig_1); | 153 | GNUNET_free (sig_1); |
@@ -179,12 +179,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
179 | 179 | ||
180 | static void | 180 | static void |
181 | zone_proc (void *cls, | 181 | zone_proc (void *cls, |
182 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 182 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
183 | struct GNUNET_TIME_Absolute expire, | 183 | struct GNUNET_TIME_Absolute expire, |
184 | const char *name, | 184 | const char *name, |
185 | unsigned int rd_count, | 185 | unsigned int rd_count, |
186 | const struct GNUNET_NAMESTORE_RecordData *rd, | 186 | const struct GNUNET_NAMESTORE_RecordData *rd, |
187 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 187 | const struct GNUNET_CRYPTO_EccSignature *signature) |
188 | { | 188 | { |
189 | int failed = GNUNET_NO; | 189 | int failed = GNUNET_NO; |
190 | if ((zone_key == NULL) && (name == NULL)) | 190 | if ((zone_key == NULL) && (name == NULL)) |
@@ -204,7 +204,7 @@ zone_proc (void *cls, | |||
204 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature)) | 204 | if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature)) |
205 | { | 205 | { |
206 | struct GNUNET_HashCode zone_key_hash; | 206 | struct GNUNET_HashCode zone_key_hash; |
207 | GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone_key_hash); | 207 | GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &zone_key_hash); |
208 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value); | 208 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value); |
209 | 209 | ||
210 | failed = GNUNET_YES; | 210 | failed = GNUNET_YES; |
@@ -227,7 +227,7 @@ zone_proc (void *cls, | |||
227 | failed = GNUNET_YES; | 227 | failed = GNUNET_YES; |
228 | GNUNET_break (0); | 228 | GNUNET_break (0); |
229 | } | 229 | } |
230 | if (0 != memcmp (signature, sig_1, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 230 | if (0 != memcmp (signature, sig_1, sizeof (struct GNUNET_CRYPTO_EccSignature))) |
231 | { | 231 | { |
232 | failed = GNUNET_YES; | 232 | failed = GNUNET_YES; |
233 | GNUNET_break (0); | 233 | GNUNET_break (0); |
@@ -248,7 +248,7 @@ zone_proc (void *cls, | |||
248 | failed = GNUNET_YES; | 248 | failed = GNUNET_YES; |
249 | GNUNET_break (0); | 249 | GNUNET_break (0); |
250 | } | 250 | } |
251 | if (0 != memcmp (signature, sig_2, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 251 | if (0 != memcmp (signature, sig_2, sizeof (struct GNUNET_CRYPTO_EccSignature))) |
252 | { | 252 | { |
253 | failed = GNUNET_YES; | 253 | failed = GNUNET_YES; |
254 | GNUNET_break (0); | 254 | GNUNET_break (0); |
@@ -275,7 +275,7 @@ zone_proc (void *cls, | |||
275 | GNUNET_break (0); | 275 | GNUNET_break (0); |
276 | } | 276 | } |
277 | 277 | ||
278 | if (0 != memcmp (signature, sig_3, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 278 | if (0 != memcmp (signature, sig_3, sizeof (struct GNUNET_CRYPTO_EccSignature))) |
279 | { | 279 | { |
280 | failed = GNUNET_YES; | 280 | failed = GNUNET_YES; |
281 | GNUNET_break (0); | 281 | GNUNET_break (0); |
@@ -370,12 +370,12 @@ create_record (unsigned int count) | |||
370 | */ | 370 | */ |
371 | static void | 371 | static void |
372 | empty_zone_proc (void *cls, | 372 | empty_zone_proc (void *cls, |
373 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 373 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
374 | struct GNUNET_TIME_Absolute expire, | 374 | struct GNUNET_TIME_Absolute expire, |
375 | const char *name, | 375 | const char *name, |
376 | unsigned int rd_count, | 376 | unsigned int rd_count, |
377 | const struct GNUNET_NAMESTORE_RecordData *rd, | 377 | const struct GNUNET_NAMESTORE_RecordData *rd, |
378 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 378 | const struct GNUNET_CRYPTO_EccSignature *signature) |
379 | { | 379 | { |
380 | char *hostkey_file; | 380 | char *hostkey_file; |
381 | struct GNUNET_TIME_Absolute et; | 381 | struct GNUNET_TIME_Absolute et; |
@@ -387,21 +387,21 @@ empty_zone_proc (void *cls, | |||
387 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 387 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
388 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 388 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
389 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 389 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
390 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 390 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
391 | GNUNET_free (hostkey_file); | 391 | GNUNET_free (hostkey_file); |
392 | GNUNET_assert (privkey != NULL); | 392 | GNUNET_assert (privkey != NULL); |
393 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 393 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
394 | GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone); | 394 | GNUNET_CRYPTO_hash(&pubkey, sizeof (pubkey), &zone); |
395 | 395 | ||
396 | 396 | ||
397 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 397 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
398 | "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); | 398 | "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); |
399 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 399 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
400 | privkey2 = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 400 | privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
401 | GNUNET_free (hostkey_file); | 401 | GNUNET_free (hostkey_file); |
402 | 402 | ||
403 | GNUNET_assert (privkey2 != NULL); | 403 | GNUNET_assert (privkey2 != NULL); |
404 | GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2); | 404 | GNUNET_CRYPTO_ecc_key_get_public(privkey2, &pubkey2); |
405 | GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2); | 405 | GNUNET_CRYPTO_hash(&pubkey2, sizeof (pubkey), &zone2); |
406 | 406 | ||
407 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 1\n"); | 407 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 1\n"); |
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 7adf3fe2a..53457cdaa 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -37,15 +37,15 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | |||
37 | 37 | ||
38 | static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task; | 38 | static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task; |
39 | 39 | ||
40 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 40 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 42 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_ShortHashCode zone; | 44 | static struct GNUNET_CRYPTO_ShortHashCode zone; |
45 | 45 | ||
46 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; | 46 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; |
47 | 47 | ||
48 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; | 48 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey2; |
49 | 49 | ||
50 | static struct GNUNET_CRYPTO_ShortHashCode zone2; | 50 | static struct GNUNET_CRYPTO_ShortHashCode zone2; |
51 | 51 | ||
@@ -55,19 +55,19 @@ static int res; | |||
55 | 55 | ||
56 | static int returned_records; | 56 | static int returned_records; |
57 | 57 | ||
58 | static struct GNUNET_CRYPTO_RsaSignature *sig_1; | 58 | static struct GNUNET_CRYPTO_EccSignature *sig_1; |
59 | 59 | ||
60 | static char * s_name_1; | 60 | static char * s_name_1; |
61 | 61 | ||
62 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; | 62 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; |
63 | 63 | ||
64 | static struct GNUNET_CRYPTO_RsaSignature *sig_2; | 64 | static struct GNUNET_CRYPTO_EccSignature *sig_2; |
65 | 65 | ||
66 | static char * s_name_2; | 66 | static char * s_name_2; |
67 | 67 | ||
68 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 68 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; |
69 | 69 | ||
70 | static struct GNUNET_CRYPTO_RsaSignature *sig_3; | 70 | static struct GNUNET_CRYPTO_EccSignature *sig_3; |
71 | 71 | ||
72 | static char * s_name_3; | 72 | static char * s_name_3; |
73 | 73 | ||
@@ -115,11 +115,11 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | if (privkey != NULL) | 117 | if (privkey != NULL) |
118 | GNUNET_CRYPTO_rsa_key_free (privkey); | 118 | GNUNET_CRYPTO_ecc_key_free (privkey); |
119 | privkey = NULL; | 119 | privkey = NULL; |
120 | 120 | ||
121 | if (privkey2 != NULL) | 121 | if (privkey2 != NULL) |
122 | GNUNET_CRYPTO_rsa_key_free (privkey2); | 122 | GNUNET_CRYPTO_ecc_key_free (privkey2); |
123 | privkey2 = NULL; | 123 | privkey2 = NULL; |
124 | res = 1; | 124 | res = 1; |
125 | } | 125 | } |
@@ -139,10 +139,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
139 | endbadly_task = GNUNET_SCHEDULER_NO_TASK; | 139 | endbadly_task = GNUNET_SCHEDULER_NO_TASK; |
140 | } | 140 | } |
141 | if (privkey != NULL) | 141 | if (privkey != NULL) |
142 | GNUNET_CRYPTO_rsa_key_free (privkey); | 142 | GNUNET_CRYPTO_ecc_key_free (privkey); |
143 | privkey = NULL; | 143 | privkey = NULL; |
144 | if (privkey2 != NULL) | 144 | if (privkey2 != NULL) |
145 | GNUNET_CRYPTO_rsa_key_free (privkey2); | 145 | GNUNET_CRYPTO_ecc_key_free (privkey2); |
146 | privkey2 = NULL; | 146 | privkey2 = NULL; |
147 | 147 | ||
148 | GNUNET_free (sig_1); | 148 | GNUNET_free (sig_1); |
@@ -174,12 +174,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
174 | 174 | ||
175 | static void | 175 | static void |
176 | zone_proc (void *cls, | 176 | zone_proc (void *cls, |
177 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 177 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
178 | struct GNUNET_TIME_Absolute expire, | 178 | struct GNUNET_TIME_Absolute expire, |
179 | const char *name, | 179 | const char *name, |
180 | unsigned int rd_count, | 180 | unsigned int rd_count, |
181 | const struct GNUNET_NAMESTORE_RecordData *rd, | 181 | const struct GNUNET_NAMESTORE_RecordData *rd, |
182 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 182 | const struct GNUNET_CRYPTO_EccSignature *signature) |
183 | { | 183 | { |
184 | int failed = GNUNET_NO; | 184 | int failed = GNUNET_NO; |
185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Callback for zone `%s'\n", GNUNET_short_h2s (&zone)); | 185 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Callback for zone `%s'\n", GNUNET_short_h2s (&zone)); |
@@ -212,7 +212,7 @@ zone_proc (void *cls, | |||
212 | failed = GNUNET_YES; | 212 | failed = GNUNET_YES; |
213 | GNUNET_break (0); | 213 | GNUNET_break (0); |
214 | } | 214 | } |
215 | if (0 != memcmp (signature, sig_1, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 215 | if (0 != memcmp (signature, sig_1, sizeof (struct GNUNET_CRYPTO_EccSignature))) |
216 | { | 216 | { |
217 | failed = GNUNET_YES; | 217 | failed = GNUNET_YES; |
218 | GNUNET_break (0); | 218 | GNUNET_break (0); |
@@ -233,7 +233,7 @@ zone_proc (void *cls, | |||
233 | failed = GNUNET_YES; | 233 | failed = GNUNET_YES; |
234 | GNUNET_break (0); | 234 | GNUNET_break (0); |
235 | } | 235 | } |
236 | if (0 != memcmp (signature, sig_2, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 236 | if (0 != memcmp (signature, sig_2, sizeof (struct GNUNET_CRYPTO_EccSignature))) |
237 | { | 237 | { |
238 | failed = GNUNET_YES; | 238 | failed = GNUNET_YES; |
239 | GNUNET_break (0); | 239 | GNUNET_break (0); |
@@ -334,19 +334,19 @@ run (void *cls, | |||
334 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 334 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
335 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 335 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
336 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 336 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
337 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 337 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
338 | GNUNET_free (hostkey_file); | 338 | GNUNET_free (hostkey_file); |
339 | GNUNET_assert (privkey != NULL); | 339 | GNUNET_assert (privkey != NULL); |
340 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 340 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
341 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (pubkey), &zone); | 341 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (pubkey), &zone); |
342 | 342 | ||
343 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 343 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
344 | "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); | 344 | "HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey"); |
345 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 345 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
346 | privkey2 = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 346 | privkey2 = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
347 | GNUNET_free (hostkey_file); | 347 | GNUNET_free (hostkey_file); |
348 | GNUNET_assert (privkey2 != NULL); | 348 | GNUNET_assert (privkey2 != NULL); |
349 | GNUNET_CRYPTO_rsa_key_get_public(privkey2, &pubkey2); | 349 | GNUNET_CRYPTO_ecc_key_get_public(privkey2, &pubkey2); |
350 | GNUNET_CRYPTO_short_hash (&pubkey2, sizeof (pubkey), &zone2); | 350 | GNUNET_CRYPTO_short_hash (&pubkey2, sizeof (pubkey), &zone2); |
351 | nsh = GNUNET_NAMESTORE_connect (cfg); | 351 | nsh = GNUNET_NAMESTORE_connect (cfg); |
352 | GNUNET_break (NULL != nsh); | 352 | GNUNET_break (NULL != nsh); |
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 | ||
37 | static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task; | 37 | static GNUNET_SCHEDULER_TaskIdentifier stopiteration_task; |
38 | 38 | ||
39 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 39 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
40 | 40 | ||
41 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 41 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
42 | 42 | ||
43 | static struct GNUNET_HashCode zone; | 43 | static struct GNUNET_HashCode zone; |
44 | 44 | ||
45 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; | 45 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey2; |
46 | 46 | ||
47 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; | 47 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey2; |
48 | 48 | ||
49 | static struct GNUNET_HashCode zone2; | 49 | static struct GNUNET_HashCode zone2; |
50 | 50 | ||
@@ -54,19 +54,19 @@ static int res; | |||
54 | 54 | ||
55 | static int returned_records; | 55 | static int returned_records; |
56 | 56 | ||
57 | static struct GNUNET_CRYPTO_RsaSignature *sig_1; | 57 | static struct GNUNET_CRYPTO_EccSignature *sig_1; |
58 | 58 | ||
59 | static char * s_name_1; | 59 | static char * s_name_1; |
60 | 60 | ||
61 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; | 61 | static struct GNUNET_NAMESTORE_RecordData *s_rd_1; |
62 | 62 | ||
63 | static struct GNUNET_CRYPTO_RsaSignature *sig_2; | 63 | static struct GNUNET_CRYPTO_EccSignature *sig_2; |
64 | 64 | ||
65 | static char * s_name_2; | 65 | static char * s_name_2; |
66 | 66 | ||
67 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; | 67 | static struct GNUNET_NAMESTORE_RecordData *s_rd_2; |
68 | 68 | ||
69 | static struct GNUNET_CRYPTO_RsaSignature *sig_3; | 69 | static struct GNUNET_CRYPTO_EccSignature *sig_3; |
70 | 70 | ||
71 | static char * s_name_3; | 71 | static 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 | ||
178 | static void | 178 | static void |
179 | zone_proc (void *cls, | 179 | zone_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); |
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c index 85620719d..2734ebae8 100644 --- a/src/namestore/test_namestore_api_zone_to_name.c +++ b/src/namestore/test_namestore_api_zone_to_name.c | |||
@@ -43,9 +43,9 @@ static struct GNUNET_NAMESTORE_Handle * nsh; | |||
43 | 43 | ||
44 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | 44 | static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; |
45 | 45 | ||
46 | static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; | 46 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
47 | 47 | ||
48 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; | 48 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey; |
49 | 49 | ||
50 | static struct GNUNET_TIME_Absolute expire; | 50 | static struct GNUNET_TIME_Absolute expire; |
51 | 51 | ||
@@ -55,7 +55,7 @@ static struct GNUNET_CRYPTO_ShortHashCode s_zone_value; | |||
55 | 55 | ||
56 | static char * s_name; | 56 | static char * s_name; |
57 | 57 | ||
58 | static struct GNUNET_CRYPTO_RsaSignature *s_signature; | 58 | static struct GNUNET_CRYPTO_EccSignature *s_signature; |
59 | 59 | ||
60 | static int res; | 60 | static int res; |
61 | 61 | ||
@@ -73,7 +73,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
73 | GNUNET_NAMESTORE_disconnect (nsh); | 73 | GNUNET_NAMESTORE_disconnect (nsh); |
74 | nsh = NULL; | 74 | nsh = NULL; |
75 | if (privkey != NULL) | 75 | if (privkey != NULL) |
76 | GNUNET_CRYPTO_rsa_key_free (privkey); | 76 | GNUNET_CRYPTO_ecc_key_free (privkey); |
77 | privkey = NULL; | 77 | privkey = NULL; |
78 | res = 1; | 78 | res = 1; |
79 | } | 79 | } |
@@ -88,7 +88,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
88 | endbadly_task = GNUNET_SCHEDULER_NO_TASK; | 88 | endbadly_task = GNUNET_SCHEDULER_NO_TASK; |
89 | } | 89 | } |
90 | if (privkey != NULL) | 90 | if (privkey != NULL) |
91 | GNUNET_CRYPTO_rsa_key_free (privkey); | 91 | GNUNET_CRYPTO_ecc_key_free (privkey); |
92 | privkey = NULL; | 92 | privkey = NULL; |
93 | if (nsh != NULL) | 93 | if (nsh != NULL) |
94 | GNUNET_NAMESTORE_disconnect (nsh); | 94 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -98,12 +98,12 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
98 | 98 | ||
99 | static void | 99 | static void |
100 | zone_to_name_proc (void *cls, | 100 | zone_to_name_proc (void *cls, |
101 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 101 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
102 | struct GNUNET_TIME_Absolute expire, | 102 | struct GNUNET_TIME_Absolute expire, |
103 | const char *n, | 103 | const char *n, |
104 | unsigned int rd_count, | 104 | unsigned int rd_count, |
105 | const struct GNUNET_NAMESTORE_RecordData *rd, | 105 | const struct GNUNET_NAMESTORE_RecordData *rd, |
106 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 106 | const struct GNUNET_CRYPTO_EccSignature *signature) |
107 | { | 107 | { |
108 | int fail = GNUNET_NO; | 108 | int fail = GNUNET_NO; |
109 | 109 | ||
@@ -125,7 +125,7 @@ zone_to_name_proc (void *cls, | |||
125 | fail = GNUNET_YES; | 125 | fail = GNUNET_YES; |
126 | GNUNET_break (0); | 126 | GNUNET_break (0); |
127 | } | 127 | } |
128 | if ((zone_key == NULL) || (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)))) | 128 | if ((zone_key == NULL) || (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded)))) |
129 | { | 129 | { |
130 | fail = GNUNET_YES; | 130 | fail = GNUNET_YES; |
131 | GNUNET_break (0); | 131 | GNUNET_break (0); |
@@ -175,14 +175,14 @@ run (void *cls, | |||
175 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, | 175 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, |
176 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); | 176 | "N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey"); |
177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | 177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); |
178 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | 178 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file(hostkey_file); |
179 | GNUNET_free (hostkey_file); | 179 | GNUNET_free (hostkey_file); |
180 | GNUNET_assert (privkey != NULL); | 180 | GNUNET_assert (privkey != NULL); |
181 | /* get public key */ | 181 | /* get public key */ |
182 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 182 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); |
183 | 183 | ||
184 | /* zone hash */ | 184 | /* zone hash */ |
185 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &s_zone); | 185 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), &s_zone); |
186 | GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value); | 186 | GNUNET_CRYPTO_short_hash (s_name, strlen (s_name) + 1, &s_zone_value); |
187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_short_h2s (&s_zone_value)); | 187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_short_h2s (&s_zone_value)); |
188 | 188 | ||
diff --git a/src/namestore/test_plugin_namestore.c b/src/namestore/test_plugin_namestore.c index ea0bc781c..b7d2341e4 100644 --- a/src/namestore/test_plugin_namestore.c +++ b/src/namestore/test_plugin_namestore.c | |||
@@ -95,19 +95,19 @@ load_plugin (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
95 | */ | 95 | */ |
96 | static void | 96 | static void |
97 | test_record (void *cls, | 97 | test_record (void *cls, |
98 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 98 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
99 | struct GNUNET_TIME_Absolute expire, | 99 | struct GNUNET_TIME_Absolute expire, |
100 | const char *name, | 100 | const char *name, |
101 | unsigned int rd_count, | 101 | unsigned int rd_count, |
102 | const struct GNUNET_NAMESTORE_RecordData *rd, | 102 | const struct GNUNET_NAMESTORE_RecordData *rd, |
103 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 103 | const struct GNUNET_CRYPTO_EccSignature *signature) |
104 | { | 104 | { |
105 | int *idp = cls; | 105 | int *idp = cls; |
106 | int id = *idp; | 106 | int id = *idp; |
107 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded tzone_key; | 107 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded tzone_key; |
108 | char tname[64]; | 108 | char tname[64]; |
109 | unsigned int trd_count = 1 + (id % 1024); | 109 | unsigned int trd_count = 1 + (id % 1024); |
110 | struct GNUNET_CRYPTO_RsaSignature tsignature; | 110 | struct GNUNET_CRYPTO_EccSignature tsignature; |
111 | unsigned int i; | 111 | unsigned int i; |
112 | 112 | ||
113 | GNUNET_snprintf (tname, sizeof (tname), | 113 | GNUNET_snprintf (tname, sizeof (tname), |
@@ -122,8 +122,8 @@ test_record (void *cls, | |||
122 | memset (&tzone_key, (id % 241), sizeof (tzone_key)); | 122 | memset (&tzone_key, (id % 241), sizeof (tzone_key)); |
123 | memset (&tsignature, (id % 243), sizeof (tsignature)); | 123 | memset (&tsignature, (id % 243), sizeof (tsignature)); |
124 | GNUNET_assert (0 == strcmp (name, tname)); | 124 | GNUNET_assert (0 == strcmp (name, tname)); |
125 | GNUNET_assert (0 == memcmp (&tzone_key, zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded))); | 125 | GNUNET_assert (0 == memcmp (&tzone_key, zone_key, sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded))); |
126 | GNUNET_assert (0 == memcmp (&tsignature, signature, sizeof (struct GNUNET_CRYPTO_RsaSignature))); | 126 | GNUNET_assert (0 == memcmp (&tsignature, signature, sizeof (struct GNUNET_CRYPTO_EccSignature))); |
127 | } | 127 | } |
128 | 128 | ||
129 | 129 | ||
@@ -139,12 +139,12 @@ get_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) | |||
139 | static void | 139 | static void |
140 | put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) | 140 | put_record (struct GNUNET_NAMESTORE_PluginFunctions *nsp, int id) |
141 | { | 141 | { |
142 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded zone_key; | 142 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded zone_key; |
143 | struct GNUNET_TIME_Absolute expire; | 143 | struct GNUNET_TIME_Absolute expire; |
144 | char name[64]; | 144 | char name[64]; |
145 | unsigned int rd_count = 1 + (id % 1024); | 145 | unsigned int rd_count = 1 + (id % 1024); |
146 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | 146 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; |
147 | struct GNUNET_CRYPTO_RsaSignature signature; | 147 | struct GNUNET_CRYPTO_EccSignature signature; |
148 | unsigned int i; | 148 | unsigned int i; |
149 | 149 | ||
150 | GNUNET_snprintf (name, sizeof (name), | 150 | GNUNET_snprintf (name, sizeof (name), |
@@ -175,7 +175,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
175 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 175 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
176 | { | 176 | { |
177 | struct GNUNET_NAMESTORE_PluginFunctions *nsp; | 177 | struct GNUNET_NAMESTORE_PluginFunctions *nsp; |
178 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded zone_key; | 178 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded zone_key; |
179 | struct GNUNET_CRYPTO_ShortHashCode zone; | 179 | struct GNUNET_CRYPTO_ShortHashCode zone; |
180 | 180 | ||
181 | ok = 0; | 181 | ok = 0; |
diff --git a/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey b/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey index eac1d1e2f..955042ba4 100644 --- a/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey +++ b/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey | |||
Binary files differ | |||
diff --git a/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey b/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey index 871fc90ed..8c8c5d54f 100644 --- a/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey +++ b/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey | |||
Binary files differ | |||