diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-05-29 08:18:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-05-29 08:18:55 +0000 |
commit | 022002438e4047d235a688cfd9da7b63ab990103 (patch) | |
tree | 8d0cb444a3ab376b5a8f614fb87bdeb31e7b3327 /src/gns | |
parent | b62eb443ee3af84f87030fad9fd11a948b1a2503 (diff) | |
download | gnunet-022002438e4047d235a688cfd9da7b63ab990103.tar.gz gnunet-022002438e4047d235a688cfd9da7b63ab990103.zip |
-switching GNS from RSA to ECC
Diffstat (limited to 'src/gns')
28 files changed, 319 insertions, 314 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 03eab7b4e..bb8f0bf41 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -224,9 +224,11 @@ check_PROGRAMS = \ | |||
224 | 224 | ||
225 | if ENABLE_TEST_RUN | 225 | if ENABLE_TEST_RUN |
226 | if LINUX | 226 | if LINUX |
227 | if HAVE_SQLITE | ||
227 | TESTS = $(check_PROGRAMS) | 228 | TESTS = $(check_PROGRAMS) |
228 | endif | 229 | endif |
229 | endif | 230 | endif |
231 | endif | ||
230 | 232 | ||
231 | 233 | ||
232 | #test_gns_proxy_SOURCES = \ | 234 | #test_gns_proxy_SOURCES = \ |
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 1e3cb0169..fe378a922 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -823,7 +823,7 @@ GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle, | |||
823 | struct GNUNET_CRYPTO_ShortHashCode *zone, | 823 | struct GNUNET_CRYPTO_ShortHashCode *zone, |
824 | enum GNUNET_GNS_RecordType type, | 824 | enum GNUNET_GNS_RecordType type, |
825 | int only_cached, | 825 | int only_cached, |
826 | struct GNUNET_CRYPTO_RsaPrivateKey *shorten_key, | 826 | struct GNUNET_CRYPTO_EccPrivateKey *shorten_key, |
827 | GNUNET_GNS_LookupResultProcessor proc, | 827 | GNUNET_GNS_LookupResultProcessor proc, |
828 | void *proc_cls) | 828 | void *proc_cls) |
829 | { | 829 | { |
@@ -832,7 +832,7 @@ GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle, | |||
832 | struct GNUNET_GNS_LookupRequest *lr; | 832 | struct GNUNET_GNS_LookupRequest *lr; |
833 | size_t msize; | 833 | size_t msize; |
834 | struct PendingMessage *pending; | 834 | struct PendingMessage *pending; |
835 | struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded *pkey_enc; | 835 | struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded *pkey_enc; |
836 | size_t key_len; | 836 | size_t key_len; |
837 | char* pkey_tmp; | 837 | char* pkey_tmp; |
838 | 838 | ||
@@ -843,9 +843,9 @@ GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle, | |||
843 | } | 843 | } |
844 | if (NULL != shorten_key) | 844 | if (NULL != shorten_key) |
845 | { | 845 | { |
846 | pkey_enc = GNUNET_CRYPTO_rsa_encode_key (shorten_key); | 846 | pkey_enc = GNUNET_CRYPTO_ecc_encode_key (shorten_key); |
847 | GNUNET_assert (pkey_enc != NULL); | 847 | GNUNET_assert (pkey_enc != NULL); |
848 | key_len = ntohs (pkey_enc->len); | 848 | key_len = ntohs (pkey_enc->size); |
849 | } | 849 | } |
850 | else | 850 | else |
851 | { | 851 | { |
@@ -927,7 +927,7 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, | |||
927 | const char *name, | 927 | const char *name, |
928 | enum GNUNET_GNS_RecordType type, | 928 | enum GNUNET_GNS_RecordType type, |
929 | int only_cached, | 929 | int only_cached, |
930 | struct GNUNET_CRYPTO_RsaPrivateKey *shorten_key, | 930 | struct GNUNET_CRYPTO_EccPrivateKey *shorten_key, |
931 | GNUNET_GNS_LookupResultProcessor proc, | 931 | GNUNET_GNS_LookupResultProcessor proc, |
932 | void *proc_cls) | 932 | void *proc_cls) |
933 | { | 933 | { |
diff --git a/src/gns/gnunet-gns-fcfsd.c b/src/gns/gnunet-gns-fcfsd.c index d55396459..9ea69a87d 100644 --- a/src/gns/gnunet-gns-fcfsd.c +++ b/src/gns/gnunet-gns-fcfsd.c | |||
@@ -199,7 +199,7 @@ static struct GNUNET_CRYPTO_ShortHashCode fcfsd_zone; | |||
199 | /** | 199 | /** |
200 | * Private key for the fcfsd zone. | 200 | * Private key for the fcfsd zone. |
201 | */ | 201 | */ |
202 | static struct GNUNET_CRYPTO_RsaPrivateKey *fcfs_zone_pkey; | 202 | static struct GNUNET_CRYPTO_EccPrivateKey *fcfs_zone_pkey; |
203 | 203 | ||
204 | 204 | ||
205 | /** | 205 | /** |
@@ -229,12 +229,12 @@ run_httpd_now () | |||
229 | 229 | ||
230 | static void | 230 | static void |
231 | iterate_cb (void *cls, | 231 | iterate_cb (void *cls, |
232 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 232 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
233 | struct GNUNET_TIME_Absolute expire, | 233 | struct GNUNET_TIME_Absolute expire, |
234 | const char *name, | 234 | const char *name, |
235 | unsigned int rd_len, | 235 | unsigned int rd_len, |
236 | const struct GNUNET_NAMESTORE_RecordData *rd, | 236 | const struct GNUNET_NAMESTORE_RecordData *rd, |
237 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 237 | const struct GNUNET_CRYPTO_EccSignature *signature) |
238 | { | 238 | { |
239 | struct ZoneinfoRequest *zr = cls; | 239 | struct ZoneinfoRequest *zr = cls; |
240 | struct MHD_Response *response; | 240 | struct MHD_Response *response; |
@@ -506,12 +506,12 @@ put_continuation (void *cls, | |||
506 | */ | 506 | */ |
507 | static void | 507 | static void |
508 | zone_to_name_cb (void *cls, | 508 | zone_to_name_cb (void *cls, |
509 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 509 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
510 | struct GNUNET_TIME_Absolute expire, | 510 | struct GNUNET_TIME_Absolute expire, |
511 | const char *name, | 511 | const char *name, |
512 | unsigned int rd_count, | 512 | unsigned int rd_count, |
513 | const struct GNUNET_NAMESTORE_RecordData *rd, | 513 | const struct GNUNET_NAMESTORE_RecordData *rd, |
514 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 514 | const struct GNUNET_CRYPTO_EccSignature *signature) |
515 | { | 515 | { |
516 | struct Request *request = cls; | 516 | struct Request *request = cls; |
517 | struct GNUNET_NAMESTORE_RecordData r; | 517 | struct GNUNET_NAMESTORE_RecordData r; |
@@ -565,12 +565,12 @@ zone_to_name_cb (void *cls, | |||
565 | */ | 565 | */ |
566 | static void | 566 | static void |
567 | lookup_result_processor (void *cls, | 567 | lookup_result_processor (void *cls, |
568 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 568 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
569 | struct GNUNET_TIME_Absolute expire, | 569 | struct GNUNET_TIME_Absolute expire, |
570 | const char *name, | 570 | const char *name, |
571 | unsigned int rd_count, | 571 | unsigned int rd_count, |
572 | const struct GNUNET_NAMESTORE_RecordData *rd, | 572 | const struct GNUNET_NAMESTORE_RecordData *rd, |
573 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 573 | const struct GNUNET_CRYPTO_EccSignature *signature) |
574 | { | 574 | { |
575 | struct Request *request = cls; | 575 | struct Request *request = cls; |
576 | struct GNUNET_CRYPTO_ShortHashCode pub; | 576 | struct GNUNET_CRYPTO_ShortHashCode pub; |
@@ -862,7 +862,7 @@ do_shutdown (void *cls, | |||
862 | } | 862 | } |
863 | if (NULL != fcfs_zone_pkey) | 863 | if (NULL != fcfs_zone_pkey) |
864 | { | 864 | { |
865 | GNUNET_CRYPTO_rsa_key_free (fcfs_zone_pkey); | 865 | GNUNET_CRYPTO_ecc_key_free (fcfs_zone_pkey); |
866 | fcfs_zone_pkey = NULL; | 866 | fcfs_zone_pkey = NULL; |
867 | } | 867 | } |
868 | } | 868 | } |
@@ -882,7 +882,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
882 | { | 882 | { |
883 | char *keyfile; | 883 | char *keyfile; |
884 | unsigned long long port; | 884 | unsigned long long port; |
885 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; | 885 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pub; |
886 | 886 | ||
887 | if (GNUNET_OK != | 887 | if (GNUNET_OK != |
888 | GNUNET_CONFIGURATION_get_value_number (cfg, | 888 | GNUNET_CONFIGURATION_get_value_number (cfg, |
@@ -904,7 +904,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
904 | "fcfsd", "ZONEKEY"); | 904 | "fcfsd", "ZONEKEY"); |
905 | return; | 905 | return; |
906 | } | 906 | } |
907 | fcfs_zone_pkey = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 907 | fcfs_zone_pkey = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
908 | GNUNET_free (keyfile); | 908 | GNUNET_free (keyfile); |
909 | if (NULL == fcfs_zone_pkey) | 909 | if (NULL == fcfs_zone_pkey) |
910 | { | 910 | { |
@@ -912,7 +912,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
912 | _("Failed to read or create private zone key\n")); | 912 | _("Failed to read or create private zone key\n")); |
913 | return; | 913 | return; |
914 | } | 914 | } |
915 | GNUNET_CRYPTO_rsa_key_get_public (fcfs_zone_pkey, | 915 | GNUNET_CRYPTO_ecc_key_get_public (fcfs_zone_pkey, |
916 | &pub); | 916 | &pub); |
917 | GNUNET_CRYPTO_short_hash (&pub, sizeof (pub), &fcfsd_zone); | 917 | GNUNET_CRYPTO_short_hash (&pub, sizeof (pub), &fcfsd_zone); |
918 | ns = GNUNET_NAMESTORE_connect (cfg); | 918 | ns = GNUNET_NAMESTORE_connect (cfg); |
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 | ||
64 | static struct GNUNET_CRYPTO_ShortHashCode *zone = NULL; | 64 | static struct GNUNET_CRYPTO_ShortHashCode *zone = NULL; |
65 | static struct GNUNET_CRYPTO_ShortHashCode user_zone; | 65 | static struct GNUNET_CRYPTO_ShortHashCode user_zone; |
66 | struct GNUNET_CRYPTO_RsaPrivateKey *shorten_key = NULL; | 66 | struct 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 | } |
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 7b783787b..0135fea34 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -459,7 +459,7 @@ static struct GNUNET_NETWORK_Handle *mhd_unix_socket; | |||
459 | #endif | 459 | #endif |
460 | 460 | ||
461 | /* Shorten zone private key */ | 461 | /* Shorten zone private key */ |
462 | static struct GNUNET_CRYPTO_RsaPrivateKey *shorten_zonekey; | 462 | static struct GNUNET_CRYPTO_EccPrivateKey *shorten_zonekey; |
463 | 463 | ||
464 | 464 | ||
465 | /** | 465 | /** |
@@ -3188,8 +3188,8 @@ static int | |||
3188 | load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg) | 3188 | load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg) |
3189 | { | 3189 | { |
3190 | char *keyfile; | 3190 | char *keyfile; |
3191 | struct GNUNET_CRYPTO_RsaPrivateKey *key; | 3191 | struct GNUNET_CRYPTO_EccPrivateKey *key; |
3192 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; | 3192 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pkey; |
3193 | struct GNUNET_CRYPTO_ShortHashCode *zone; | 3193 | struct GNUNET_CRYPTO_ShortHashCode *zone; |
3194 | struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; | 3194 | struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; |
3195 | 3195 | ||
@@ -3209,17 +3209,17 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
3209 | return GNUNET_NO; | 3209 | return GNUNET_NO; |
3210 | } | 3210 | } |
3211 | 3211 | ||
3212 | key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 3212 | key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
3213 | GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); | 3213 | GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); |
3214 | local_gns_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); | 3214 | local_gns_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); |
3215 | GNUNET_CRYPTO_short_hash(&pkey, | 3215 | GNUNET_CRYPTO_short_hash(&pkey, |
3216 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 3216 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
3217 | local_gns_zone); | 3217 | local_gns_zone); |
3218 | zone = local_gns_zone; | 3218 | zone = local_gns_zone; |
3219 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); | 3219 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); |
3220 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3220 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3221 | "Using zone: %s!\n", &zonename); | 3221 | "Using zone: %s!\n", &zonename); |
3222 | GNUNET_CRYPTO_rsa_key_free(key); | 3222 | GNUNET_CRYPTO_ecc_key_free(key); |
3223 | GNUNET_free(keyfile); | 3223 | GNUNET_free(keyfile); |
3224 | keyfile = NULL; | 3224 | keyfile = NULL; |
3225 | 3225 | ||
@@ -3238,16 +3238,16 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
3238 | } | 3238 | } |
3239 | else | 3239 | else |
3240 | { | 3240 | { |
3241 | key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 3241 | key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
3242 | GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); | 3242 | GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); |
3243 | local_private_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); | 3243 | local_private_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); |
3244 | GNUNET_CRYPTO_short_hash(&pkey, | 3244 | GNUNET_CRYPTO_short_hash(&pkey, |
3245 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 3245 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
3246 | local_private_zone); | 3246 | local_private_zone); |
3247 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); | 3247 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); |
3248 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3248 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3249 | "Using private zone: %s!\n", &zonename); | 3249 | "Using private zone: %s!\n", &zonename); |
3250 | GNUNET_CRYPTO_rsa_key_free(key); | 3250 | GNUNET_CRYPTO_ecc_key_free(key); |
3251 | GNUNET_free(keyfile); | 3251 | GNUNET_free(keyfile); |
3252 | } | 3252 | } |
3253 | keyfile = NULL; | 3253 | keyfile = NULL; |
@@ -3267,16 +3267,16 @@ load_local_zone_key (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
3267 | } | 3267 | } |
3268 | else | 3268 | else |
3269 | { | 3269 | { |
3270 | key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 3270 | key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
3271 | GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); | 3271 | GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); |
3272 | local_shorten_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); | 3272 | local_shorten_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); |
3273 | GNUNET_CRYPTO_short_hash(&pkey, | 3273 | GNUNET_CRYPTO_short_hash(&pkey, |
3274 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 3274 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
3275 | local_shorten_zone); | 3275 | local_shorten_zone); |
3276 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); | 3276 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); |
3277 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3277 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3278 | "Using shorten zone: %s!\n", &zonename); | 3278 | "Using shorten zone: %s!\n", &zonename); |
3279 | GNUNET_CRYPTO_rsa_key_free(key); | 3279 | GNUNET_CRYPTO_ecc_key_free(key); |
3280 | GNUNET_free(keyfile); | 3280 | GNUNET_free(keyfile); |
3281 | } | 3281 | } |
3282 | 3282 | ||
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index 74212d4fc..542a8106d 100644 --- a/src/gns/gnunet-gns.c +++ b/src/gns/gnunet-gns.c | |||
@@ -204,13 +204,13 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
204 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 204 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
205 | { | 205 | { |
206 | char* keyfile; | 206 | char* keyfile; |
207 | struct GNUNET_CRYPTO_RsaPrivateKey *key = NULL; | 207 | struct GNUNET_CRYPTO_EccPrivateKey *key = NULL; |
208 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; | 208 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pkey; |
209 | struct GNUNET_CRYPTO_ShortHashCode *zone = NULL; | 209 | struct GNUNET_CRYPTO_ShortHashCode *zone = NULL; |
210 | struct GNUNET_CRYPTO_ShortHashCode user_zone; | 210 | struct GNUNET_CRYPTO_ShortHashCode user_zone; |
211 | struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; | 211 | struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; |
212 | struct GNUNET_CRYPTO_RsaPrivateKey *shorten_key = NULL; | 212 | struct GNUNET_CRYPTO_EccPrivateKey *shorten_key = NULL; |
213 | struct GNUNET_CRYPTO_RsaPrivateKey *private_key = NULL; | 213 | struct GNUNET_CRYPTO_EccPrivateKey *private_key = NULL; |
214 | struct GNUNET_CRYPTO_ShortHashCode *private_zone = NULL; | 214 | struct GNUNET_CRYPTO_ShortHashCode *private_zone = NULL; |
215 | struct GNUNET_CRYPTO_ShortHashCode *shorten_zone = NULL; | 215 | struct GNUNET_CRYPTO_ShortHashCode *shorten_zone = NULL; |
216 | 216 | ||
@@ -230,17 +230,17 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
230 | } | 230 | } |
231 | else | 231 | else |
232 | { | 232 | { |
233 | key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 233 | key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
234 | GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); | 234 | GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); |
235 | GNUNET_CRYPTO_short_hash (&pkey, | 235 | GNUNET_CRYPTO_short_hash (&pkey, |
236 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 236 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
237 | &user_zone); | 237 | &user_zone); |
238 | zone = &user_zone; | 238 | zone = &user_zone; |
239 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); | 239 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); |
240 | if (!raw) | 240 | if (!raw) |
241 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 241 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
242 | "Using zone: %s!\n", &zonename); | 242 | "Using zone: %s!\n", &zonename); |
243 | GNUNET_CRYPTO_rsa_key_free (key); | 243 | GNUNET_CRYPTO_ecc_key_free (key); |
244 | GNUNET_free(keyfile); | 244 | GNUNET_free(keyfile); |
245 | } | 245 | } |
246 | 246 | ||
@@ -253,11 +253,11 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
253 | } | 253 | } |
254 | else | 254 | else |
255 | { | 255 | { |
256 | shorten_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 256 | shorten_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
257 | GNUNET_CRYPTO_rsa_key_get_public (shorten_key, &pkey); | 257 | GNUNET_CRYPTO_ecc_key_get_public (shorten_key, &pkey); |
258 | shorten_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); | 258 | shorten_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); |
259 | GNUNET_CRYPTO_short_hash(&pkey, | 259 | GNUNET_CRYPTO_short_hash(&pkey, |
260 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 260 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
261 | shorten_zone); | 261 | shorten_zone); |
262 | GNUNET_CRYPTO_short_hash_to_enc (shorten_zone, &zonename); | 262 | GNUNET_CRYPTO_short_hash_to_enc (shorten_zone, &zonename); |
263 | if (! raw) | 263 | if (! raw) |
@@ -275,17 +275,17 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
275 | } | 275 | } |
276 | else | 276 | else |
277 | { | 277 | { |
278 | private_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 278 | private_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
279 | GNUNET_CRYPTO_rsa_key_get_public (private_key, &pkey); | 279 | GNUNET_CRYPTO_ecc_key_get_public (private_key, &pkey); |
280 | private_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); | 280 | private_zone = GNUNET_malloc (sizeof (struct GNUNET_CRYPTO_ShortHashCode)); |
281 | GNUNET_CRYPTO_short_hash(&pkey, | 281 | GNUNET_CRYPTO_short_hash(&pkey, |
282 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 282 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
283 | private_zone); | 283 | private_zone); |
284 | GNUNET_CRYPTO_short_hash_to_enc (private_zone, &zonename); | 284 | GNUNET_CRYPTO_short_hash_to_enc (private_zone, &zonename); |
285 | if (! raw) | 285 | if (! raw) |
286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 286 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
287 | "Using private zone: %s!\n", &zonename); | 287 | "Using private zone: %s!\n", &zonename); |
288 | GNUNET_CRYPTO_rsa_key_free (private_key); | 288 | GNUNET_CRYPTO_ecc_key_free (private_key); |
289 | } | 289 | } |
290 | 290 | ||
291 | if (NULL != lookup_type) | 291 | if (NULL != lookup_type) |
@@ -321,7 +321,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
321 | } | 321 | } |
322 | 322 | ||
323 | if (NULL != shorten_key) | 323 | if (NULL != shorten_key) |
324 | GNUNET_CRYPTO_rsa_key_free (shorten_key); | 324 | GNUNET_CRYPTO_ecc_key_free (shorten_key); |
325 | if (NULL != shorten_zone) | 325 | if (NULL != shorten_zone) |
326 | GNUNET_free (shorten_zone); | 326 | GNUNET_free (shorten_zone); |
327 | if (NULL != private_zone) | 327 | if (NULL != private_zone) |
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 16887c62d..517722643 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -168,7 +168,7 @@ struct ClientLookupHandle | |||
168 | /** | 168 | /** |
169 | * optional zone private key used for shorten | 169 | * optional zone private key used for shorten |
170 | */ | 170 | */ |
171 | struct GNUNET_CRYPTO_RsaPrivateKey *shorten_key; | 171 | struct GNUNET_CRYPTO_EccPrivateKey *shorten_key; |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * the name to look up | 174 | * the name to look up |
@@ -205,7 +205,7 @@ static struct GNUNET_DHT_Handle *dht_handle; | |||
205 | /** | 205 | /** |
206 | * Our zone's private key | 206 | * Our zone's private key |
207 | */ | 207 | */ |
208 | static struct GNUNET_CRYPTO_RsaPrivateKey *zone_key; | 208 | static struct GNUNET_CRYPTO_EccPrivateKey *zone_key; |
209 | 209 | ||
210 | /** | 210 | /** |
211 | * Our handle to the namestore service | 211 | * Our handle to the namestore service |
@@ -382,12 +382,12 @@ publish_zone_dht_start (void *cls, | |||
382 | */ | 382 | */ |
383 | static void | 383 | static void |
384 | put_gns_record (void *cls, | 384 | put_gns_record (void *cls, |
385 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 385 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
386 | struct GNUNET_TIME_Absolute expiration, | 386 | struct GNUNET_TIME_Absolute expiration, |
387 | const char *name, | 387 | const char *name, |
388 | unsigned int rd_count, | 388 | unsigned int rd_count, |
389 | const struct GNUNET_NAMESTORE_RecordData *rd, | 389 | const struct GNUNET_NAMESTORE_RecordData *rd, |
390 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 390 | const struct GNUNET_CRYPTO_EccSignature *signature) |
391 | { | 391 | { |
392 | struct GNSNameRecordBlock *nrb; | 392 | struct GNSNameRecordBlock *nrb; |
393 | struct GNUNET_CRYPTO_ShortHashCode zhash; | 393 | struct GNUNET_CRYPTO_ShortHashCode zhash; |
@@ -475,7 +475,7 @@ put_gns_record (void *cls, | |||
475 | nrb_data += namelen; | 475 | nrb_data += namelen; |
476 | rd_payload_length += sizeof(struct GNSNameRecordBlock) + namelen; | 476 | rd_payload_length += sizeof(struct GNSNameRecordBlock) + namelen; |
477 | GNUNET_CRYPTO_short_hash (key, | 477 | GNUNET_CRYPTO_short_hash (key, |
478 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 478 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
479 | &zhash); | 479 | &zhash); |
480 | if (-1 == GNUNET_NAMESTORE_records_serialize (rd_count, | 480 | if (-1 == GNUNET_NAMESTORE_records_serialize (rd_count, |
481 | rd, | 481 | rd, |
@@ -626,12 +626,12 @@ send_shorten_response (void* cls, const char* name) | |||
626 | */ | 626 | */ |
627 | static void | 627 | static void |
628 | process_shorten_in_private_zone_lookup (void *cls, | 628 | process_shorten_in_private_zone_lookup (void *cls, |
629 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 629 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
630 | struct GNUNET_TIME_Absolute expiration, | 630 | struct GNUNET_TIME_Absolute expiration, |
631 | const char *name, | 631 | const char *name, |
632 | unsigned int rd_count, | 632 | unsigned int rd_count, |
633 | const struct GNUNET_NAMESTORE_RecordData *rd, | 633 | const struct GNUNET_NAMESTORE_RecordData *rd, |
634 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 634 | const struct GNUNET_CRYPTO_EccSignature *signature) |
635 | { | 635 | { |
636 | struct ClientShortenHandle *csh = cls; | 636 | struct ClientShortenHandle *csh = cls; |
637 | struct GNUNET_CRYPTO_ShortHashCode *szone = &csh->shorten_zone; | 637 | struct GNUNET_CRYPTO_ShortHashCode *szone = &csh->shorten_zone; |
@@ -682,12 +682,12 @@ process_shorten_in_private_zone_lookup (void *cls, | |||
682 | */ | 682 | */ |
683 | static void | 683 | static void |
684 | process_shorten_in_root_zone_lookup (void *cls, | 684 | process_shorten_in_root_zone_lookup (void *cls, |
685 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 685 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
686 | struct GNUNET_TIME_Absolute expiration, | 686 | struct GNUNET_TIME_Absolute expiration, |
687 | const char *name, | 687 | const char *name, |
688 | unsigned int rd_count, | 688 | unsigned int rd_count, |
689 | const struct GNUNET_NAMESTORE_RecordData *rd, | 689 | const struct GNUNET_NAMESTORE_RecordData *rd, |
690 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 690 | const struct GNUNET_CRYPTO_EccSignature *signature) |
691 | { | 691 | { |
692 | struct ClientShortenHandle *csh = cls; | 692 | struct ClientShortenHandle *csh = cls; |
693 | struct GNUNET_CRYPTO_ShortHashCode *szone = &csh->shorten_zone; | 693 | struct GNUNET_CRYPTO_ShortHashCode *szone = &csh->shorten_zone; |
@@ -738,12 +738,12 @@ process_shorten_in_root_zone_lookup (void *cls, | |||
738 | */ | 738 | */ |
739 | static void | 739 | static void |
740 | process_private_in_root_zone_lookup (void *cls, | 740 | process_private_in_root_zone_lookup (void *cls, |
741 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 741 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
742 | struct GNUNET_TIME_Absolute expiration, | 742 | struct GNUNET_TIME_Absolute expiration, |
743 | const char *name, | 743 | const char *name, |
744 | unsigned int rd_count, | 744 | unsigned int rd_count, |
745 | const struct GNUNET_NAMESTORE_RecordData *rd, | 745 | const struct GNUNET_NAMESTORE_RecordData *rd, |
746 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 746 | const struct GNUNET_CRYPTO_EccSignature *signature) |
747 | { | 747 | { |
748 | struct ClientShortenHandle *csh = cls; | 748 | struct ClientShortenHandle *csh = cls; |
749 | 749 | ||
@@ -1036,7 +1036,7 @@ send_lookup_response (void* cls, | |||
1036 | GNUNET_free(clh->name); | 1036 | GNUNET_free(clh->name); |
1037 | 1037 | ||
1038 | if (NULL != clh->shorten_key) | 1038 | if (NULL != clh->shorten_key) |
1039 | GNUNET_CRYPTO_rsa_key_free (clh->shorten_key); | 1039 | GNUNET_CRYPTO_ecc_key_free (clh->shorten_key); |
1040 | GNUNET_free (clh); | 1040 | GNUNET_free (clh); |
1041 | GNUNET_STATISTICS_update (statistics, | 1041 | GNUNET_STATISTICS_update (statistics, |
1042 | "Completed lookups", 1, GNUNET_NO); | 1042 | "Completed lookups", 1, GNUNET_NO); |
@@ -1064,8 +1064,8 @@ handle_lookup (void *cls, | |||
1064 | char* nameptr = name; | 1064 | char* nameptr = name; |
1065 | const char *utf_in; | 1065 | const char *utf_in; |
1066 | int only_cached; | 1066 | int only_cached; |
1067 | struct GNUNET_CRYPTO_RsaPrivateKey *key; | 1067 | struct GNUNET_CRYPTO_EccPrivateKey *key; |
1068 | struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded *pkey; | 1068 | struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded *pkey; |
1069 | char* tmp_pkey; | 1069 | char* tmp_pkey; |
1070 | uint16_t msg_size; | 1070 | uint16_t msg_size; |
1071 | const struct GNUNET_GNS_ClientLookupMessage *sh_msg; | 1071 | const struct GNUNET_GNS_ClientLookupMessage *sh_msg; |
@@ -1083,10 +1083,11 @@ handle_lookup (void *cls, | |||
1083 | GNUNET_SERVER_notification_context_add (nc, client); | 1083 | GNUNET_SERVER_notification_context_add (nc, client); |
1084 | if (GNUNET_YES == ntohl (sh_msg->have_key)) | 1084 | if (GNUNET_YES == ntohl (sh_msg->have_key)) |
1085 | { | 1085 | { |
1086 | pkey = (struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded *) &sh_msg[1]; | 1086 | pkey = (struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded *) &sh_msg[1]; |
1087 | tmp_pkey = (char*) &sh_msg[1]; | 1087 | tmp_pkey = (char*) &sh_msg[1]; |
1088 | key = GNUNET_CRYPTO_rsa_decode_key (tmp_pkey, ntohs (pkey->len)); | 1088 | key = GNUNET_CRYPTO_ecc_decode_key (tmp_pkey, ntohs (pkey->size), |
1089 | GNUNET_STRINGS_utf8_tolower (&tmp_pkey[ntohs (pkey->len)], &nameptr); | 1089 | GNUNET_NO); |
1090 | GNUNET_STRINGS_utf8_tolower (&tmp_pkey[ntohs (pkey->size)], &nameptr); | ||
1090 | } | 1091 | } |
1091 | else | 1092 | else |
1092 | { | 1093 | { |
@@ -1184,7 +1185,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
1184 | {&handle_get_authority, NULL, GNUNET_MESSAGE_TYPE_GNS_GET_AUTH, 0} | 1185 | {&handle_get_authority, NULL, GNUNET_MESSAGE_TYPE_GNS_GET_AUTH, 0} |
1185 | }; | 1186 | }; |
1186 | char* keyfile; | 1187 | char* keyfile; |
1187 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; | 1188 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pkey; |
1188 | unsigned long long max_parallel_bg_queries = 0; | 1189 | unsigned long long max_parallel_bg_queries = 0; |
1189 | int ignore_pending = GNUNET_NO; | 1190 | int ignore_pending = GNUNET_NO; |
1190 | 1191 | ||
@@ -1203,10 +1204,10 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
1203 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1204 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1204 | "Using keyfile %s for root zone.\n", keyfile); | 1205 | "Using keyfile %s for root zone.\n", keyfile); |
1205 | 1206 | ||
1206 | zone_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 1207 | zone_key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
1207 | GNUNET_CRYPTO_rsa_key_get_public (zone_key, &pkey); | 1208 | GNUNET_CRYPTO_ecc_key_get_public (zone_key, &pkey); |
1208 | GNUNET_CRYPTO_short_hash(&pkey, | 1209 | GNUNET_CRYPTO_short_hash(&pkey, |
1209 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 1210 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
1210 | &zone_hash); | 1211 | &zone_hash); |
1211 | GNUNET_free(keyfile); | 1212 | GNUNET_free(keyfile); |
1212 | namestore_handle = GNUNET_NAMESTORE_connect (c); | 1213 | namestore_handle = GNUNET_NAMESTORE_connect (c); |
diff --git a/src/gns/gnunet-service-gns_interceptor.c b/src/gns/gnunet-service-gns_interceptor.c index cbacc318d..affa0f5d6 100644 --- a/src/gns/gnunet-service-gns_interceptor.c +++ b/src/gns/gnunet-service-gns_interceptor.c | |||
@@ -66,7 +66,7 @@ static struct GNUNET_CRYPTO_ShortHashCode our_zone; | |||
66 | /** | 66 | /** |
67 | * Our priv key | 67 | * Our priv key |
68 | */ | 68 | */ |
69 | static struct GNUNET_CRYPTO_RsaPrivateKey *our_key; | 69 | static struct GNUNET_CRYPTO_EccPrivateKey *our_key; |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Default timeout | 72 | * Default timeout |
@@ -344,7 +344,7 @@ handle_dns_request (void *cls, | |||
344 | */ | 344 | */ |
345 | int | 345 | int |
346 | gns_interceptor_init (struct GNUNET_CRYPTO_ShortHashCode zone, | 346 | gns_interceptor_init (struct GNUNET_CRYPTO_ShortHashCode zone, |
347 | struct GNUNET_CRYPTO_RsaPrivateKey *key, | 347 | struct GNUNET_CRYPTO_EccPrivateKey *key, |
348 | const struct GNUNET_CONFIGURATION_Handle *c) | 348 | const struct GNUNET_CONFIGURATION_Handle *c) |
349 | { | 349 | { |
350 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 350 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, |
diff --git a/src/gns/gnunet-service-gns_interceptor.h b/src/gns/gnunet-service-gns_interceptor.h index 613ce8cdc..a1da4938b 100644 --- a/src/gns/gnunet-service-gns_interceptor.h +++ b/src/gns/gnunet-service-gns_interceptor.h | |||
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | int | 38 | int |
39 | gns_interceptor_init (struct GNUNET_CRYPTO_ShortHashCode zone, | 39 | gns_interceptor_init (struct GNUNET_CRYPTO_ShortHashCode zone, |
40 | struct GNUNET_CRYPTO_RsaPrivateKey *key, | 40 | struct GNUNET_CRYPTO_EccPrivateKey *key, |
41 | const struct GNUNET_CONFIGURATION_Handle *c); | 41 | const struct GNUNET_CONFIGURATION_Handle *c); |
42 | 42 | ||
43 | /** | 43 | /** |
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 37f12ff6e..f20cd24c9 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -224,7 +224,7 @@ free_get_pseu_authority_handle (struct GetPseuAuthorityHandle *gph) | |||
224 | { | 224 | { |
225 | gph->namestore_task = NULL; | 225 | gph->namestore_task = NULL; |
226 | GNUNET_free (gph->auth); | 226 | GNUNET_free (gph->auth); |
227 | GNUNET_CRYPTO_rsa_key_free (gph->key); | 227 | GNUNET_CRYPTO_ecc_key_free (gph->key); |
228 | GNUNET_CONTAINER_DLL_remove (gph_head, gph_tail, gph); | 228 | GNUNET_CONTAINER_DLL_remove (gph_head, gph_tail, gph); |
229 | GNUNET_free (gph); | 229 | GNUNET_free (gph); |
230 | } | 230 | } |
@@ -270,11 +270,11 @@ create_pkey_cont (void* cls, int32_t success, const char* emsg) | |||
270 | */ | 270 | */ |
271 | static void | 271 | static void |
272 | process_pseu_lookup_ns (void* cls, | 272 | process_pseu_lookup_ns (void* cls, |
273 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 273 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
274 | struct GNUNET_TIME_Absolute expiration, | 274 | struct GNUNET_TIME_Absolute expiration, |
275 | const char *name, unsigned int rd_count, | 275 | const char *name, 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 GetPseuAuthorityHandle* gph = cls; | 279 | struct GetPseuAuthorityHandle* gph = cls; |
280 | struct GNUNET_NAMESTORE_RecordData new_pkey; | 280 | struct GNUNET_NAMESTORE_RecordData new_pkey; |
@@ -463,12 +463,12 @@ process_auth_discovery_dht_result (void* cls, | |||
463 | */ | 463 | */ |
464 | static void | 464 | static void |
465 | process_auth_discovery_ns_result (void* cls, | 465 | process_auth_discovery_ns_result (void* cls, |
466 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 466 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
467 | struct GNUNET_TIME_Absolute expiration, | 467 | struct GNUNET_TIME_Absolute expiration, |
468 | const char *name, | 468 | const char *name, |
469 | unsigned int rd_count, | 469 | unsigned int rd_count, |
470 | const struct GNUNET_NAMESTORE_RecordData *rd, | 470 | const struct GNUNET_NAMESTORE_RecordData *rd, |
471 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 471 | const struct GNUNET_CRYPTO_EccSignature *signature) |
472 | { | 472 | { |
473 | struct GetPseuAuthorityHandle* gph = cls; | 473 | struct GetPseuAuthorityHandle* gph = cls; |
474 | struct GNUNET_HashCode lookup_key; | 474 | struct GNUNET_HashCode lookup_key; |
@@ -536,12 +536,12 @@ process_auth_discovery_ns_result (void* cls, | |||
536 | */ | 536 | */ |
537 | static void | 537 | static void |
538 | process_zone_to_name_discover (void *cls, | 538 | process_zone_to_name_discover (void *cls, |
539 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 539 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
540 | struct GNUNET_TIME_Absolute expire, | 540 | struct GNUNET_TIME_Absolute expire, |
541 | const char *name, | 541 | const char *name, |
542 | unsigned int rd_len, | 542 | unsigned int rd_len, |
543 | const struct GNUNET_NAMESTORE_RecordData *rd, | 543 | const struct GNUNET_NAMESTORE_RecordData *rd, |
544 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 544 | const struct GNUNET_CRYPTO_EccSignature *signature) |
545 | { | 545 | { |
546 | struct GetPseuAuthorityHandle* gph = cls; | 546 | struct GetPseuAuthorityHandle* gph = cls; |
547 | 547 | ||
@@ -592,31 +592,33 @@ shorten_authority_chain (struct GetPseuAuthorityHandle *gph) | |||
592 | */ | 592 | */ |
593 | static void | 593 | static void |
594 | start_shorten (struct AuthorityChain *auth, | 594 | start_shorten (struct AuthorityChain *auth, |
595 | const struct GNUNET_CRYPTO_RsaPrivateKey *key) | 595 | const struct GNUNET_CRYPTO_EccPrivateKey *key) |
596 | { | 596 | { |
597 | struct GetPseuAuthorityHandle *gph; | 597 | struct GetPseuAuthorityHandle *gph; |
598 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; | 598 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pkey; |
599 | struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded *pb_key; | 599 | struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded *pb_key; |
600 | 600 | ||
601 | GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); | 601 | GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); |
602 | if (NULL == (pb_key = GNUNET_CRYPTO_rsa_encode_key (key))) | 602 | if (NULL == (pb_key = GNUNET_CRYPTO_ecc_encode_key (key))) |
603 | { | 603 | { |
604 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 604 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
605 | "Failed to encode RSA key on shorten\n"); | 605 | "Failed to encode ECC key on shorten\n"); |
606 | return; | 606 | return; |
607 | } | 607 | } |
608 | gph = GNUNET_malloc (sizeof (struct GetPseuAuthorityHandle)); | 608 | gph = GNUNET_new (struct GetPseuAuthorityHandle); |
609 | gph->key = GNUNET_CRYPTO_rsa_decode_key ((const char*) pb_key, ntohs (pb_key->len)); | 609 | gph->key = GNUNET_CRYPTO_ecc_decode_key ((const char*) pb_key, |
610 | ntohs (pb_key->size), | ||
611 | GNUNET_YES); | ||
610 | GNUNET_free (pb_key); | 612 | GNUNET_free (pb_key); |
611 | if (NULL == gph->key) | 613 | if (NULL == gph->key) |
612 | { | 614 | { |
613 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 615 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
614 | "Failed to decode RSA key on shorten\n"); | 616 | "Failed to decode ECC key on shorten\n"); |
615 | GNUNET_free (gph); | 617 | GNUNET_free (gph); |
616 | return; | 618 | return; |
617 | } | 619 | } |
618 | GNUNET_CRYPTO_short_hash (&pkey, | 620 | GNUNET_CRYPTO_short_hash (&pkey, |
619 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 621 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
620 | &gph->our_zone); | 622 | &gph->our_zone); |
621 | gph->auth = GNUNET_malloc (sizeof (struct AuthorityChain)); | 623 | gph->auth = GNUNET_malloc (sizeof (struct AuthorityChain)); |
622 | memcpy (gph->auth, auth, sizeof (struct AuthorityChain)); | 624 | memcpy (gph->auth, auth, sizeof (struct AuthorityChain)); |
@@ -1154,11 +1156,11 @@ resolve_record_dht (struct ResolverHandle *rh) | |||
1154 | */ | 1156 | */ |
1155 | static void | 1157 | static void |
1156 | process_record_result_ns (void* cls, | 1158 | process_record_result_ns (void* cls, |
1157 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 1159 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
1158 | struct GNUNET_TIME_Absolute expiration, | 1160 | struct GNUNET_TIME_Absolute expiration, |
1159 | const char *name, unsigned int rd_count, | 1161 | const char *name, unsigned int rd_count, |
1160 | const struct GNUNET_NAMESTORE_RecordData *rd, | 1162 | const struct GNUNET_NAMESTORE_RecordData *rd, |
1161 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 1163 | const struct GNUNET_CRYPTO_EccSignature *signature) |
1162 | { | 1164 | { |
1163 | struct ResolverHandle *rh = cls; | 1165 | struct ResolverHandle *rh = cls; |
1164 | struct RecordLookupHandle *rlh = rh->proc_cls; | 1166 | struct RecordLookupHandle *rlh = rh->proc_cls; |
@@ -1169,7 +1171,7 @@ process_record_result_ns (void* cls, | |||
1169 | 1171 | ||
1170 | rh->namestore_task = NULL; | 1172 | rh->namestore_task = NULL; |
1171 | GNUNET_CRYPTO_short_hash (key, | 1173 | GNUNET_CRYPTO_short_hash (key, |
1172 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 1174 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
1173 | &zone); | 1175 | &zone); |
1174 | remaining_time = GNUNET_TIME_absolute_get_remaining (expiration); | 1176 | remaining_time = GNUNET_TIME_absolute_get_remaining (expiration); |
1175 | rh->status = 0; | 1177 | rh->status = 0; |
@@ -2034,12 +2036,12 @@ handle_delegation_ns (void* cls, struct ResolverHandle *rh, | |||
2034 | */ | 2036 | */ |
2035 | static void | 2037 | static void |
2036 | process_pkey_revocation_result_ns (void *cls, | 2038 | process_pkey_revocation_result_ns (void *cls, |
2037 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 2039 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
2038 | struct GNUNET_TIME_Absolute expiration, | 2040 | struct GNUNET_TIME_Absolute expiration, |
2039 | const char *name, | 2041 | const char *name, |
2040 | unsigned int rd_count, | 2042 | unsigned int rd_count, |
2041 | const struct GNUNET_NAMESTORE_RecordData *rd, | 2043 | const struct GNUNET_NAMESTORE_RecordData *rd, |
2042 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 2044 | const struct GNUNET_CRYPTO_EccSignature *signature) |
2043 | { | 2045 | { |
2044 | struct ResolverHandle *rh = cls; | 2046 | struct ResolverHandle *rh = cls; |
2045 | struct GNUNET_TIME_Relative remaining_time; | 2047 | struct GNUNET_TIME_Relative remaining_time; |
@@ -3063,12 +3065,12 @@ handle_delegation_ns (void* cls, struct ResolverHandle *rh, | |||
3063 | */ | 3065 | */ |
3064 | static void | 3066 | static void |
3065 | process_delegation_result_ns (void* cls, | 3067 | process_delegation_result_ns (void* cls, |
3066 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *key, | 3068 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *key, |
3067 | struct GNUNET_TIME_Absolute expiration, | 3069 | struct GNUNET_TIME_Absolute expiration, |
3068 | const char *name, | 3070 | const char *name, |
3069 | unsigned int rd_count, | 3071 | unsigned int rd_count, |
3070 | const struct GNUNET_NAMESTORE_RecordData *rd, | 3072 | const struct GNUNET_NAMESTORE_RecordData *rd, |
3071 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 3073 | const struct GNUNET_CRYPTO_EccSignature *signature) |
3072 | { | 3074 | { |
3073 | struct ResolverHandle *rh = cls; | 3075 | struct ResolverHandle *rh = cls; |
3074 | struct GNUNET_TIME_Relative remaining_time; | 3076 | struct GNUNET_TIME_Relative remaining_time; |
@@ -3080,7 +3082,7 @@ process_delegation_result_ns (void* cls, | |||
3080 | 3082 | ||
3081 | rh->namestore_task = NULL; | 3083 | rh->namestore_task = NULL; |
3082 | GNUNET_CRYPTO_short_hash (key, | 3084 | GNUNET_CRYPTO_short_hash (key, |
3083 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 3085 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
3084 | &zone); | 3086 | &zone); |
3085 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3087 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3086 | "GNS_PHASE_DELEGATE_NS-%llu: Got %d records from authority lookup for `%s' in zone %s\n", | 3088 | "GNS_PHASE_DELEGATE_NS-%llu: Got %d records from authority lookup for `%s' in zone %s\n", |
@@ -3326,7 +3328,7 @@ gns_resolver_lookup_record (struct GNUNET_CRYPTO_ShortHashCode zone, | |||
3326 | struct GNUNET_CRYPTO_ShortHashCode pzone, | 3328 | struct GNUNET_CRYPTO_ShortHashCode pzone, |
3327 | uint32_t record_type, | 3329 | uint32_t record_type, |
3328 | const char* name, | 3330 | const char* name, |
3329 | struct GNUNET_CRYPTO_RsaPrivateKey *key, | 3331 | struct GNUNET_CRYPTO_EccPrivateKey *key, |
3330 | struct GNUNET_TIME_Relative timeout, | 3332 | struct GNUNET_TIME_Relative timeout, |
3331 | int only_cached, | 3333 | int only_cached, |
3332 | RecordLookupProcessor proc, | 3334 | RecordLookupProcessor proc, |
@@ -3509,12 +3511,12 @@ finish_shorten (struct ResolverHandle *rh, | |||
3509 | */ | 3511 | */ |
3510 | static void | 3512 | static void |
3511 | process_zone_to_name_shorten_root (void *cls, | 3513 | process_zone_to_name_shorten_root (void *cls, |
3512 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 3514 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
3513 | struct GNUNET_TIME_Absolute expire, | 3515 | struct GNUNET_TIME_Absolute expire, |
3514 | const char *name, | 3516 | const char *name, |
3515 | unsigned int rd_len, | 3517 | unsigned int rd_len, |
3516 | const struct GNUNET_NAMESTORE_RecordData *rd, | 3518 | const struct GNUNET_NAMESTORE_RecordData *rd, |
3517 | const struct GNUNET_CRYPTO_RsaSignature *signature); | 3519 | const struct GNUNET_CRYPTO_EccSignature *signature); |
3518 | 3520 | ||
3519 | 3521 | ||
3520 | /** | 3522 | /** |
@@ -3531,12 +3533,12 @@ process_zone_to_name_shorten_root (void *cls, | |||
3531 | */ | 3533 | */ |
3532 | static void | 3534 | static void |
3533 | process_zone_to_name_shorten_shorten (void *cls, | 3535 | process_zone_to_name_shorten_shorten (void *cls, |
3534 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 3536 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
3535 | struct GNUNET_TIME_Absolute expire, | 3537 | struct GNUNET_TIME_Absolute expire, |
3536 | const char *name, | 3538 | const char *name, |
3537 | unsigned int rd_len, | 3539 | unsigned int rd_len, |
3538 | const struct GNUNET_NAMESTORE_RecordData *rd, | 3540 | const struct GNUNET_NAMESTORE_RecordData *rd, |
3539 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 3541 | const struct GNUNET_CRYPTO_EccSignature *signature) |
3540 | { | 3542 | { |
3541 | struct ResolverHandle *rh = cls; | 3543 | struct ResolverHandle *rh = cls; |
3542 | struct NameShortenHandle* nsh = rh->proc_cls; | 3544 | struct NameShortenHandle* nsh = rh->proc_cls; |
@@ -3647,12 +3649,12 @@ process_zone_to_name_shorten_shorten (void *cls, | |||
3647 | */ | 3649 | */ |
3648 | static void | 3650 | static void |
3649 | process_zone_to_name_shorten_private (void *cls, | 3651 | process_zone_to_name_shorten_private (void *cls, |
3650 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 3652 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
3651 | struct GNUNET_TIME_Absolute expire, | 3653 | struct GNUNET_TIME_Absolute expire, |
3652 | const char *name, | 3654 | const char *name, |
3653 | unsigned int rd_len, | 3655 | unsigned int rd_len, |
3654 | const struct GNUNET_NAMESTORE_RecordData *rd, | 3656 | const struct GNUNET_NAMESTORE_RecordData *rd, |
3655 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 3657 | const struct GNUNET_CRYPTO_EccSignature *signature) |
3656 | { | 3658 | { |
3657 | struct ResolverHandle *rh = cls; | 3659 | struct ResolverHandle *rh = cls; |
3658 | struct NameShortenHandle* nsh = rh->proc_cls; | 3660 | struct NameShortenHandle* nsh = rh->proc_cls; |
@@ -3762,12 +3764,12 @@ process_zone_to_name_shorten_private (void *cls, | |||
3762 | */ | 3764 | */ |
3763 | static void | 3765 | static void |
3764 | process_zone_to_name_shorten_root (void *cls, | 3766 | process_zone_to_name_shorten_root (void *cls, |
3765 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 3767 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
3766 | struct GNUNET_TIME_Absolute expire, | 3768 | struct GNUNET_TIME_Absolute expire, |
3767 | const char *name, | 3769 | const char *name, |
3768 | unsigned int rd_len, | 3770 | unsigned int rd_len, |
3769 | const struct GNUNET_NAMESTORE_RecordData *rd, | 3771 | const struct GNUNET_NAMESTORE_RecordData *rd, |
3770 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 3772 | const struct GNUNET_CRYPTO_EccSignature *signature) |
3771 | { | 3773 | { |
3772 | struct ResolverHandle *rh = cls; | 3774 | struct ResolverHandle *rh = cls; |
3773 | struct NameShortenHandle* nsh = rh->proc_cls; | 3775 | struct NameShortenHandle* nsh = rh->proc_cls; |
@@ -3985,12 +3987,12 @@ handle_delegation_ns_shorten (void* cls, | |||
3985 | */ | 3987 | */ |
3986 | static void | 3988 | static void |
3987 | process_zone_to_name_zkey(void *cls, | 3989 | process_zone_to_name_zkey(void *cls, |
3988 | const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, | 3990 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, |
3989 | struct GNUNET_TIME_Absolute expire, | 3991 | struct GNUNET_TIME_Absolute expire, |
3990 | const char *name, | 3992 | const char *name, |
3991 | unsigned int rd_len, | 3993 | unsigned int rd_len, |
3992 | const struct GNUNET_NAMESTORE_RecordData *rd, | 3994 | const struct GNUNET_NAMESTORE_RecordData *rd, |
3993 | const struct GNUNET_CRYPTO_RsaSignature *signature) | 3995 | const struct GNUNET_CRYPTO_EccSignature *signature) |
3994 | { | 3996 | { |
3995 | struct ResolverHandle *rh = cls; | 3997 | struct ResolverHandle *rh = cls; |
3996 | struct NameShortenHandle *nsh = rh->proc_cls; | 3998 | struct NameShortenHandle *nsh = rh->proc_cls; |
diff --git a/src/gns/gnunet-service-gns_resolver.h b/src/gns/gnunet-service-gns_resolver.h index c4b6a8aa2..1d236b427 100644 --- a/src/gns/gnunet-service-gns_resolver.h +++ b/src/gns/gnunet-service-gns_resolver.h | |||
@@ -327,7 +327,7 @@ struct ResolverHandle | |||
327 | * private key of an/our authoritative zone | 327 | * private key of an/our authoritative zone |
328 | * can be NULL but automatical PKEY import will not work | 328 | * can be NULL but automatical PKEY import will not work |
329 | */ | 329 | */ |
330 | struct GNUNET_CRYPTO_RsaPrivateKey *priv_key; | 330 | struct GNUNET_CRYPTO_EccPrivateKey *priv_key; |
331 | 331 | ||
332 | /** | 332 | /** |
333 | * the heap node associated with this lookup, null if timeout is set | 333 | * the heap node associated with this lookup, null if timeout is set |
@@ -484,7 +484,7 @@ struct GetPseuAuthorityHandle | |||
484 | /** | 484 | /** |
485 | * the private key of the zone to store the pseu in | 485 | * the private key of the zone to store the pseu in |
486 | */ | 486 | */ |
487 | struct GNUNET_CRYPTO_RsaPrivateKey *key; | 487 | struct GNUNET_CRYPTO_EccPrivateKey *key; |
488 | 488 | ||
489 | /** | 489 | /** |
490 | * a handle for dht lookups. should be NULL if no lookups are in progress | 490 | * a handle for dht lookups. should be NULL if no lookups are in progress |
@@ -573,7 +573,7 @@ gns_resolver_lookup_record (struct GNUNET_CRYPTO_ShortHashCode zone, | |||
573 | struct GNUNET_CRYPTO_ShortHashCode pzone, | 573 | struct GNUNET_CRYPTO_ShortHashCode pzone, |
574 | uint32_t record_type, | 574 | uint32_t record_type, |
575 | const char* name, | 575 | const char* name, |
576 | struct GNUNET_CRYPTO_RsaPrivateKey *key, | 576 | struct GNUNET_CRYPTO_EccPrivateKey *key, |
577 | struct GNUNET_TIME_Relative timeout, | 577 | struct GNUNET_TIME_Relative timeout, |
578 | int only_cached, | 578 | int only_cached, |
579 | RecordLookupProcessor proc, | 579 | RecordLookupProcessor proc, |
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c index 50ad01215..72149ef4f 100644 --- a/src/gns/plugin_block_gns.c +++ b/src/gns/plugin_block_gns.c | |||
@@ -237,7 +237,7 @@ block_plugin_gns_get_key (void *cls, enum GNUNET_BLOCK_Type type, | |||
237 | return GNUNET_SYSERR; | 237 | return GNUNET_SYSERR; |
238 | } | 238 | } |
239 | GNUNET_CRYPTO_short_hash (&nrb->public_key, | 239 | GNUNET_CRYPTO_short_hash (&nrb->public_key, |
240 | sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 240 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
241 | &pkey_hash); | 241 | &pkey_hash); |
242 | GNUNET_GNS_get_key_for_record (name, &pkey_hash, key); | 242 | GNUNET_GNS_get_key_for_record (name, &pkey_hash, key); |
243 | return GNUNET_OK; | 243 | return GNUNET_OK; |
diff --git a/src/gns/test_gns_cname_lookup.c b/src/gns/test_gns_cname_lookup.c index 6870e897a..4d15175e1 100644 --- a/src/gns/test_gns_cname_lookup.c +++ b/src/gns/test_gns_cname_lookup.c | |||
@@ -334,9 +334,9 @@ do_check (void *cls, | |||
334 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 334 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
335 | struct GNUNET_TESTING_Peer *peer) | 335 | struct GNUNET_TESTING_Peer *peer) |
336 | { | 336 | { |
337 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 337 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
338 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 338 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
339 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 339 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
340 | char* alice_keyfile; | 340 | char* alice_keyfile; |
341 | struct GNUNET_NAMESTORE_RecordData rd; | 341 | struct GNUNET_NAMESTORE_RecordData rd; |
342 | const char* ip = TEST_IP_PLUS; | 342 | const char* ip = TEST_IP_PLUS; |
@@ -365,11 +365,11 @@ do_check (void *cls, | |||
365 | return; | 365 | return; |
366 | } | 366 | } |
367 | 367 | ||
368 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 368 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
369 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 369 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
370 | GNUNET_free(alice_keyfile); | 370 | GNUNET_free(alice_keyfile); |
371 | 371 | ||
372 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 372 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
373 | 373 | ||
374 | rd.expiration_time = UINT64_MAX; | 374 | rd.expiration_time = UINT64_MAX; |
375 | GNUNET_assert(1 == inet_pton (AF_INET, ip, &web)); | 375 | GNUNET_assert(1 == inet_pton (AF_INET, ip, &web)); |
@@ -429,8 +429,8 @@ do_check (void *cls, | |||
429 | &rd, | 429 | &rd, |
430 | &commence_testing, | 430 | &commence_testing, |
431 | NULL); | 431 | NULL); |
432 | GNUNET_CRYPTO_rsa_key_free(alice_key); | 432 | GNUNET_CRYPTO_ecc_key_free(alice_key); |
433 | GNUNET_CRYPTO_rsa_key_free(bob_key); | 433 | GNUNET_CRYPTO_ecc_key_free(bob_key); |
434 | } | 434 | } |
435 | 435 | ||
436 | 436 | ||
diff --git a/src/gns/test_gns_dht_delegated_lookup.c b/src/gns/test_gns_dht_delegated_lookup.c index 1eb77d821..ded45ecb0 100644 --- a/src/gns/test_gns_dht_delegated_lookup.c +++ b/src/gns/test_gns_dht_delegated_lookup.c | |||
@@ -65,10 +65,10 @@ static struct GNUNET_DHT_Handle *dht_handle; | |||
65 | 65 | ||
66 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 66 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
67 | 67 | ||
68 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 68 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
69 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 69 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
70 | static struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 70 | static struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
71 | static struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 71 | static struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
72 | 72 | ||
73 | 73 | ||
74 | /** | 74 | /** |
@@ -216,7 +216,7 @@ put_dht(void *cls, int32_t success, const char *emsg) | |||
216 | struct GNUNET_HashCode zone_hash_double; | 216 | struct GNUNET_HashCode zone_hash_double; |
217 | uint32_t rd_payload_length; | 217 | uint32_t rd_payload_length; |
218 | char* nrb_data = NULL; | 218 | char* nrb_data = NULL; |
219 | struct GNUNET_CRYPTO_RsaSignature *sig; | 219 | struct GNUNET_CRYPTO_EccSignature *sig; |
220 | struct GNUNET_NAMESTORE_RecordData rd; | 220 | struct GNUNET_NAMESTORE_RecordData rd; |
221 | char* ip = TEST_IP; | 221 | char* ip = TEST_IP; |
222 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); | 222 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); |
@@ -262,7 +262,7 @@ put_dht(void *cls, int32_t success, const char *emsg) | |||
262 | } | 262 | } |
263 | GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash); | 263 | GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash); |
264 | GNUNET_CRYPTO_short_hash(&bob_pkey, | 264 | GNUNET_CRYPTO_short_hash(&bob_pkey, |
265 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 265 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
266 | &zone_hash); | 266 | &zone_hash); |
267 | GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); | 267 | GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); |
268 | GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); | 268 | GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); |
@@ -330,13 +330,13 @@ do_check (void *cls, | |||
330 | return; | 330 | return; |
331 | } | 331 | } |
332 | 332 | ||
333 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 333 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
334 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 334 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
335 | 335 | ||
336 | GNUNET_free(alice_keyfile); | 336 | GNUNET_free(alice_keyfile); |
337 | 337 | ||
338 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 338 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
339 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 339 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
340 | GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); | 340 | GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); |
341 | 341 | ||
342 | struct GNUNET_NAMESTORE_RecordData rd; | 342 | struct GNUNET_NAMESTORE_RecordData rd; |
diff --git a/src/gns/test_gns_dht_three_peers.c b/src/gns/test_gns_dht_three_peers.c index ee2c36e3b..227ca4606 100644 --- a/src/gns/test_gns_dht_three_peers.c +++ b/src/gns/test_gns_dht_three_peers.c | |||
@@ -308,8 +308,8 @@ static int | |||
308 | setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg) | 308 | setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg) |
309 | { | 309 | { |
310 | char* keyfile; | 310 | char* keyfile; |
311 | struct GNUNET_CRYPTO_RsaPrivateKey *key; | 311 | struct GNUNET_CRYPTO_EccPrivateKey *key; |
312 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; | 312 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pkey; |
313 | struct in_addr *web; | 313 | struct in_addr *web; |
314 | struct GNUNET_NAMESTORE_RecordData rd; | 314 | struct GNUNET_NAMESTORE_RecordData rd; |
315 | 315 | ||
@@ -324,7 +324,7 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
324 | return GNUNET_SYSERR; | 324 | return GNUNET_SYSERR; |
325 | } | 325 | } |
326 | 326 | ||
327 | key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 327 | key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
328 | if (NULL == key) | 328 | if (NULL == key) |
329 | { | 329 | { |
330 | 330 | ||
@@ -336,12 +336,12 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
336 | if (NULL == nh[0]) | 336 | if (NULL == nh[0]) |
337 | { | 337 | { |
338 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); | 338 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); |
339 | GNUNET_CRYPTO_rsa_key_free (key); | 339 | GNUNET_CRYPTO_ecc_key_free (key); |
340 | GNUNET_free (keyfile); | 340 | GNUNET_free (keyfile); |
341 | return GNUNET_SYSERR; | 341 | return GNUNET_SYSERR; |
342 | } | 342 | } |
343 | 343 | ||
344 | GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); | 344 | GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); |
345 | GNUNET_CRYPTO_short_hash(&pkey, sizeof(pkey), &dave_hash); | 345 | GNUNET_CRYPTO_short_hash(&pkey, sizeof(pkey), &dave_hash); |
346 | 346 | ||
347 | rd.expiration_time = UINT64_MAX; | 347 | rd.expiration_time = UINT64_MAX; |
@@ -362,7 +362,7 @@ setup_dave (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
362 | 362 | ||
363 | GNUNET_NAMESTORE_record_create (nh[0], key, GNUNET_GNS_MASTERZONE_STR, &rd, &cont_ns, nh[0]); | 363 | GNUNET_NAMESTORE_record_create (nh[0], key, GNUNET_GNS_MASTERZONE_STR, &rd, &cont_ns, nh[0]); |
364 | 364 | ||
365 | GNUNET_CRYPTO_rsa_key_free(key); | 365 | GNUNET_CRYPTO_ecc_key_free(key); |
366 | GNUNET_free(keyfile); | 366 | GNUNET_free(keyfile); |
367 | GNUNET_free(web); | 367 | GNUNET_free(web); |
368 | dave_is_setup = GNUNET_YES; | 368 | dave_is_setup = GNUNET_YES; |
@@ -374,8 +374,8 @@ static int | |||
374 | setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg) | 374 | setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg) |
375 | { | 375 | { |
376 | char* keyfile; | 376 | char* keyfile; |
377 | struct GNUNET_CRYPTO_RsaPrivateKey *key; | 377 | struct GNUNET_CRYPTO_EccPrivateKey *key; |
378 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; | 378 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pkey; |
379 | struct GNUNET_NAMESTORE_RecordData rd; | 379 | struct GNUNET_NAMESTORE_RecordData rd; |
380 | 380 | ||
381 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up bob\n"); | 381 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up bob\n"); |
@@ -389,7 +389,7 @@ setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
389 | return GNUNET_SYSERR; | 389 | return GNUNET_SYSERR; |
390 | } | 390 | } |
391 | 391 | ||
392 | key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 392 | key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
393 | if (NULL == key) | 393 | if (NULL == key) |
394 | { | 394 | { |
395 | 395 | ||
@@ -402,12 +402,12 @@ setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
402 | if (NULL == nh[1]) | 402 | if (NULL == nh[1]) |
403 | { | 403 | { |
404 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); | 404 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); |
405 | GNUNET_CRYPTO_rsa_key_free (key); | 405 | GNUNET_CRYPTO_ecc_key_free (key); |
406 | GNUNET_free (keyfile); | 406 | GNUNET_free (keyfile); |
407 | return GNUNET_SYSERR; | 407 | return GNUNET_SYSERR; |
408 | } | 408 | } |
409 | 409 | ||
410 | GNUNET_CRYPTO_rsa_key_get_public (key, &pkey); | 410 | GNUNET_CRYPTO_ecc_key_get_public (key, &pkey); |
411 | GNUNET_CRYPTO_short_hash(&pkey, sizeof(pkey), &bob_hash); | 411 | GNUNET_CRYPTO_short_hash(&pkey, sizeof(pkey), &bob_hash); |
412 | 412 | ||
413 | rd.expiration_time = UINT64_MAX; | 413 | rd.expiration_time = UINT64_MAX; |
@@ -418,7 +418,7 @@ setup_bob (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
418 | 418 | ||
419 | GNUNET_NAMESTORE_record_create (nh[1], key, "buddy", &rd, &cont_ns, nh[1]); | 419 | GNUNET_NAMESTORE_record_create (nh[1], key, "buddy", &rd, &cont_ns, nh[1]); |
420 | 420 | ||
421 | GNUNET_CRYPTO_rsa_key_free(key); | 421 | GNUNET_CRYPTO_ecc_key_free(key); |
422 | GNUNET_free(keyfile); | 422 | GNUNET_free(keyfile); |
423 | bob_is_setup = GNUNET_YES; | 423 | bob_is_setup = GNUNET_YES; |
424 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up bob done\n"); | 424 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up bob done\n"); |
@@ -429,7 +429,7 @@ static int | |||
429 | setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg) | 429 | setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg) |
430 | { | 430 | { |
431 | char* keyfile; | 431 | char* keyfile; |
432 | struct GNUNET_CRYPTO_RsaPrivateKey *key; | 432 | struct GNUNET_CRYPTO_EccPrivateKey *key; |
433 | struct GNUNET_NAMESTORE_RecordData rd; | 433 | struct GNUNET_NAMESTORE_RecordData rd; |
434 | 434 | ||
435 | cfg_handles[2] = GNUNET_CONFIGURATION_dup (cfg); | 435 | cfg_handles[2] = GNUNET_CONFIGURATION_dup (cfg); |
@@ -442,7 +442,7 @@ setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
442 | return GNUNET_SYSERR; | 442 | return GNUNET_SYSERR; |
443 | } | 443 | } |
444 | 444 | ||
445 | key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); | 445 | key = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile); |
446 | if (NULL == key) | 446 | if (NULL == key) |
447 | { | 447 | { |
448 | 448 | ||
@@ -455,7 +455,7 @@ setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
455 | if (NULL == nh[2]) | 455 | if (NULL == nh[2]) |
456 | { | 456 | { |
457 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); | 457 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); |
458 | GNUNET_CRYPTO_rsa_key_free (key); | 458 | GNUNET_CRYPTO_ecc_key_free (key); |
459 | GNUNET_free (keyfile); | 459 | GNUNET_free (keyfile); |
460 | return GNUNET_SYSERR; | 460 | return GNUNET_SYSERR; |
461 | } | 461 | } |
@@ -473,12 +473,12 @@ setup_alice (const struct GNUNET_CONFIGURATION_Handle * cfg) | |||
473 | if (NULL == gh) | 473 | if (NULL == gh) |
474 | { | 474 | { |
475 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to gns\n"); | 475 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to gns\n"); |
476 | GNUNET_CRYPTO_rsa_key_free (key); | 476 | GNUNET_CRYPTO_ecc_key_free (key); |
477 | GNUNET_free (keyfile); | 477 | GNUNET_free (keyfile); |
478 | return GNUNET_SYSERR; | 478 | return GNUNET_SYSERR; |
479 | } | 479 | } |
480 | 480 | ||
481 | GNUNET_CRYPTO_rsa_key_free (key); | 481 | GNUNET_CRYPTO_ecc_key_free (key); |
482 | GNUNET_free (keyfile); | 482 | GNUNET_free (keyfile); |
483 | alice_is_setup = GNUNET_YES; | 483 | alice_is_setup = GNUNET_YES; |
484 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up alice done\n"); | 484 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting up alice done\n"); |
diff --git a/src/gns/test_gns_max_queries.c b/src/gns/test_gns_max_queries.c index 00caf8335..16084eb4b 100644 --- a/src/gns/test_gns_max_queries.c +++ b/src/gns/test_gns_max_queries.c | |||
@@ -252,10 +252,10 @@ do_check (void *cls, | |||
252 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 252 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
253 | struct GNUNET_TESTING_Peer *peer) | 253 | struct GNUNET_TESTING_Peer *peer) |
254 | { | 254 | { |
255 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 255 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
256 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 256 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
257 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 257 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
258 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 258 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
259 | char* alice_keyfile; | 259 | char* alice_keyfile; |
260 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; | 260 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; |
261 | 261 | ||
@@ -292,11 +292,11 @@ do_check (void *cls, | |||
292 | } | 292 | } |
293 | requests = GNUNET_malloc ((max_parallel_lookups + TEST_ADDITIONAL_LOOKUPS + 1) * | 293 | requests = GNUNET_malloc ((max_parallel_lookups + TEST_ADDITIONAL_LOOKUPS + 1) * |
294 | sizeof (struct GNUNET_GNS_LookupRequest *)); | 294 | sizeof (struct GNUNET_GNS_LookupRequest *)); |
295 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 295 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
296 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 296 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
297 | 297 | ||
298 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 298 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
299 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 299 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
300 | 300 | ||
301 | GNUNET_free(alice_keyfile); | 301 | GNUNET_free(alice_keyfile); |
302 | 302 | ||
@@ -329,8 +329,8 @@ do_check (void *cls, | |||
329 | &commence_testing, | 329 | &commence_testing, |
330 | NULL); | 330 | NULL); |
331 | 331 | ||
332 | GNUNET_CRYPTO_rsa_key_free(alice_key); | 332 | GNUNET_CRYPTO_ecc_key_free(alice_key); |
333 | GNUNET_CRYPTO_rsa_key_free(bob_key); | 333 | GNUNET_CRYPTO_ecc_key_free(bob_key); |
334 | GNUNET_free(web); | 334 | GNUNET_free(web); |
335 | 335 | ||
336 | } | 336 | } |
diff --git a/src/gns/test_gns_ns_lookup.c b/src/gns/test_gns_ns_lookup.c index f48ab8030..e0803b848 100644 --- a/src/gns/test_gns_ns_lookup.c +++ b/src/gns/test_gns_ns_lookup.c | |||
@@ -134,7 +134,7 @@ static struct GNUNET_NAMESTORE_QueueEntry *qe; | |||
134 | /** | 134 | /** |
135 | * Our private key for signing records. | 135 | * Our private key for signing records. |
136 | */ | 136 | */ |
137 | static struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 137 | static struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
138 | 138 | ||
139 | 139 | ||
140 | /** | 140 | /** |
@@ -174,7 +174,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
174 | } | 174 | } |
175 | if (NULL != alice_key) | 175 | if (NULL != alice_key) |
176 | { | 176 | { |
177 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 177 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
178 | alice_key = NULL; | 178 | alice_key = NULL; |
179 | } | 179 | } |
180 | GNUNET_break (0); | 180 | GNUNET_break (0); |
@@ -229,7 +229,7 @@ end_now (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
229 | } | 229 | } |
230 | if (NULL != alice_key) | 230 | if (NULL != alice_key) |
231 | { | 231 | { |
232 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 232 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
233 | alice_key = NULL; | 233 | alice_key = NULL; |
234 | } | 234 | } |
235 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer!\n"); | 235 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer!\n"); |
@@ -592,7 +592,7 @@ do_check (void *cls, | |||
592 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 592 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
593 | struct GNUNET_TESTING_Peer *peer) | 593 | struct GNUNET_TESTING_Peer *peer) |
594 | { | 594 | { |
595 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 595 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
596 | char* alice_keyfile; | 596 | char* alice_keyfile; |
597 | struct GNUNET_NAMESTORE_RecordData rd; | 597 | struct GNUNET_NAMESTORE_RecordData rd; |
598 | struct in_addr ns; | 598 | struct in_addr ns; |
@@ -621,8 +621,8 @@ do_check (void *cls, | |||
621 | return; | 621 | return; |
622 | } | 622 | } |
623 | 623 | ||
624 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 624 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
625 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 625 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
626 | GNUNET_free (alice_keyfile); | 626 | GNUNET_free (alice_keyfile); |
627 | 627 | ||
628 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 628 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c index 10b2ec810..d07f197c3 100644 --- a/src/gns/test_gns_proxy.c +++ b/src/gns/test_gns_proxy.c | |||
@@ -364,7 +364,7 @@ run (void *cls, | |||
364 | struct GNUNET_TESTING_Peer *peer) | 364 | struct GNUNET_TESTING_Peer *peer) |
365 | { | 365 | { |
366 | enum MHD_FLAG flags; | 366 | enum MHD_FLAG flags; |
367 | struct GNUNET_CRYPTO_RsaPrivateKey *host_key; | 367 | struct GNUNET_CRYPTO_EccPrivateKey *host_key; |
368 | struct GNUNET_NAMESTORE_RecordData rd; | 368 | struct GNUNET_NAMESTORE_RecordData rd; |
369 | char *zone_keyfile; | 369 | char *zone_keyfile; |
370 | 370 | ||
@@ -421,7 +421,7 @@ run (void *cls, | |||
421 | return; | 421 | return; |
422 | } | 422 | } |
423 | 423 | ||
424 | host_key = GNUNET_CRYPTO_rsa_key_create_from_file (zone_keyfile); | 424 | host_key = GNUNET_CRYPTO_ecc_key_create_from_file (zone_keyfile); |
425 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value; | 425 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value; |
426 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (GNUNET_GNS_RECORD_A, | 426 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (GNUNET_GNS_RECORD_A, |
427 | "127.0.0.1", | 427 | "127.0.0.1", |
@@ -438,7 +438,7 @@ run (void *cls, | |||
438 | 438 | ||
439 | GNUNET_free ((void**)rd.data); | 439 | GNUNET_free ((void**)rd.data); |
440 | GNUNET_free (zone_keyfile); | 440 | GNUNET_free (zone_keyfile); |
441 | GNUNET_CRYPTO_rsa_key_free (host_key); | 441 | GNUNET_CRYPTO_ecc_key_free (host_key); |
442 | } | 442 | } |
443 | 443 | ||
444 | int | 444 | int |
@@ -460,7 +460,7 @@ main (int argc, char *const *argv) | |||
460 | } | 460 | } |
461 | GNUNET_free (binary); | 461 | GNUNET_free (binary); |
462 | 462 | ||
463 | GNUNET_CRYPTO_rsa_setup_hostkey ("test_gns_proxy.conf"); | 463 | GNUNET_CRYPTO_ecc_setup_hostkey ("test_gns_proxy.conf"); |
464 | 464 | ||
465 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 465 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
466 | { | 466 | { |
diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c index 5e2f1fc11..a104d38fc 100644 --- a/src/gns/test_gns_pseu_shorten.c +++ b/src/gns/test_gns_pseu_shorten.c | |||
@@ -71,16 +71,16 @@ static struct GNUNET_DHT_Handle *dht_handle; | |||
71 | 71 | ||
72 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 72 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
73 | 73 | ||
74 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 74 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
75 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 75 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
76 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded our_pkey; | 76 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded our_pkey; |
77 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded priv_pkey; | 77 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded priv_pkey; |
78 | static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded short_pkey; | 78 | static struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded short_pkey; |
79 | static struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 79 | static struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
80 | static struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 80 | static struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
81 | static struct GNUNET_CRYPTO_RsaPrivateKey *our_key; | 81 | static struct GNUNET_CRYPTO_EccPrivateKey *our_key; |
82 | static struct GNUNET_CRYPTO_RsaPrivateKey *priv_key; | 82 | static struct GNUNET_CRYPTO_EccPrivateKey *priv_key; |
83 | static struct GNUNET_CRYPTO_RsaPrivateKey *short_key; | 83 | static struct GNUNET_CRYPTO_EccPrivateKey *short_key; |
84 | static struct GNUNET_CRYPTO_ShortHashCode alice_hash; | 84 | static struct GNUNET_CRYPTO_ShortHashCode alice_hash; |
85 | static struct GNUNET_CRYPTO_ShortHashCode bob_hash; | 85 | static struct GNUNET_CRYPTO_ShortHashCode bob_hash; |
86 | static struct GNUNET_CRYPTO_ShortHashCode our_zone; | 86 | static struct GNUNET_CRYPTO_ShortHashCode our_zone; |
@@ -236,9 +236,9 @@ on_lookup_result(void *cls, uint32_t rd_count, | |||
236 | static void | 236 | static void |
237 | commence_testing (void *cls, int success) | 237 | commence_testing (void *cls, int success) |
238 | { | 238 | { |
239 | GNUNET_CRYPTO_rsa_key_free(our_key); | 239 | GNUNET_CRYPTO_ecc_key_free(our_key); |
240 | GNUNET_CRYPTO_rsa_key_free(bob_key); | 240 | GNUNET_CRYPTO_ecc_key_free(bob_key); |
241 | GNUNET_CRYPTO_rsa_key_free(alice_key); | 241 | GNUNET_CRYPTO_ecc_key_free(alice_key); |
242 | GNUNET_NAMESTORE_disconnect (namestore_handle); | 242 | GNUNET_NAMESTORE_disconnect (namestore_handle); |
243 | namestore_handle = NULL; | 243 | namestore_handle = NULL; |
244 | gns_handle = GNUNET_GNS_connect(cfg); | 244 | gns_handle = GNUNET_GNS_connect(cfg); |
@@ -267,7 +267,7 @@ put_pseu_dht (void *cls, int success) | |||
267 | struct GNUNET_HashCode zone_hash_double; | 267 | struct GNUNET_HashCode zone_hash_double; |
268 | uint32_t rd_payload_length; | 268 | uint32_t rd_payload_length; |
269 | char* nrb_data = NULL; | 269 | char* nrb_data = NULL; |
270 | struct GNUNET_CRYPTO_RsaSignature *sig; | 270 | struct GNUNET_CRYPTO_EccSignature *sig; |
271 | struct GNUNET_NAMESTORE_RecordData rd; | 271 | struct GNUNET_NAMESTORE_RecordData rd; |
272 | 272 | ||
273 | memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData)); | 273 | memset (&rd, 0, sizeof (struct GNUNET_NAMESTORE_RecordData)); |
@@ -308,9 +308,9 @@ put_pseu_dht (void *cls, int success) | |||
308 | { | 308 | { |
309 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); | 309 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); |
310 | ok = 3; | 310 | ok = 3; |
311 | GNUNET_CRYPTO_rsa_key_free(our_key); | 311 | GNUNET_CRYPTO_ecc_key_free(our_key); |
312 | GNUNET_CRYPTO_rsa_key_free(bob_key); | 312 | GNUNET_CRYPTO_ecc_key_free(bob_key); |
313 | GNUNET_CRYPTO_rsa_key_free(alice_key); | 313 | GNUNET_CRYPTO_ecc_key_free(alice_key); |
314 | GNUNET_free(sig); | 314 | GNUNET_free(sig); |
315 | GNUNET_free (nrb); | 315 | GNUNET_free (nrb); |
316 | end_badly_now (); | 316 | end_badly_now (); |
@@ -318,7 +318,7 @@ put_pseu_dht (void *cls, int success) | |||
318 | } | 318 | } |
319 | GNUNET_CRYPTO_short_hash(GNUNET_GNS_MASTERZONE_STR, strlen(GNUNET_GNS_MASTERZONE_STR), &name_hash); | 319 | GNUNET_CRYPTO_short_hash(GNUNET_GNS_MASTERZONE_STR, strlen(GNUNET_GNS_MASTERZONE_STR), &name_hash); |
320 | GNUNET_CRYPTO_short_hash(&alice_pkey, | 320 | GNUNET_CRYPTO_short_hash(&alice_pkey, |
321 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 321 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
322 | &zone_hash); | 322 | &zone_hash); |
323 | 323 | ||
324 | GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); | 324 | GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); |
@@ -355,7 +355,7 @@ put_www_dht(void *cls, int success) | |||
355 | struct GNUNET_HashCode zone_hash_double; | 355 | struct GNUNET_HashCode zone_hash_double; |
356 | uint32_t rd_payload_length; | 356 | uint32_t rd_payload_length; |
357 | char* nrb_data = NULL; | 357 | char* nrb_data = NULL; |
358 | struct GNUNET_CRYPTO_RsaSignature *sig; | 358 | struct GNUNET_CRYPTO_EccSignature *sig; |
359 | struct GNUNET_NAMESTORE_RecordData rd; | 359 | struct GNUNET_NAMESTORE_RecordData rd; |
360 | char* ip = TEST_IP; | 360 | char* ip = TEST_IP; |
361 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); | 361 | struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); |
@@ -396,9 +396,9 @@ put_www_dht(void *cls, int success) | |||
396 | { | 396 | { |
397 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); | 397 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); |
398 | ok = 3; | 398 | ok = 3; |
399 | GNUNET_CRYPTO_rsa_key_free(our_key); | 399 | GNUNET_CRYPTO_ecc_key_free(our_key); |
400 | GNUNET_CRYPTO_rsa_key_free(bob_key); | 400 | GNUNET_CRYPTO_ecc_key_free(bob_key); |
401 | GNUNET_CRYPTO_rsa_key_free(alice_key); | 401 | GNUNET_CRYPTO_ecc_key_free(alice_key); |
402 | GNUNET_free (sig); | 402 | GNUNET_free (sig); |
403 | GNUNET_free(web); | 403 | GNUNET_free(web); |
404 | GNUNET_free (nrb); | 404 | GNUNET_free (nrb); |
@@ -407,7 +407,7 @@ put_www_dht(void *cls, int success) | |||
407 | } | 407 | } |
408 | GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash); | 408 | GNUNET_CRYPTO_short_hash(TEST_RECORD_NAME, strlen(TEST_RECORD_NAME), &name_hash); |
409 | GNUNET_CRYPTO_short_hash(&alice_pkey, | 409 | GNUNET_CRYPTO_short_hash(&alice_pkey, |
410 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 410 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
411 | &zone_hash); | 411 | &zone_hash); |
412 | GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); | 412 | GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); |
413 | GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); | 413 | GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); |
@@ -443,7 +443,7 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg) | |||
443 | struct GNUNET_HashCode zone_hash_double; | 443 | struct GNUNET_HashCode zone_hash_double; |
444 | uint32_t rd_payload_length; | 444 | uint32_t rd_payload_length; |
445 | char* nrb_data = NULL; | 445 | char* nrb_data = NULL; |
446 | struct GNUNET_CRYPTO_RsaSignature *sig; | 446 | struct GNUNET_CRYPTO_EccSignature *sig; |
447 | struct GNUNET_NAMESTORE_RecordData rd; | 447 | struct GNUNET_NAMESTORE_RecordData rd; |
448 | 448 | ||
449 | rd.expiration_time = UINT64_MAX; | 449 | rd.expiration_time = UINT64_MAX; |
@@ -477,9 +477,9 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg) | |||
477 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); | 477 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Record serialization failed!\n"); |
478 | ok = 3; | 478 | ok = 3; |
479 | 479 | ||
480 | GNUNET_CRYPTO_rsa_key_free (our_key); | 480 | GNUNET_CRYPTO_ecc_key_free (our_key); |
481 | GNUNET_CRYPTO_rsa_key_free (bob_key); | 481 | GNUNET_CRYPTO_ecc_key_free (bob_key); |
482 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 482 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
483 | GNUNET_free (sig); | 483 | GNUNET_free (sig); |
484 | GNUNET_free (nrb); | 484 | GNUNET_free (nrb); |
485 | end_badly_now (); | 485 | end_badly_now (); |
@@ -490,7 +490,7 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg) | |||
490 | GNUNET_CRYPTO_short_hash(TEST_AUTHORITY_ALICE, | 490 | GNUNET_CRYPTO_short_hash(TEST_AUTHORITY_ALICE, |
491 | strlen(TEST_AUTHORITY_ALICE), &name_hash); | 491 | strlen(TEST_AUTHORITY_ALICE), &name_hash); |
492 | GNUNET_CRYPTO_short_hash(&bob_pkey, | 492 | GNUNET_CRYPTO_short_hash(&bob_pkey, |
493 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 493 | sizeof(struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), |
494 | &zone_hash); | 494 | &zone_hash); |
495 | GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); | 495 | GNUNET_CRYPTO_short_hash_double(&zone_hash, &zone_hash_double); |
496 | GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); | 496 | GNUNET_CRYPTO_short_hash_double(&name_hash, &name_hash_double); |
@@ -610,21 +610,21 @@ do_check (void *cls, | |||
610 | end_badly_now(); | 610 | end_badly_now(); |
611 | return; | 611 | return; |
612 | } | 612 | } |
613 | our_key = GNUNET_CRYPTO_rsa_key_create_from_file (our_keyfile); | 613 | our_key = GNUNET_CRYPTO_ecc_key_create_from_file (our_keyfile); |
614 | priv_key = GNUNET_CRYPTO_rsa_key_create_from_file (private_keyfile); | 614 | priv_key = GNUNET_CRYPTO_ecc_key_create_from_file (private_keyfile); |
615 | short_key = GNUNET_CRYPTO_rsa_key_create_from_file (shorten_keyfile); | 615 | short_key = GNUNET_CRYPTO_ecc_key_create_from_file (shorten_keyfile); |
616 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 616 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
617 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_ALICE); | 617 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_ALICE); |
618 | 618 | ||
619 | GNUNET_free(our_keyfile); | 619 | GNUNET_free(our_keyfile); |
620 | GNUNET_free(shorten_keyfile); | 620 | GNUNET_free(shorten_keyfile); |
621 | GNUNET_free(private_keyfile); | 621 | GNUNET_free(private_keyfile); |
622 | 622 | ||
623 | GNUNET_CRYPTO_rsa_key_get_public (our_key, &our_pkey); | 623 | GNUNET_CRYPTO_ecc_key_get_public (our_key, &our_pkey); |
624 | GNUNET_CRYPTO_rsa_key_get_public (priv_key, &priv_pkey); | 624 | GNUNET_CRYPTO_ecc_key_get_public (priv_key, &priv_pkey); |
625 | GNUNET_CRYPTO_rsa_key_get_public (short_key, &short_pkey); | 625 | GNUNET_CRYPTO_ecc_key_get_public (short_key, &short_pkey); |
626 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 626 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
627 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 627 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
628 | GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); | 628 | GNUNET_CRYPTO_short_hash(&bob_pkey, sizeof(bob_pkey), &bob_hash); |
629 | GNUNET_CRYPTO_short_hash(&alice_pkey, sizeof(alice_pkey), &alice_hash); | 629 | GNUNET_CRYPTO_short_hash(&alice_pkey, sizeof(alice_pkey), &alice_hash); |
630 | GNUNET_CRYPTO_short_hash(&our_pkey, sizeof(our_pkey), &our_zone); | 630 | GNUNET_CRYPTO_short_hash(&our_pkey, sizeof(our_pkey), &our_zone); |
diff --git a/src/gns/test_gns_revocation.c b/src/gns/test_gns_revocation.c index 8e677880a..540f58a35 100644 --- a/src/gns/test_gns_revocation.c +++ b/src/gns/test_gns_revocation.c | |||
@@ -180,12 +180,12 @@ do_check (void *cls, | |||
180 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 180 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
181 | struct GNUNET_TESTING_Peer *peer) | 181 | struct GNUNET_TESTING_Peer *peer) |
182 | { | 182 | { |
183 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 183 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
184 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 184 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
185 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 185 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
186 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 186 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
187 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; | 187 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; |
188 | struct GNUNET_CRYPTO_RsaSignature *sig; | 188 | struct GNUNET_CRYPTO_EccSignature *sig; |
189 | char* alice_keyfile; | 189 | char* alice_keyfile; |
190 | 190 | ||
191 | cfg = ccfg; | 191 | cfg = ccfg; |
@@ -209,11 +209,11 @@ do_check (void *cls, | |||
209 | return; | 209 | return; |
210 | } | 210 | } |
211 | 211 | ||
212 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 212 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
213 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 213 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
214 | 214 | ||
215 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 215 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
216 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 216 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
217 | 217 | ||
218 | struct GNUNET_NAMESTORE_RecordData rd; | 218 | struct GNUNET_NAMESTORE_RecordData rd; |
219 | char* ip = TEST_IP; | 219 | char* ip = TEST_IP; |
@@ -264,8 +264,8 @@ do_check (void *cls, | |||
264 | GNUNET_free (alice_keyfile); | 264 | GNUNET_free (alice_keyfile); |
265 | GNUNET_free (web); | 265 | GNUNET_free (web); |
266 | GNUNET_free (sig); | 266 | GNUNET_free (sig); |
267 | GNUNET_CRYPTO_rsa_key_free (bob_key); | 267 | GNUNET_CRYPTO_ecc_key_free (bob_key); |
268 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 268 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
269 | } | 269 | } |
270 | 270 | ||
271 | 271 | ||
diff --git a/src/gns/test_gns_simple_delegated_lookup.c b/src/gns/test_gns_simple_delegated_lookup.c index 393ddfb0e..f2610c167 100644 --- a/src/gns/test_gns_simple_delegated_lookup.c +++ b/src/gns/test_gns_simple_delegated_lookup.c | |||
@@ -189,12 +189,12 @@ do_check (void *cls, | |||
189 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 189 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
190 | struct GNUNET_TESTING_Peer *peer) | 190 | struct GNUNET_TESTING_Peer *peer) |
191 | { | 191 | { |
192 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 192 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
193 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 193 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
194 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 194 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
195 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 195 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
196 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; | 196 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; |
197 | struct GNUNET_CRYPTO_RsaSignature *sig; | 197 | struct GNUNET_CRYPTO_EccSignature *sig; |
198 | char* alice_keyfile; | 198 | char* alice_keyfile; |
199 | struct GNUNET_TIME_Absolute et; | 199 | struct GNUNET_TIME_Absolute et; |
200 | struct GNUNET_NAMESTORE_RecordData rd; | 200 | struct GNUNET_NAMESTORE_RecordData rd; |
@@ -223,10 +223,10 @@ do_check (void *cls, | |||
223 | GNUNET_SCHEDULER_shutdown (); | 223 | GNUNET_SCHEDULER_shutdown (); |
224 | return; | 224 | return; |
225 | } | 225 | } |
226 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 226 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
227 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 227 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
228 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 228 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
229 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 229 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
230 | rd.expiration_time = UINT64_MAX; | 230 | rd.expiration_time = UINT64_MAX; |
231 | GNUNET_assert (1 == inet_pton (AF_INET, ip, &web)); | 231 | GNUNET_assert (1 == inet_pton (AF_INET, ip, &web)); |
232 | GNUNET_CRYPTO_short_hash (&bob_pkey, sizeof(bob_pkey), &bob_hash); | 232 | GNUNET_CRYPTO_short_hash (&bob_pkey, sizeof(bob_pkey), &bob_hash); |
@@ -259,8 +259,8 @@ do_check (void *cls, | |||
259 | NULL); | 259 | NULL); |
260 | GNUNET_free (sig); | 260 | GNUNET_free (sig); |
261 | GNUNET_free (alice_keyfile); | 261 | GNUNET_free (alice_keyfile); |
262 | GNUNET_CRYPTO_rsa_key_free (bob_key); | 262 | GNUNET_CRYPTO_ecc_key_free (bob_key); |
263 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 263 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
264 | } | 264 | } |
265 | 265 | ||
266 | 266 | ||
diff --git a/src/gns/test_gns_simple_get_authority.c b/src/gns/test_gns_simple_get_authority.c index 111f8f1f9..300e7be5b 100644 --- a/src/gns/test_gns_simple_get_authority.c +++ b/src/gns/test_gns_simple_get_authority.c | |||
@@ -178,15 +178,15 @@ void do_check (void *cls, | |||
178 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 178 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
179 | struct GNUNET_TESTING_Peer *peer) | 179 | struct GNUNET_TESTING_Peer *peer) |
180 | { | 180 | { |
181 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded our_pkey; | 181 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded our_pkey; |
182 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 182 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
183 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 183 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
184 | struct GNUNET_CRYPTO_RsaPrivateKey *our_key; | 184 | struct GNUNET_CRYPTO_EccPrivateKey *our_key; |
185 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 185 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
186 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 186 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
187 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; | 187 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; |
188 | struct GNUNET_CRYPTO_ShortHashCode alice_hash; | 188 | struct GNUNET_CRYPTO_ShortHashCode alice_hash; |
189 | struct GNUNET_CRYPTO_RsaSignature *sig; | 189 | struct GNUNET_CRYPTO_EccSignature *sig; |
190 | char* our_keyfile; | 190 | char* our_keyfile; |
191 | 191 | ||
192 | cfg = ccfg; | 192 | cfg = ccfg; |
@@ -211,15 +211,15 @@ void do_check (void *cls, | |||
211 | return; | 211 | return; |
212 | } | 212 | } |
213 | 213 | ||
214 | our_key = GNUNET_CRYPTO_rsa_key_create_from_file (our_keyfile); | 214 | our_key = GNUNET_CRYPTO_ecc_key_create_from_file (our_keyfile); |
215 | GNUNET_free(our_keyfile); | 215 | GNUNET_free(our_keyfile); |
216 | 216 | ||
217 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 217 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
218 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_ALICE); | 218 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_ALICE); |
219 | 219 | ||
220 | GNUNET_CRYPTO_rsa_key_get_public (our_key, &our_pkey); | 220 | GNUNET_CRYPTO_ecc_key_get_public (our_key, &our_pkey); |
221 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 221 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
222 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 222 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
223 | 223 | ||
224 | struct GNUNET_NAMESTORE_RecordData rd; | 224 | struct GNUNET_NAMESTORE_RecordData rd; |
225 | char* ip = TEST_IP; | 225 | char* ip = TEST_IP; |
@@ -298,9 +298,9 @@ void do_check (void *cls, | |||
298 | 298 | ||
299 | GNUNET_free (web); | 299 | GNUNET_free (web); |
300 | GNUNET_free (sig); | 300 | GNUNET_free (sig); |
301 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 301 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
302 | GNUNET_CRYPTO_rsa_key_free (bob_key); | 302 | GNUNET_CRYPTO_ecc_key_free (bob_key); |
303 | GNUNET_CRYPTO_rsa_key_free (our_key); | 303 | GNUNET_CRYPTO_ecc_key_free (our_key); |
304 | } | 304 | } |
305 | 305 | ||
306 | 306 | ||
diff --git a/src/gns/test_gns_simple_lookup.c b/src/gns/test_gns_simple_lookup.c index 96283df5b..ff325a464 100644 --- a/src/gns/test_gns_simple_lookup.c +++ b/src/gns/test_gns_simple_lookup.c | |||
@@ -221,8 +221,8 @@ do_check (void *cls, | |||
221 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 221 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
222 | struct GNUNET_TESTING_Peer *peer) | 222 | struct GNUNET_TESTING_Peer *peer) |
223 | { | 223 | { |
224 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 224 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
225 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 225 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
226 | struct GNUNET_NAMESTORE_RecordData rd; | 226 | struct GNUNET_NAMESTORE_RecordData rd; |
227 | char* alice_keyfile; | 227 | char* alice_keyfile; |
228 | char* ip = TEST_IP; | 228 | char* ip = TEST_IP; |
@@ -251,8 +251,8 @@ do_check (void *cls, | |||
251 | return; | 251 | return; |
252 | } | 252 | } |
253 | 253 | ||
254 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 254 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
255 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 255 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
256 | GNUNET_free (alice_keyfile); | 256 | GNUNET_free (alice_keyfile); |
257 | rd.expiration_time = UINT64_MAX; | 257 | rd.expiration_time = UINT64_MAX; |
258 | GNUNET_assert (1 == inet_pton (AF_INET, ip, &web)); | 258 | GNUNET_assert (1 == inet_pton (AF_INET, ip, &web)); |
@@ -266,7 +266,7 @@ do_check (void *cls, | |||
266 | &rd, | 266 | &rd, |
267 | &commence_testing, | 267 | &commence_testing, |
268 | NULL); | 268 | NULL); |
269 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 269 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
270 | } | 270 | } |
271 | 271 | ||
272 | 272 | ||
diff --git a/src/gns/test_gns_simple_mx_lookup.c b/src/gns/test_gns_simple_mx_lookup.c index cfaea67ad..f928a3913 100644 --- a/src/gns/test_gns_simple_mx_lookup.c +++ b/src/gns/test_gns_simple_mx_lookup.c | |||
@@ -180,12 +180,12 @@ do_check (void *cls, | |||
180 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 180 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
181 | struct GNUNET_TESTING_Peer *peer) | 181 | struct GNUNET_TESTING_Peer *peer) |
182 | { | 182 | { |
183 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 183 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
184 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 184 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
185 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 185 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
186 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 186 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
187 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; | 187 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; |
188 | struct GNUNET_CRYPTO_RsaSignature *sig; | 188 | struct GNUNET_CRYPTO_EccSignature *sig; |
189 | char* alice_keyfile; | 189 | char* alice_keyfile; |
190 | struct GNUNET_TIME_Absolute et; | 190 | struct GNUNET_TIME_Absolute et; |
191 | 191 | ||
@@ -210,11 +210,11 @@ do_check (void *cls, | |||
210 | return; | 210 | return; |
211 | } | 211 | } |
212 | 212 | ||
213 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 213 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
214 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 214 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
215 | 215 | ||
216 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 216 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
217 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 217 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
218 | 218 | ||
219 | struct GNUNET_NAMESTORE_RecordData rd; | 219 | struct GNUNET_NAMESTORE_RecordData rd; |
220 | char* ip = TEST_IP; | 220 | char* ip = TEST_IP; |
@@ -282,8 +282,8 @@ do_check (void *cls, | |||
282 | GNUNET_free (mx_record); | 282 | GNUNET_free (mx_record); |
283 | GNUNET_free (mail); | 283 | GNUNET_free (mail); |
284 | GNUNET_free (sig); | 284 | GNUNET_free (sig); |
285 | GNUNET_CRYPTO_rsa_key_free (bob_key); | 285 | GNUNET_CRYPTO_ecc_key_free (bob_key); |
286 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 286 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
287 | } | 287 | } |
288 | 288 | ||
289 | 289 | ||
diff --git a/src/gns/test_gns_simple_shorten.c b/src/gns/test_gns_simple_shorten.c index c6d49f82f..9b61a41c8 100644 --- a/src/gns/test_gns_simple_shorten.c +++ b/src/gns/test_gns_simple_shorten.c | |||
@@ -61,10 +61,10 @@ static struct GNUNET_GNS_Handle *gns_handle; | |||
61 | 61 | ||
62 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 62 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
63 | 63 | ||
64 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded priv_pkey; | 64 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded priv_pkey; |
65 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded short_pkey; | 65 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded short_pkey; |
66 | struct GNUNET_CRYPTO_RsaPrivateKey *priv_key; | 66 | struct GNUNET_CRYPTO_EccPrivateKey *priv_key; |
67 | struct GNUNET_CRYPTO_RsaPrivateKey *short_key; | 67 | struct GNUNET_CRYPTO_EccPrivateKey *short_key; |
68 | 68 | ||
69 | struct GNUNET_CRYPTO_ShortHashCode priv_zone; | 69 | struct GNUNET_CRYPTO_ShortHashCode priv_zone; |
70 | struct GNUNET_CRYPTO_ShortHashCode short_zone; | 70 | struct GNUNET_CRYPTO_ShortHashCode short_zone; |
@@ -170,15 +170,15 @@ void do_check (void *cls, | |||
170 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 170 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
171 | struct GNUNET_TESTING_Peer *peer) | 171 | struct GNUNET_TESTING_Peer *peer) |
172 | { | 172 | { |
173 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded our_pkey; | 173 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded our_pkey; |
174 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 174 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
175 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 175 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
176 | struct GNUNET_CRYPTO_RsaPrivateKey *our_key; | 176 | struct GNUNET_CRYPTO_EccPrivateKey *our_key; |
177 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 177 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
178 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 178 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
179 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; | 179 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; |
180 | struct GNUNET_CRYPTO_ShortHashCode alice_hash; | 180 | struct GNUNET_CRYPTO_ShortHashCode alice_hash; |
181 | struct GNUNET_CRYPTO_RsaSignature *sig; | 181 | struct GNUNET_CRYPTO_EccSignature *sig; |
182 | char* our_keyfile; | 182 | char* our_keyfile; |
183 | char* private_keyfile; | 183 | char* private_keyfile; |
184 | char* shorten_keyfile; | 184 | char* shorten_keyfile; |
@@ -226,22 +226,22 @@ void do_check (void *cls, | |||
226 | return; | 226 | return; |
227 | } | 227 | } |
228 | 228 | ||
229 | our_key = GNUNET_CRYPTO_rsa_key_create_from_file (our_keyfile); | 229 | our_key = GNUNET_CRYPTO_ecc_key_create_from_file (our_keyfile); |
230 | GNUNET_free(our_keyfile); | 230 | GNUNET_free(our_keyfile); |
231 | 231 | ||
232 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 232 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
233 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_ALICE); | 233 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_ALICE); |
234 | priv_key = GNUNET_CRYPTO_rsa_key_create_from_file (private_keyfile); | 234 | priv_key = GNUNET_CRYPTO_ecc_key_create_from_file (private_keyfile); |
235 | short_key = GNUNET_CRYPTO_rsa_key_create_from_file (shorten_keyfile); | 235 | short_key = GNUNET_CRYPTO_ecc_key_create_from_file (shorten_keyfile); |
236 | 236 | ||
237 | GNUNET_free(shorten_keyfile); | 237 | GNUNET_free(shorten_keyfile); |
238 | GNUNET_free(private_keyfile); | 238 | GNUNET_free(private_keyfile); |
239 | 239 | ||
240 | GNUNET_CRYPTO_rsa_key_get_public (our_key, &our_pkey); | 240 | GNUNET_CRYPTO_ecc_key_get_public (our_key, &our_pkey); |
241 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 241 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
242 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 242 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
243 | GNUNET_CRYPTO_rsa_key_get_public (priv_key, &priv_pkey); | 243 | GNUNET_CRYPTO_ecc_key_get_public (priv_key, &priv_pkey); |
244 | GNUNET_CRYPTO_rsa_key_get_public (short_key, &short_pkey); | 244 | GNUNET_CRYPTO_ecc_key_get_public (short_key, &short_pkey); |
245 | 245 | ||
246 | GNUNET_CRYPTO_short_hash(&priv_pkey, sizeof(priv_pkey), &priv_zone); | 246 | GNUNET_CRYPTO_short_hash(&priv_pkey, sizeof(priv_pkey), &priv_zone); |
247 | GNUNET_CRYPTO_short_hash(&short_pkey, sizeof(short_pkey), &short_zone); | 247 | GNUNET_CRYPTO_short_hash(&short_pkey, sizeof(short_pkey), &short_zone); |
@@ -318,11 +318,11 @@ void do_check (void *cls, | |||
318 | NULL); | 318 | NULL); |
319 | 319 | ||
320 | GNUNET_free(web); | 320 | GNUNET_free(web); |
321 | GNUNET_CRYPTO_rsa_key_free(our_key); | 321 | GNUNET_CRYPTO_ecc_key_free(our_key); |
322 | GNUNET_CRYPTO_rsa_key_free(bob_key); | 322 | GNUNET_CRYPTO_ecc_key_free(bob_key); |
323 | GNUNET_CRYPTO_rsa_key_free(alice_key); | 323 | GNUNET_CRYPTO_ecc_key_free(alice_key); |
324 | GNUNET_CRYPTO_rsa_key_free(priv_key); | 324 | GNUNET_CRYPTO_ecc_key_free(priv_key); |
325 | GNUNET_CRYPTO_rsa_key_free(short_key); | 325 | GNUNET_CRYPTO_ecc_key_free(short_key); |
326 | 326 | ||
327 | } | 327 | } |
328 | 328 | ||
diff --git a/src/gns/test_gns_simple_srv_lookup.c b/src/gns/test_gns_simple_srv_lookup.c index 40e5aec8d..c0208639d 100644 --- a/src/gns/test_gns_simple_srv_lookup.c +++ b/src/gns/test_gns_simple_srv_lookup.c | |||
@@ -182,12 +182,12 @@ do_check (void *cls, | |||
182 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 182 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
183 | struct GNUNET_TESTING_Peer *peer) | 183 | struct GNUNET_TESTING_Peer *peer) |
184 | { | 184 | { |
185 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 185 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
186 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 186 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
187 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 187 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
188 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 188 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
189 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; | 189 | struct GNUNET_CRYPTO_ShortHashCode bob_hash; |
190 | struct GNUNET_CRYPTO_RsaSignature *sig; | 190 | struct GNUNET_CRYPTO_EccSignature *sig; |
191 | char* alice_keyfile; | 191 | char* alice_keyfile; |
192 | struct srv_data *srv_data; | 192 | struct srv_data *srv_data; |
193 | struct GNUNET_TIME_Absolute et; | 193 | struct GNUNET_TIME_Absolute et; |
@@ -213,11 +213,11 @@ do_check (void *cls, | |||
213 | return; | 213 | return; |
214 | } | 214 | } |
215 | 215 | ||
216 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 216 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
217 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 217 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
218 | 218 | ||
219 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 219 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
220 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 220 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
221 | 221 | ||
222 | struct GNUNET_NAMESTORE_RecordData rd; | 222 | struct GNUNET_NAMESTORE_RecordData rd; |
223 | char* ip = TEST_IP; | 223 | char* ip = TEST_IP; |
@@ -288,8 +288,8 @@ do_check (void *cls, | |||
288 | GNUNET_free (srv_data); | 288 | GNUNET_free (srv_data); |
289 | GNUNET_free (sipserver); | 289 | GNUNET_free (sipserver); |
290 | GNUNET_free (sig); | 290 | GNUNET_free (sig); |
291 | GNUNET_CRYPTO_rsa_key_free (bob_key); | 291 | GNUNET_CRYPTO_ecc_key_free (bob_key); |
292 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 292 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
293 | } | 293 | } |
294 | 294 | ||
295 | 295 | ||
diff --git a/src/gns/test_gns_simple_zkey_lookup.c b/src/gns/test_gns_simple_zkey_lookup.c index dd1a3f7bd..923664b77 100644 --- a/src/gns/test_gns_simple_zkey_lookup.c +++ b/src/gns/test_gns_simple_zkey_lookup.c | |||
@@ -199,11 +199,11 @@ do_check (void *cls, | |||
199 | const struct GNUNET_CONFIGURATION_Handle *ccfg, | 199 | const struct GNUNET_CONFIGURATION_Handle *ccfg, |
200 | struct GNUNET_TESTING_Peer *peer) | 200 | struct GNUNET_TESTING_Peer *peer) |
201 | { | 201 | { |
202 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey; | 202 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded alice_pkey; |
203 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded bob_pkey; | 203 | struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded bob_pkey; |
204 | struct GNUNET_CRYPTO_RsaPrivateKey *alice_key; | 204 | struct GNUNET_CRYPTO_EccPrivateKey *alice_key; |
205 | struct GNUNET_CRYPTO_RsaPrivateKey *bob_key; | 205 | struct GNUNET_CRYPTO_EccPrivateKey *bob_key; |
206 | struct GNUNET_CRYPTO_RsaSignature *sig; | 206 | struct GNUNET_CRYPTO_EccSignature *sig; |
207 | char* alice_keyfile; | 207 | char* alice_keyfile; |
208 | 208 | ||
209 | cfg = ccfg; | 209 | cfg = ccfg; |
@@ -227,11 +227,11 @@ do_check (void *cls, | |||
227 | return; | 227 | return; |
228 | } | 228 | } |
229 | 229 | ||
230 | alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); | 230 | alice_key = GNUNET_CRYPTO_ecc_key_create_from_file (alice_keyfile); |
231 | bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (KEYFILE_BOB); | 231 | bob_key = GNUNET_CRYPTO_ecc_key_create_from_file (KEYFILE_BOB); |
232 | 232 | ||
233 | GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); | 233 | GNUNET_CRYPTO_ecc_key_get_public (alice_key, &alice_pkey); |
234 | GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); | 234 | GNUNET_CRYPTO_ecc_key_get_public (bob_key, &bob_pkey); |
235 | 235 | ||
236 | struct GNUNET_NAMESTORE_RecordData rd; | 236 | struct GNUNET_NAMESTORE_RecordData rd; |
237 | char* ip = TEST_IP; | 237 | char* ip = TEST_IP; |
@@ -273,8 +273,8 @@ do_check (void *cls, | |||
273 | GNUNET_free (alice_keyfile); | 273 | GNUNET_free (alice_keyfile); |
274 | GNUNET_free (web); | 274 | GNUNET_free (web); |
275 | GNUNET_free (sig); | 275 | GNUNET_free (sig); |
276 | GNUNET_CRYPTO_rsa_key_free (bob_key); | 276 | GNUNET_CRYPTO_ecc_key_free (bob_key); |
277 | GNUNET_CRYPTO_rsa_key_free (alice_key); | 277 | GNUNET_CRYPTO_ecc_key_free (alice_key); |
278 | } | 278 | } |
279 | 279 | ||
280 | 280 | ||
diff --git a/src/gns/zonefiles/test_zonekey b/src/gns/zonefiles/test_zonekey index cfa760624..870c56315 100644 --- a/src/gns/zonefiles/test_zonekey +++ b/src/gns/zonefiles/test_zonekey | |||
Binary files differ | |||