diff options
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-namestore-fcfsd.c | 14 | ||||
-rw-r--r-- | src/namestore/gnunet-namestore.c | 10 | ||||
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 4 | ||||
-rw-r--r-- | src/namestore/namestore.h | 6 | ||||
-rw-r--r-- | src/namestore/namestore_api.c | 2 | ||||
-rw-r--r-- | src/namestore/namestore_api_common.c | 44 | ||||
-rw-r--r-- | src/namestore/plugin_namestore_postgres.c | 14 | ||||
-rw-r--r-- | src/namestore/plugin_namestore_sqlite.c | 12 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_blocks.c | 4 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_put.c | 4 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_remove.c | 4 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_remove_not_existing_record.c | 4 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_store.c | 4 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_store_update.c | 4 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_zone_to_name.c | 10 |
15 files changed, 70 insertions, 70 deletions
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c index 041b046ba..527e46eb9 100644 --- a/src/namestore/gnunet-namestore-fcfsd.c +++ b/src/namestore/gnunet-namestore-fcfsd.c | |||
@@ -552,7 +552,7 @@ lookup_result_processor (void *cls, | |||
552 | const struct GNUNET_NAMESTORE_RecordData *rd) | 552 | const struct GNUNET_NAMESTORE_RecordData *rd) |
553 | { | 553 | { |
554 | struct Request *request = cls; | 554 | struct Request *request = cls; |
555 | struct GNUNET_CRYPTO_EccPublicKey pub; | 555 | struct GNUNET_CRYPTO_EccPublicSignKey pub; |
556 | 556 | ||
557 | if (0 != rd_count) | 557 | if (0 != rd_count) |
558 | { | 558 | { |
@@ -565,7 +565,7 @@ lookup_result_processor (void *cls, | |||
565 | return; | 565 | return; |
566 | } | 566 | } |
567 | if (GNUNET_OK != | 567 | if (GNUNET_OK != |
568 | GNUNET_CRYPTO_ecc_public_key_from_string (request->public_key, | 568 | GNUNET_CRYPTO_ecc_public_sign_key_from_string (request->public_key, |
569 | strlen (request->public_key), | 569 | strlen (request->public_key), |
570 | &pub)) | 570 | &pub)) |
571 | { | 571 | { |
@@ -594,7 +594,7 @@ lookup_block_processor (void *cls, | |||
594 | const struct GNUNET_NAMESTORE_Block *block) | 594 | const struct GNUNET_NAMESTORE_Block *block) |
595 | { | 595 | { |
596 | struct Request *request = cls; | 596 | struct Request *request = cls; |
597 | struct GNUNET_CRYPTO_EccPublicKey pub; | 597 | struct GNUNET_CRYPTO_EccPublicSignKey pub; |
598 | 598 | ||
599 | request->qe = NULL; | 599 | request->qe = NULL; |
600 | if (NULL == block) | 600 | if (NULL == block) |
@@ -602,7 +602,7 @@ lookup_block_processor (void *cls, | |||
602 | lookup_result_processor (request, 0, NULL); | 602 | lookup_result_processor (request, 0, NULL); |
603 | return; | 603 | return; |
604 | } | 604 | } |
605 | GNUNET_CRYPTO_ecc_key_get_public (&fcfs_zone_pkey, | 605 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (&fcfs_zone_pkey, |
606 | &pub); | 606 | &pub); |
607 | if (GNUNET_OK != | 607 | if (GNUNET_OK != |
608 | GNUNET_NAMESTORE_block_decrypt (block, | 608 | GNUNET_NAMESTORE_block_decrypt (block, |
@@ -655,7 +655,7 @@ create_response (void *cls, | |||
655 | struct MHD_Response *response; | 655 | struct MHD_Response *response; |
656 | struct Request *request; | 656 | struct Request *request; |
657 | int ret; | 657 | int ret; |
658 | struct GNUNET_CRYPTO_EccPublicKey pub; | 658 | struct GNUNET_CRYPTO_EccPublicSignKey pub; |
659 | struct GNUNET_HashCode query; | 659 | struct GNUNET_HashCode query; |
660 | 660 | ||
661 | if ( (0 == strcmp (method, MHD_HTTP_METHOD_GET)) || | 661 | if ( (0 == strcmp (method, MHD_HTTP_METHOD_GET)) || |
@@ -705,7 +705,7 @@ create_response (void *cls, | |||
705 | request->pp = NULL; | 705 | request->pp = NULL; |
706 | } | 706 | } |
707 | if (GNUNET_OK != | 707 | if (GNUNET_OK != |
708 | GNUNET_CRYPTO_ecc_public_key_from_string (request->public_key, | 708 | GNUNET_CRYPTO_ecc_public_sign_key_from_string (request->public_key, |
709 | strlen (request->public_key), | 709 | strlen (request->public_key), |
710 | &pub)) | 710 | &pub)) |
711 | { | 711 | { |
@@ -733,7 +733,7 @@ create_response (void *cls, | |||
733 | request, connection); | 733 | request, connection); |
734 | } | 734 | } |
735 | request->phase = RP_LOOKUP; | 735 | request->phase = RP_LOOKUP; |
736 | GNUNET_CRYPTO_ecc_key_get_public (&fcfs_zone_pkey, | 736 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (&fcfs_zone_pkey, |
737 | &pub); | 737 | &pub); |
738 | GNUNET_NAMESTORE_query_from_public_key (&pub, | 738 | GNUNET_NAMESTORE_query_from_public_key (&pub, |
739 | request->domain_name, | 739 | request->domain_name, |
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index aadf741ad..fb9b017b1 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -430,7 +430,7 @@ testservice_task (void *cls, | |||
430 | int result) | 430 | int result) |
431 | { | 431 | { |
432 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 432 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
433 | struct GNUNET_CRYPTO_EccPublicKey pub; | 433 | struct GNUNET_CRYPTO_EccPublicSignKey pub; |
434 | struct GNUNET_NAMESTORE_RecordData rd; | 434 | struct GNUNET_NAMESTORE_RecordData rd; |
435 | 435 | ||
436 | if (GNUNET_YES != result) | 436 | if (GNUNET_YES != result) |
@@ -446,7 +446,7 @@ testservice_task (void *cls, | |||
446 | _("No options given\n")); | 446 | _("No options given\n")); |
447 | return; | 447 | return; |
448 | } | 448 | } |
449 | GNUNET_CRYPTO_ecc_key_get_public (&zone_pkey, | 449 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (&zone_pkey, |
450 | &pub); | 450 | &pub); |
451 | 451 | ||
452 | ns = GNUNET_NAMESTORE_connect (cfg); | 452 | ns = GNUNET_NAMESTORE_connect (cfg); |
@@ -575,14 +575,14 @@ testservice_task (void *cls, | |||
575 | { | 575 | { |
576 | char sh[105]; | 576 | char sh[105]; |
577 | char sname[64]; | 577 | char sname[64]; |
578 | struct GNUNET_CRYPTO_EccPublicKey pkey; | 578 | struct GNUNET_CRYPTO_EccPublicSignKey pkey; |
579 | 579 | ||
580 | if ( (2 != (sscanf (uri, | 580 | if ( (2 != (sscanf (uri, |
581 | "gnunet://gns/%104s/%63s", | 581 | "gnunet://gns/%104s/%63s", |
582 | sh, | 582 | sh, |
583 | sname)) ) || | 583 | sname)) ) || |
584 | (GNUNET_OK != | 584 | (GNUNET_OK != |
585 | GNUNET_CRYPTO_ecc_public_key_from_string (sh, strlen (sh), &pkey)) ) | 585 | GNUNET_CRYPTO_ecc_public_sign_key_from_string (sh, strlen (sh), &pkey)) ) |
586 | { | 586 | { |
587 | fprintf (stderr, | 587 | fprintf (stderr, |
588 | _("Invalid URI `%s'\n"), | 588 | _("Invalid URI `%s'\n"), |
@@ -593,7 +593,7 @@ testservice_task (void *cls, | |||
593 | } | 593 | } |
594 | memset (&rd, 0, sizeof (rd)); | 594 | memset (&rd, 0, sizeof (rd)); |
595 | rd.data = &pkey; | 595 | rd.data = &pkey; |
596 | rd.data_size = sizeof (struct GNUNET_CRYPTO_EccPublicKey); | 596 | rd.data_size = sizeof (struct GNUNET_CRYPTO_EccPublicSignKey); |
597 | rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY; | 597 | rd.record_type = GNUNET_NAMESTORE_TYPE_PKEY; |
598 | if (GNUNET_YES == etime_is_rel) | 598 | if (GNUNET_YES == etime_is_rel) |
599 | { | 599 | { |
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index fda19cacf..f113040b5 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -573,7 +573,7 @@ handle_record_store (void *cls, | |||
573 | const char *rd_ser; | 573 | const char *rd_ser; |
574 | unsigned int rd_count; | 574 | unsigned int rd_count; |
575 | int res; | 575 | int res; |
576 | struct GNUNET_CRYPTO_EccPublicKey pubkey; | 576 | struct GNUNET_CRYPTO_EccPublicSignKey pubkey; |
577 | 577 | ||
578 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 578 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
579 | "Received `%s' message\n", | 579 | "Received `%s' message\n", |
@@ -624,7 +624,7 @@ handle_record_store (void *cls, | |||
624 | } | 624 | } |
625 | 625 | ||
626 | /* Extracting and converting private key */ | 626 | /* Extracting and converting private key */ |
627 | GNUNET_CRYPTO_ecc_key_get_public (&rp_msg->private_key, | 627 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (&rp_msg->private_key, |
628 | &pubkey); | 628 | &pubkey); |
629 | conv_name = GNUNET_NAMESTORE_normalize_string (name_tmp); | 629 | conv_name = GNUNET_NAMESTORE_normalize_string (name_tmp); |
630 | if (NULL == conv_name) | 630 | if (NULL == conv_name) |
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h index 7d406df61..61691b95e 100644 --- a/src/namestore/namestore.h +++ b/src/namestore/namestore.h | |||
@@ -93,7 +93,7 @@ struct LookupBlockResponseMessage | |||
93 | /** | 93 | /** |
94 | * Derived public key. | 94 | * Derived public key. |
95 | */ | 95 | */ |
96 | struct GNUNET_CRYPTO_EccPublicKey derived_key; | 96 | struct GNUNET_CRYPTO_EccPublicSignKey derived_key; |
97 | 97 | ||
98 | /* follwed by encrypted block data */ | 98 | /* follwed by encrypted block data */ |
99 | }; | 99 | }; |
@@ -122,7 +122,7 @@ struct BlockCacheMessage | |||
122 | /** | 122 | /** |
123 | * Derived public key. | 123 | * Derived public key. |
124 | */ | 124 | */ |
125 | struct GNUNET_CRYPTO_EccPublicKey derived_key; | 125 | struct GNUNET_CRYPTO_EccPublicSignKey derived_key; |
126 | 126 | ||
127 | /* follwed by encrypted block data */ | 127 | /* follwed by encrypted block data */ |
128 | }; | 128 | }; |
@@ -228,7 +228,7 @@ struct ZoneToNameMessage | |||
228 | /** | 228 | /** |
229 | * The public key of the target zone | 229 | * The public key of the target zone |
230 | */ | 230 | */ |
231 | struct GNUNET_CRYPTO_EccPublicKey value_zone; | 231 | struct GNUNET_CRYPTO_EccPublicSignKey value_zone; |
232 | }; | 232 | }; |
233 | 233 | ||
234 | 234 | ||
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index a57aa2967..acb658665 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -1146,7 +1146,7 @@ GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h, | |||
1146 | struct GNUNET_NAMESTORE_QueueEntry * | 1146 | struct GNUNET_NAMESTORE_QueueEntry * |
1147 | GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h, | 1147 | GNUNET_NAMESTORE_zone_to_name (struct GNUNET_NAMESTORE_Handle *h, |
1148 | const struct GNUNET_CRYPTO_EccPrivateKey *zone, | 1148 | const struct GNUNET_CRYPTO_EccPrivateKey *zone, |
1149 | const struct GNUNET_CRYPTO_EccPublicKey *value_zone, | 1149 | const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone, |
1150 | GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls) | 1150 | GNUNET_NAMESTORE_RecordMonitor proc, void *proc_cls) |
1151 | { | 1151 | { |
1152 | struct GNUNET_NAMESTORE_QueueEntry *qe; | 1152 | struct GNUNET_NAMESTORE_QueueEntry *qe; |
diff --git a/src/namestore/namestore_api_common.c b/src/namestore/namestore_api_common.c index dec6acafe..f752b18c3 100644 --- a/src/namestore/namestore_api_common.c +++ b/src/namestore/namestore_api_common.c | |||
@@ -97,13 +97,13 @@ GNUNET_NAMESTORE_normalize_string (const char *src) | |||
97 | * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s | 97 | * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s |
98 | */ | 98 | */ |
99 | const char * | 99 | const char * |
100 | GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EccPublicKey *z) | 100 | GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EccPublicSignKey *z) |
101 | { | 101 | { |
102 | static char buf[sizeof (struct GNUNET_CRYPTO_EccPublicKey) * 8]; | 102 | static char buf[sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) * 8]; |
103 | char *end; | 103 | char *end; |
104 | 104 | ||
105 | end = GNUNET_STRINGS_data_to_string ((const unsigned char *) z, | 105 | end = GNUNET_STRINGS_data_to_string ((const unsigned char *) z, |
106 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), | 106 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
107 | buf, sizeof (buf)); | 107 | buf, sizeof (buf)); |
108 | if (NULL == end) | 108 | if (NULL == end) |
109 | { | 109 | { |
@@ -324,18 +324,18 @@ static void | |||
324 | derive_block_aes_key (struct GNUNET_CRYPTO_AesInitializationVector *iv, | 324 | derive_block_aes_key (struct GNUNET_CRYPTO_AesInitializationVector *iv, |
325 | struct GNUNET_CRYPTO_AesSessionKey *skey, | 325 | struct GNUNET_CRYPTO_AesSessionKey *skey, |
326 | const char *label, | 326 | const char *label, |
327 | const struct GNUNET_CRYPTO_EccPublicKey *pub) | 327 | const struct GNUNET_CRYPTO_EccPublicSignKey *pub) |
328 | { | 328 | { |
329 | static const char ctx_key[] = "gns-aes-ctx-key"; | 329 | static const char ctx_key[] = "gns-aes-ctx-key"; |
330 | static const char ctx_iv[] = "gns-aes-ctx-iv"; | 330 | static const char ctx_iv[] = "gns-aes-ctx-iv"; |
331 | 331 | ||
332 | GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_AesSessionKey), | 332 | GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_AesSessionKey), |
333 | pub, sizeof (struct GNUNET_CRYPTO_EccPublicKey), | 333 | pub, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
334 | label, strlen (label), | 334 | label, strlen (label), |
335 | ctx_key, strlen (ctx_key), | 335 | ctx_key, strlen (ctx_key), |
336 | NULL, 0); | 336 | NULL, 0); |
337 | GNUNET_CRYPTO_kdf (iv, sizeof (struct GNUNET_CRYPTO_AesInitializationVector), | 337 | GNUNET_CRYPTO_kdf (iv, sizeof (struct GNUNET_CRYPTO_AesInitializationVector), |
338 | pub, sizeof (struct GNUNET_CRYPTO_EccPublicKey), | 338 | pub, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
339 | label, strlen (label), | 339 | label, strlen (label), |
340 | ctx_iv, strlen (ctx_iv), | 340 | ctx_iv, strlen (ctx_iv), |
341 | NULL, 0); | 341 | NULL, 0); |
@@ -362,7 +362,7 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key, | |||
362 | size_t payload_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); | 362 | size_t payload_len = GNUNET_NAMESTORE_records_get_size (rd_count, rd); |
363 | char payload[sizeof (uint32_t) + payload_len]; | 363 | char payload[sizeof (uint32_t) + payload_len]; |
364 | struct GNUNET_NAMESTORE_Block *block; | 364 | struct GNUNET_NAMESTORE_Block *block; |
365 | struct GNUNET_CRYPTO_EccPublicKey pkey; | 365 | struct GNUNET_CRYPTO_EccPublicSignKey pkey; |
366 | struct GNUNET_CRYPTO_EccPrivateKey *dkey; | 366 | struct GNUNET_CRYPTO_EccPrivateKey *dkey; |
367 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 367 | struct GNUNET_CRYPTO_AesInitializationVector iv; |
368 | struct GNUNET_CRYPTO_AesSessionKey skey; | 368 | struct GNUNET_CRYPTO_AesSessionKey skey; |
@@ -385,9 +385,9 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key, | |||
385 | dkey = GNUNET_CRYPTO_ecc_key_derive (key, | 385 | dkey = GNUNET_CRYPTO_ecc_key_derive (key, |
386 | label, | 386 | label, |
387 | "gns"); | 387 | "gns"); |
388 | GNUNET_CRYPTO_ecc_key_get_public (dkey, | 388 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (dkey, |
389 | &block->derived_key); | 389 | &block->derived_key); |
390 | GNUNET_CRYPTO_ecc_key_get_public (key, | 390 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (key, |
391 | &pkey); | 391 | &pkey); |
392 | derive_block_aes_key (&iv, &skey, label, &pkey); | 392 | derive_block_aes_key (&iv, &skey, label, &pkey); |
393 | GNUNET_break (payload_len + sizeof (uint32_t) == | 393 | GNUNET_break (payload_len + sizeof (uint32_t) == |
@@ -439,7 +439,7 @@ GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block) | |||
439 | */ | 439 | */ |
440 | int | 440 | int |
441 | GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | 441 | GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, |
442 | const struct GNUNET_CRYPTO_EccPublicKey *zone_key, | 442 | const struct GNUNET_CRYPTO_EccPublicSignKey *zone_key, |
443 | const char *label, | 443 | const char *label, |
444 | GNUNET_NAMESTORE_RecordCallback proc, | 444 | GNUNET_NAMESTORE_RecordCallback proc, |
445 | void *proc_cls) | 445 | void *proc_cls) |
@@ -580,7 +580,7 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type, | |||
580 | return NULL; | 580 | return NULL; |
581 | return GNUNET_strdup (tmp); | 581 | return GNUNET_strdup (tmp); |
582 | case GNUNET_NAMESTORE_TYPE_PKEY: | 582 | case GNUNET_NAMESTORE_TYPE_PKEY: |
583 | if (data_size != sizeof (struct GNUNET_CRYPTO_EccPublicKey)) | 583 | if (data_size != sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)) |
584 | return NULL; | 584 | return NULL; |
585 | return GNUNET_CRYPTO_ecc_public_key_to_string (data); | 585 | return GNUNET_CRYPTO_ecc_public_key_to_string (data); |
586 | case GNUNET_NAMESTORE_TYPE_PSEU: | 586 | case GNUNET_NAMESTORE_TYPE_PSEU: |
@@ -664,7 +664,7 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type, | |||
664 | { | 664 | { |
665 | struct in_addr value_a; | 665 | struct in_addr value_a; |
666 | struct in6_addr value_aaaa; | 666 | struct in6_addr value_aaaa; |
667 | struct GNUNET_CRYPTO_EccPublicKey pkey; | 667 | struct GNUNET_CRYPTO_EccPublicSignKey pkey; |
668 | struct GNUNET_TUN_DnsSoaRecord *soa; | 668 | struct GNUNET_TUN_DnsSoaRecord *soa; |
669 | struct GNUNET_TUN_GnsVpnRecord *vpn; | 669 | struct GNUNET_TUN_GnsVpnRecord *vpn; |
670 | struct GNUNET_TUN_DnsTlsaRecord *tlsa; | 670 | struct GNUNET_TUN_DnsTlsaRecord *tlsa; |
@@ -769,16 +769,16 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type, | |||
769 | return GNUNET_OK; | 769 | return GNUNET_OK; |
770 | case GNUNET_NAMESTORE_TYPE_PKEY: | 770 | case GNUNET_NAMESTORE_TYPE_PKEY: |
771 | if (GNUNET_OK != | 771 | if (GNUNET_OK != |
772 | GNUNET_CRYPTO_ecc_public_key_from_string (s, strlen (s), &pkey)) | 772 | GNUNET_CRYPTO_ecc_public_sign_key_from_string (s, strlen (s), &pkey)) |
773 | { | 773 | { |
774 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 774 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
775 | _("Unable to parse PKEY record `%s'\n"), | 775 | _("Unable to parse PKEY record `%s'\n"), |
776 | s); | 776 | s); |
777 | return GNUNET_SYSERR; | 777 | return GNUNET_SYSERR; |
778 | } | 778 | } |
779 | *data = GNUNET_new (struct GNUNET_CRYPTO_EccPublicKey); | 779 | *data = GNUNET_new (struct GNUNET_CRYPTO_EccPublicSignKey); |
780 | memcpy (*data, &pkey, sizeof (pkey)); | 780 | memcpy (*data, &pkey, sizeof (pkey)); |
781 | *data_size = sizeof (struct GNUNET_CRYPTO_EccPublicKey); | 781 | *data_size = sizeof (struct GNUNET_CRYPTO_EccPublicSignKey); |
782 | return GNUNET_OK; | 782 | return GNUNET_OK; |
783 | case GNUNET_NAMESTORE_TYPE_PSEU: | 783 | case GNUNET_NAMESTORE_TYPE_PSEU: |
784 | *data = GNUNET_strdup (s); | 784 | *data = GNUNET_strdup (s); |
@@ -928,9 +928,9 @@ GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EccPrivateKe | |||
928 | const char *label, | 928 | const char *label, |
929 | struct GNUNET_HashCode *query) | 929 | struct GNUNET_HashCode *query) |
930 | { | 930 | { |
931 | struct GNUNET_CRYPTO_EccPublicKey pub; | 931 | struct GNUNET_CRYPTO_EccPublicSignKey pub; |
932 | 932 | ||
933 | GNUNET_CRYPTO_ecc_key_get_public (zone, &pub); | 933 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (zone, &pub); |
934 | GNUNET_NAMESTORE_query_from_public_key (&pub, label, query); | 934 | GNUNET_NAMESTORE_query_from_public_key (&pub, label, query); |
935 | } | 935 | } |
936 | 936 | ||
@@ -943,11 +943,11 @@ GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EccPrivateKe | |||
943 | * @param query hash to use for the query | 943 | * @param query hash to use for the query |
944 | */ | 944 | */ |
945 | void | 945 | void |
946 | GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicKey *pub, | 946 | GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicSignKey *pub, |
947 | const char *label, | 947 | const char *label, |
948 | struct GNUNET_HashCode *query) | 948 | struct GNUNET_HashCode *query) |
949 | { | 949 | { |
950 | struct GNUNET_CRYPTO_EccPublicKey pd; | 950 | struct GNUNET_CRYPTO_EccPublicSignKey pd; |
951 | 951 | ||
952 | GNUNET_CRYPTO_ecc_public_key_derive (pub, label, "gns", &pd); | 952 | GNUNET_CRYPTO_ecc_public_key_derive (pub, label, "gns", &pd); |
953 | GNUNET_CRYPTO_hash (&pd, sizeof (pd), query); | 953 | GNUNET_CRYPTO_hash (&pd, sizeof (pd), query); |
@@ -965,7 +965,7 @@ GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicKey | |||
965 | * key in an encoding suitable for DNS labels. | 965 | * key in an encoding suitable for DNS labels. |
966 | */ | 966 | */ |
967 | const char * | 967 | const char * |
968 | GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicKey *pkey) | 968 | GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicSignKey *pkey) |
969 | { | 969 | { |
970 | static char ret[128]; | 970 | static char ret[128]; |
971 | char *pkeys; | 971 | char *pkeys; |
@@ -991,7 +991,7 @@ GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EccPublicKey *pkey) | |||
991 | */ | 991 | */ |
992 | int | 992 | int |
993 | GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, | 993 | GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, |
994 | struct GNUNET_CRYPTO_EccPublicKey *pkey) | 994 | struct GNUNET_CRYPTO_EccPublicSignKey *pkey) |
995 | { | 995 | { |
996 | char *cpy; | 996 | char *cpy; |
997 | char *dot; | 997 | char *dot; |
@@ -1007,7 +1007,7 @@ GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, | |||
1007 | goto error; | 1007 | goto error; |
1008 | 1008 | ||
1009 | if (GNUNET_OK != | 1009 | if (GNUNET_OK != |
1010 | GNUNET_CRYPTO_ecc_public_key_from_string (x, | 1010 | GNUNET_CRYPTO_ecc_public_sign_key_from_string (x, |
1011 | strlen (x), | 1011 | strlen (x), |
1012 | pkey)) | 1012 | pkey)) |
1013 | goto error; | 1013 | goto error; |
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index 546653d90..fba2b47b4 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -273,7 +273,7 @@ namestore_postgres_remove_records (void *cls, | |||
273 | */ | 273 | */ |
274 | static int | 274 | static int |
275 | namestore_postgres_put_records (void *cls, | 275 | namestore_postgres_put_records (void *cls, |
276 | const struct GNUNET_CRYPTO_EccPublicKey *zone_key, | 276 | const struct GNUNET_CRYPTO_EccPublicSignKey *zone_key, |
277 | struct GNUNET_TIME_Absolute expire, | 277 | struct GNUNET_TIME_Absolute expire, |
278 | const char *name, | 278 | const char *name, |
279 | unsigned int rd_count, | 279 | unsigned int rd_count, |
@@ -291,7 +291,7 @@ namestore_postgres_put_records (void *cls, | |||
291 | unsigned int i; | 291 | unsigned int i; |
292 | 292 | ||
293 | GNUNET_CRYPTO_short_hash (zone_key, | 293 | GNUNET_CRYPTO_short_hash (zone_key, |
294 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), | 294 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
295 | &zone); | 295 | &zone); |
296 | (void) namestore_postgres_remove_records (plugin, &zone, name); | 296 | (void) namestore_postgres_remove_records (plugin, &zone, name); |
297 | name_len = strlen (name); | 297 | name_len = strlen (name); |
@@ -331,7 +331,7 @@ namestore_postgres_put_records (void *cls, | |||
331 | (const char *) &rvalue_be | 331 | (const char *) &rvalue_be |
332 | }; | 332 | }; |
333 | int paramLengths[] = { | 333 | int paramLengths[] = { |
334 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), | 334 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
335 | name_len, | 335 | name_len, |
336 | sizeof (uint32_t), | 336 | sizeof (uint32_t), |
337 | data_size, | 337 | data_size, |
@@ -383,7 +383,7 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
383 | { | 383 | { |
384 | unsigned int record_count; | 384 | unsigned int record_count; |
385 | size_t data_size; | 385 | size_t data_size; |
386 | /* const struct GNUNET_CRYPTO_EccPublicKey *zone_key; */ | 386 | /* const struct GNUNET_CRYPTO_EccPublicSignKey *zone_key; */ |
387 | const struct GNUNET_CRYPTO_EccPrivateKey *zone_key; | 387 | const struct GNUNET_CRYPTO_EccPrivateKey *zone_key; |
388 | /* const struct GNUNET_CRYPTO_EccSignature *sig; */ | 388 | /* const struct GNUNET_CRYPTO_EccSignature *sig; */ |
389 | /* struct GNUNET_TIME_Absolute expiration; */ | 389 | /* struct GNUNET_TIME_Absolute expiration; */ |
@@ -413,7 +413,7 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
413 | } | 413 | } |
414 | GNUNET_assert (1 == cnt); | 414 | GNUNET_assert (1 == cnt); |
415 | if ((6 != PQnfields (res)) || | 415 | if ((6 != PQnfields (res)) || |
416 | (sizeof (struct GNUNET_CRYPTO_EccPublicKey) != PQgetlength (res, 0, 0)) || | 416 | (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) != PQgetlength (res, 0, 0)) || |
417 | (sizeof (uint32_t) != PQfsize (res, 2)) || | 417 | (sizeof (uint32_t) != PQfsize (res, 2)) || |
418 | (sizeof (uint64_t) != PQfsize (res, 4)) || | 418 | (sizeof (uint64_t) != PQfsize (res, 4)) || |
419 | (sizeof (struct GNUNET_CRYPTO_EccSignature) != PQgetlength (res, 0, 5))) | 419 | (sizeof (struct GNUNET_CRYPTO_EccSignature) != PQgetlength (res, 0, 5))) |
@@ -423,7 +423,7 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
423 | return GNUNET_SYSERR; | 423 | return GNUNET_SYSERR; |
424 | } | 424 | } |
425 | zone_key = (const struct GNUNET_CRYPTO_EccPrivateKey *) PQgetvalue (res, 0, 0); | 425 | zone_key = (const struct GNUNET_CRYPTO_EccPrivateKey *) PQgetvalue (res, 0, 0); |
426 | /* zone_key = (const struct GNUNET_CRYPTO_EccPublicKey *) PQgetvalue (res, 0, 0); */ | 426 | /* zone_key = (const struct GNUNET_CRYPTO_EccPublicSignKey *) PQgetvalue (res, 0, 0); */ |
427 | name = PQgetvalue (res, 0, 1); | 427 | name = PQgetvalue (res, 0, 1); |
428 | name_len = PQgetlength (res, 0, 1); | 428 | name_len = PQgetlength (res, 0, 1); |
429 | record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); | 429 | record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); |
@@ -563,7 +563,7 @@ namestore_postgres_iterate_records (void *cls, | |||
563 | static int | 563 | static int |
564 | namestore_postgres_zone_to_name (void *cls, | 564 | namestore_postgres_zone_to_name (void *cls, |
565 | const struct GNUNET_CRYPTO_EccPrivateKey *zone, | 565 | const struct GNUNET_CRYPTO_EccPrivateKey *zone, |
566 | const struct GNUNET_CRYPTO_EccPublicKey *value_zone, | 566 | const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone, |
567 | GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 567 | GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
568 | { | 568 | { |
569 | #if 0 | 569 | #if 0 |
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index d062c81a1..6551dd4a2 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -455,11 +455,11 @@ namestore_sqlite_cache_block (void *cls, | |||
455 | 455 | ||
456 | namestore_sqlite_expire_blocks (plugin); | 456 | namestore_sqlite_expire_blocks (plugin); |
457 | GNUNET_CRYPTO_hash (&block->derived_key, | 457 | GNUNET_CRYPTO_hash (&block->derived_key, |
458 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), | 458 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
459 | &query); | 459 | &query); |
460 | expiration = GNUNET_TIME_absolute_ntoh (block->expiration_time); | 460 | expiration = GNUNET_TIME_absolute_ntoh (block->expiration_time); |
461 | block_size = ntohl (block->purpose.size) + | 461 | block_size = ntohl (block->purpose.size) + |
462 | sizeof (struct GNUNET_CRYPTO_EccPublicKey) + | 462 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + |
463 | sizeof (struct GNUNET_CRYPTO_EccSignature); | 463 | sizeof (struct GNUNET_CRYPTO_EccSignature); |
464 | if (block_size > 64 * 65536) | 464 | if (block_size > 64 * 65536) |
465 | { | 465 | { |
@@ -542,7 +542,7 @@ namestore_sqlite_lookup_block (void *cls, | |||
542 | block_size = sqlite3_column_bytes (plugin->lookup_block, 0); | 542 | block_size = sqlite3_column_bytes (plugin->lookup_block, 0); |
543 | if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) || | 543 | if ( (block_size < sizeof (struct GNUNET_NAMESTORE_Block)) || |
544 | (ntohl (block->purpose.size) + | 544 | (ntohl (block->purpose.size) + |
545 | sizeof (struct GNUNET_CRYPTO_EccPublicKey) + | 545 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) + |
546 | sizeof (struct GNUNET_CRYPTO_EccSignature) != block_size) ) | 546 | sizeof (struct GNUNET_CRYPTO_EccSignature) != block_size) ) |
547 | { | 547 | { |
548 | GNUNET_break (0); | 548 | GNUNET_break (0); |
@@ -599,7 +599,7 @@ namestore_sqlite_store_records (void *cls, | |||
599 | for (i=0;i<rd_count;i++) | 599 | for (i=0;i<rd_count;i++) |
600 | if (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type) | 600 | if (GNUNET_NAMESTORE_TYPE_PKEY == rd[i].record_type) |
601 | { | 601 | { |
602 | GNUNET_break (sizeof (struct GNUNET_CRYPTO_EccPublicKey) == rd[i].data_size); | 602 | GNUNET_break (sizeof (struct GNUNET_CRYPTO_EccPublicSignKey) == rd[i].data_size); |
603 | GNUNET_CRYPTO_hash (rd[i].data, | 603 | GNUNET_CRYPTO_hash (rd[i].data, |
604 | rd[i].data_size, | 604 | rd[i].data_size, |
605 | &pkey_hash); | 605 | &pkey_hash); |
@@ -834,7 +834,7 @@ namestore_sqlite_iterate_records (void *cls, | |||
834 | static int | 834 | static int |
835 | namestore_sqlite_zone_to_name (void *cls, | 835 | namestore_sqlite_zone_to_name (void *cls, |
836 | const struct GNUNET_CRYPTO_EccPrivateKey *zone, | 836 | const struct GNUNET_CRYPTO_EccPrivateKey *zone, |
837 | const struct GNUNET_CRYPTO_EccPublicKey *value_zone, | 837 | const struct GNUNET_CRYPTO_EccPublicSignKey *value_zone, |
838 | GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 838 | GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
839 | { | 839 | { |
840 | struct Plugin *plugin = cls; | 840 | struct Plugin *plugin = cls; |
@@ -845,7 +845,7 @@ namestore_sqlite_zone_to_name (void *cls, | |||
845 | zone, sizeof (struct GNUNET_CRYPTO_EccPrivateKey), | 845 | zone, sizeof (struct GNUNET_CRYPTO_EccPrivateKey), |
846 | SQLITE_STATIC)) || | 846 | SQLITE_STATIC)) || |
847 | (SQLITE_OK != sqlite3_bind_blob (stmt, 2, | 847 | (SQLITE_OK != sqlite3_bind_blob (stmt, 2, |
848 | value_zone, sizeof (struct GNUNET_CRYPTO_EccPublicKey), | 848 | value_zone, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), |
849 | SQLITE_STATIC)) ) | 849 | SQLITE_STATIC)) ) |
850 | { | 850 | { |
851 | LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, | 851 | LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, |
diff --git a/src/namestore/test_namestore_api_blocks.c b/src/namestore/test_namestore_api_blocks.c index 446a28c18..d7057fc8f 100644 --- a/src/namestore/test_namestore_api_blocks.c +++ b/src/namestore/test_namestore_api_blocks.c | |||
@@ -101,7 +101,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
101 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 101 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
102 | { | 102 | { |
103 | struct GNUNET_NAMESTORE_Block *block; | 103 | struct GNUNET_NAMESTORE_Block *block; |
104 | struct GNUNET_CRYPTO_EccPublicKey pubkey; | 104 | struct GNUNET_CRYPTO_EccPublicSignKey pubkey; |
105 | 105 | ||
106 | /* load privat key */ | 106 | /* load privat key */ |
107 | char *hostkey_file; | 107 | char *hostkey_file; |
@@ -113,7 +113,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
113 | GNUNET_assert (privkey != NULL); | 113 | GNUNET_assert (privkey != NULL); |
114 | struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get(); | 114 | struct GNUNET_TIME_Absolute expire = GNUNET_TIME_absolute_get(); |
115 | /* get public key */ | 115 | /* get public key */ |
116 | GNUNET_CRYPTO_ecc_key_get_public(privkey, &pubkey); | 116 | GNUNET_CRYPTO_ecc_key_get_public_for_signature(privkey, &pubkey); |
117 | 117 | ||
118 | /* create record */ | 118 | /* create record */ |
119 | s_name = "DUMMY.dummy.gnunet"; | 119 | s_name = "DUMMY.dummy.gnunet"; |
diff --git a/src/namestore/test_namestore_api_put.c b/src/namestore/test_namestore_api_put.c index f5adc7d85..6c7ca6b0f 100644 --- a/src/namestore/test_namestore_api_put.c +++ b/src/namestore/test_namestore_api_put.c | |||
@@ -44,7 +44,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | |||
44 | 44 | ||
45 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; | 45 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
46 | 46 | ||
47 | static struct GNUNET_CRYPTO_EccPublicKey pubkey; | 47 | static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; |
48 | 48 | ||
49 | static struct GNUNET_NAMESTORE_RecordData *s_rd; | 49 | static struct GNUNET_NAMESTORE_RecordData *s_rd; |
50 | 50 | ||
@@ -151,7 +151,7 @@ run (void *cls, | |||
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_ecc_key_get_public(privkey, &pubkey); | 154 | GNUNET_CRYPTO_ecc_key_get_public_for_signature(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 22ab2bca4..0b027b7e1 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -41,7 +41,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | |||
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; | 42 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EccPublicKey pubkey; | 44 | static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; |
45 | 45 | ||
46 | static struct GNUNET_HashCode derived_hash; | 46 | static struct GNUNET_HashCode derived_hash; |
47 | 47 | ||
@@ -263,7 +263,7 @@ run (void *cls, | |||
263 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); | 263 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); |
264 | GNUNET_free (hostkey_file); | 264 | GNUNET_free (hostkey_file); |
265 | GNUNET_assert (privkey != NULL); | 265 | GNUNET_assert (privkey != NULL); |
266 | GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey); | 266 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); |
267 | 267 | ||
268 | removed = GNUNET_NO; | 268 | removed = GNUNET_NO; |
269 | 269 | ||
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 396e69ff0..7c4dcc253 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c | |||
@@ -41,7 +41,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | |||
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; | 42 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EccPublicKey pubkey; | 44 | static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; |
45 | 45 | ||
46 | static int res; | 46 | static int res; |
47 | 47 | ||
@@ -152,7 +152,7 @@ run (void *cls, | |||
152 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); | 152 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); |
153 | GNUNET_free (hostkey_file); | 153 | GNUNET_free (hostkey_file); |
154 | GNUNET_assert (privkey != NULL); | 154 | GNUNET_assert (privkey != NULL); |
155 | GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey); | 155 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); |
156 | 156 | ||
157 | nsh = GNUNET_NAMESTORE_connect (cfg); | 157 | nsh = GNUNET_NAMESTORE_connect (cfg); |
158 | GNUNET_break (NULL != nsh); | 158 | GNUNET_break (NULL != nsh); |
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c index b85003c60..00a3a1a1c 100644 --- a/src/namestore/test_namestore_api_store.c +++ b/src/namestore/test_namestore_api_store.c | |||
@@ -41,7 +41,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | |||
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; | 42 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EccPublicKey pubkey; | 44 | static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; |
45 | 45 | ||
46 | static int res; | 46 | static int res; |
47 | 47 | ||
@@ -185,7 +185,7 @@ run (void *cls, | |||
185 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); | 185 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); |
186 | GNUNET_free (hostkey_file); | 186 | GNUNET_free (hostkey_file); |
187 | GNUNET_assert (privkey != NULL); | 187 | GNUNET_assert (privkey != NULL); |
188 | GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey); | 188 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); |
189 | 189 | ||
190 | 190 | ||
191 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | 191 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; |
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index 9455c6bd6..e36272fca 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c | |||
@@ -48,7 +48,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | |||
48 | 48 | ||
49 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; | 49 | static struct GNUNET_CRYPTO_EccPrivateKey *privkey; |
50 | 50 | ||
51 | static struct GNUNET_CRYPTO_EccPublicKey pubkey; | 51 | static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; |
52 | 52 | ||
53 | static int res; | 53 | static int res; |
54 | 54 | ||
@@ -222,7 +222,7 @@ run (void *cls, | |||
222 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); | 222 | privkey = GNUNET_CRYPTO_ecc_key_create_from_file (hostkey_file); |
223 | GNUNET_free (hostkey_file); | 223 | GNUNET_free (hostkey_file); |
224 | GNUNET_assert (privkey != NULL); | 224 | GNUNET_assert (privkey != NULL); |
225 | GNUNET_CRYPTO_ecc_key_get_public (privkey, &pubkey); | 225 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (privkey, &pubkey); |
226 | 226 | ||
227 | 227 | ||
228 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; | 228 | rd.expiration_time = GNUNET_TIME_absolute_get().abs_value_us; |
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c index 5e6cf5a4e..31a8eafa3 100644 --- a/src/namestore/test_namestore_api_zone_to_name.c +++ b/src/namestore/test_namestore_api_zone_to_name.c | |||
@@ -45,7 +45,7 @@ static GNUNET_SCHEDULER_TaskIdentifier endbadly_task; | |||
45 | 45 | ||
46 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; | 46 | static struct GNUNET_CRYPTO_EccPrivateKey * privkey; |
47 | 47 | ||
48 | static struct GNUNET_CRYPTO_EccPublicKey pubkey; | 48 | static struct GNUNET_CRYPTO_EccPublicSignKey pubkey; |
49 | 49 | ||
50 | static struct GNUNET_TIME_Absolute expire; | 50 | static struct GNUNET_TIME_Absolute expire; |
51 | 51 | ||
@@ -98,7 +98,7 @@ 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_EccPublicKey *zone_key, | 101 | const struct GNUNET_CRYPTO_EccPublicSignKey *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, |
@@ -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_EccPublicKey)))) | 128 | if ((zone_key == NULL) || (0 != memcmp (zone_key, &pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)))) |
129 | { | 129 | { |
130 | fail = GNUNET_YES; | 130 | fail = GNUNET_YES; |
131 | GNUNET_break (0); | 131 | GNUNET_break (0); |
@@ -179,10 +179,10 @@ run (void *cls, | |||
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_ecc_key_get_public(privkey, &pubkey); | 182 | GNUNET_CRYPTO_ecc_key_get_public_for_signature(privkey, &pubkey); |
183 | 183 | ||
184 | /* zone hash */ | 184 | /* zone hash */ |
185 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicKey), &s_zone); | 185 | GNUNET_CRYPTO_short_hash (&pubkey, sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), &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_NAMESTORE_short_h2s (&s_zone_value)); | 187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using PKEY `%s' \n", GNUNET_NAMESTORE_short_h2s (&s_zone_value)); |
188 | 188 | ||