aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-namestore-fcfsd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-10 14:38:55 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-10 14:38:55 +0000
commit9351b1e9bdf2b067b6db06562c26ba658cff42b8 (patch)
tree68dc4ab447e7e8b6a20a706858cd36238c1c7c5f /src/namestore/gnunet-namestore-fcfsd.c
parent8beabcd96c0cf1e1873c0b5ff96e537f1beb0b34 (diff)
downloadgnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.tar.gz
gnunet-9351b1e9bdf2b067b6db06562c26ba658cff42b8.zip
separating ECC crypto into functions/structs for ECDHE, ECDSA and EDDSA
Diffstat (limited to 'src/namestore/gnunet-namestore-fcfsd.c')
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c
index 7455c0ba5..08f03a055 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -196,7 +196,7 @@ static struct GNUNET_NAMESTORE_Handle *ns;
196/** 196/**
197 * Private key for the fcfsd zone. 197 * Private key for the fcfsd zone.
198 */ 198 */
199static struct GNUNET_CRYPTO_EccPrivateKey fcfs_zone_pkey; 199static struct GNUNET_CRYPTO_EcdsaPrivateKey fcfs_zone_pkey;
200 200
201/** 201/**
202 * Connection to identity service. 202 * Connection to identity service.
@@ -242,7 +242,7 @@ run_httpd_now ()
242 242
243static void 243static void
244iterate_cb (void *cls, 244iterate_cb (void *cls,
245 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 245 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
246 const char *name, 246 const char *name,
247 unsigned int rd_len, 247 unsigned int rd_len,
248 const struct GNUNET_NAMESTORE_RecordData *rd) 248 const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -504,14 +504,14 @@ put_continuation (void *cls,
504 */ 504 */
505static void 505static void
506zone_to_name_cb (void *cls, 506zone_to_name_cb (void *cls,
507 const struct GNUNET_CRYPTO_EccPrivateKey *zone_key, 507 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
508 const char *name, 508 const char *name,
509 unsigned int rd_count, 509 unsigned int rd_count,
510 const struct GNUNET_NAMESTORE_RecordData *rd) 510 const struct GNUNET_NAMESTORE_RecordData *rd)
511{ 511{
512 struct Request *request = cls; 512 struct Request *request = cls;
513 struct GNUNET_NAMESTORE_RecordData r; 513 struct GNUNET_NAMESTORE_RecordData r;
514 struct GNUNET_CRYPTO_EccPublicSignKey pub; 514 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
515 515
516 request->qe = NULL; 516 request->qe = NULL;
517 if (NULL != name) 517 if (NULL != name)
@@ -523,7 +523,7 @@ zone_to_name_cb (void *cls,
523 run_httpd_now (); 523 run_httpd_now ();
524 return; 524 return;
525 } 525 }
526 GNUNET_CRYPTO_ecc_key_get_public_for_signature (zone_key, 526 GNUNET_CRYPTO_ecdsa_key_get_public (zone_key,
527 &pub); 527 &pub);
528 r.data = &pub; 528 r.data = &pub;
529 r.data_size = sizeof (pub); 529 r.data_size = sizeof (pub);
@@ -554,7 +554,7 @@ lookup_result_processor (void *cls,
554 const struct GNUNET_NAMESTORE_RecordData *rd) 554 const struct GNUNET_NAMESTORE_RecordData *rd)
555{ 555{
556 struct Request *request = cls; 556 struct Request *request = cls;
557 struct GNUNET_CRYPTO_EccPublicSignKey pub; 557 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
558 558
559 if (0 != rd_count) 559 if (0 != rd_count)
560 { 560 {
@@ -567,7 +567,7 @@ lookup_result_processor (void *cls,
567 return; 567 return;
568 } 568 }
569 if (GNUNET_OK != 569 if (GNUNET_OK !=
570 GNUNET_CRYPTO_ecc_public_sign_key_from_string (request->public_key, 570 GNUNET_CRYPTO_ecdsa_public_key_from_string (request->public_key,
571 strlen (request->public_key), 571 strlen (request->public_key),
572 &pub)) 572 &pub))
573 { 573 {
@@ -596,7 +596,7 @@ lookup_block_processor (void *cls,
596 const struct GNUNET_NAMESTORE_Block *block) 596 const struct GNUNET_NAMESTORE_Block *block)
597{ 597{
598 struct Request *request = cls; 598 struct Request *request = cls;
599 struct GNUNET_CRYPTO_EccPublicSignKey pub; 599 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
600 600
601 request->qe = NULL; 601 request->qe = NULL;
602 if (NULL == block) 602 if (NULL == block)
@@ -604,7 +604,7 @@ lookup_block_processor (void *cls,
604 lookup_result_processor (request, 0, NULL); 604 lookup_result_processor (request, 0, NULL);
605 return; 605 return;
606 } 606 }
607 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&fcfs_zone_pkey, 607 GNUNET_CRYPTO_ecdsa_key_get_public (&fcfs_zone_pkey,
608 &pub); 608 &pub);
609 if (GNUNET_OK != 609 if (GNUNET_OK !=
610 GNUNET_NAMESTORE_block_decrypt (block, 610 GNUNET_NAMESTORE_block_decrypt (block,
@@ -657,7 +657,7 @@ create_response (void *cls,
657 struct MHD_Response *response; 657 struct MHD_Response *response;
658 struct Request *request; 658 struct Request *request;
659 int ret; 659 int ret;
660 struct GNUNET_CRYPTO_EccPublicSignKey pub; 660 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
661 struct GNUNET_HashCode query; 661 struct GNUNET_HashCode query;
662 662
663 if ( (0 == strcmp (method, MHD_HTTP_METHOD_GET)) || 663 if ( (0 == strcmp (method, MHD_HTTP_METHOD_GET)) ||
@@ -707,7 +707,7 @@ create_response (void *cls,
707 request->pp = NULL; 707 request->pp = NULL;
708 } 708 }
709 if (GNUNET_OK != 709 if (GNUNET_OK !=
710 GNUNET_CRYPTO_ecc_public_sign_key_from_string (request->public_key, 710 GNUNET_CRYPTO_ecdsa_public_key_from_string (request->public_key,
711 strlen (request->public_key), 711 strlen (request->public_key),
712 &pub)) 712 &pub))
713 { 713 {
@@ -735,7 +735,7 @@ create_response (void *cls,
735 request, connection); 735 request, connection);
736 } 736 }
737 request->phase = RP_LOOKUP; 737 request->phase = RP_LOOKUP;
738 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&fcfs_zone_pkey, 738 GNUNET_CRYPTO_ecdsa_key_get_public (&fcfs_zone_pkey,
739 &pub); 739 &pub);
740 GNUNET_NAMESTORE_query_from_public_key (&pub, 740 GNUNET_NAMESTORE_query_from_public_key (&pub,
741 request->domain_name, 741 request->domain_name,
@@ -1030,7 +1030,7 @@ main (int argc, char *const *argv)
1030 options, 1030 options,
1031 &run, NULL)) ? 0 : 1; 1031 &run, NULL)) ? 0 : 1;
1032 GNUNET_free ((void*) argv); 1032 GNUNET_free ((void*) argv);
1033 GNUNET_CRYPTO_ecc_key_clear (&fcfs_zone_pkey); 1033 GNUNET_CRYPTO_ecdsa_key_clear (&fcfs_zone_pkey);
1034 return ret; 1034 return ret;
1035} 1035}
1036 1036