aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-gns-helper-service-w32.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-05-29 08:18:55 +0000
committerChristian Grothoff <christian@grothoff.org>2013-05-29 08:18:55 +0000
commit022002438e4047d235a688cfd9da7b63ab990103 (patch)
tree8d0cb444a3ab376b5a8f614fb87bdeb31e7b3327 /src/gns/gnunet-gns-helper-service-w32.c
parentb62eb443ee3af84f87030fad9fd11a948b1a2503 (diff)
downloadgnunet-022002438e4047d235a688cfd9da7b63ab990103.tar.gz
gnunet-022002438e4047d235a688cfd9da7b63ab990103.zip
-switching GNS from RSA to ECC
Diffstat (limited to 'src/gns/gnunet-gns-helper-service-w32.c')
-rw-r--r--src/gns/gnunet-gns-helper-service-w32.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gns/gnunet-gns-helper-service-w32.c b/src/gns/gnunet-gns-helper-service-w32.c
index 72956c854..44ae87b84 100644
--- a/src/gns/gnunet-gns-helper-service-w32.c
+++ b/src/gns/gnunet-gns-helper-service-w32.c
@@ -63,7 +63,7 @@ static struct GNUNET_GNS_Handle *gns;
63 63
64static struct GNUNET_CRYPTO_ShortHashCode *zone = NULL; 64static struct GNUNET_CRYPTO_ShortHashCode *zone = NULL;
65static struct GNUNET_CRYPTO_ShortHashCode user_zone; 65static struct GNUNET_CRYPTO_ShortHashCode user_zone;
66struct GNUNET_CRYPTO_RsaPrivateKey *shorten_key = NULL; 66struct GNUNET_CRYPTO_EccPrivateKey *shorten_key = NULL;
67 67
68 68
69/** 69/**
@@ -670,8 +670,8 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
670 }; 670 };
671 671
672 char* keyfile; 672 char* keyfile;
673 struct GNUNET_CRYPTO_RsaPrivateKey *key = NULL; 673 struct GNUNET_CRYPTO_EccPrivateKey *key = NULL;
674 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; 674 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pkey;
675 struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; 675 struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename;
676 676
677 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", 677 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
@@ -685,16 +685,16 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
685 { 685 {
686 if (GNUNET_YES == GNUNET_DISK_file_test (keyfile)) 686 if (GNUNET_YES == GNUNET_DISK_file_test (keyfile))
687 { 687 {
688 key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); 688 key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
689 GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); 689 GNUNET_CRYPTO_ecc_key_get_public (key, &pkey);
690 GNUNET_CRYPTO_short_hash(&pkey, 690 GNUNET_CRYPTO_short_hash(&pkey,
691 sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 691 sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded),
692 &user_zone); 692 &user_zone);
693 zone = &user_zone; 693 zone = &user_zone;
694 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); 694 GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename);
695 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 695 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
696 "Using zone: %s!\n", &zonename); 696 "Using zone: %s!\n", &zonename);
697 GNUNET_CRYPTO_rsa_key_free(key); 697 GNUNET_CRYPTO_ecc_key_free(key);
698 } 698 }
699 GNUNET_free(keyfile); 699 GNUNET_free(keyfile);
700 } 700 }
@@ -710,7 +710,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
710 { 710 {
711 if (GNUNET_YES == GNUNET_DISK_file_test (keyfile)) 711 if (GNUNET_YES == GNUNET_DISK_file_test (keyfile))
712 { 712 {
713 shorten_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); 713 shorten_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
714 } 714 }
715 GNUNET_free(keyfile); 715 GNUNET_free(keyfile);
716 } 716 }