diff options
Diffstat (limited to 'src/gns/gnunet-gns-proxy.c')
-rw-r--r-- | src/gns/gnunet-gns-proxy.c | 30 |
1 files changed, 15 insertions, 15 deletions
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 | ||