diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-05-09 11:07:47 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-05-09 11:07:47 +0000 |
commit | 6143cf95a47f8ec7de7898a416557f5034c36b27 (patch) | |
tree | 1f2ff800e197a13b59c17037173241e3e641411b /src/gns/gnunet-service-gns.c | |
parent | 695901a05a1ffc75be39e367fafa66fb7be1c7a3 (diff) | |
download | gnunet-6143cf95a47f8ec7de7898a416557f5034c36b27.tar.gz gnunet-6143cf95a47f8ec7de7898a416557f5034c36b27.zip |
-per user lookups done
Diffstat (limited to 'src/gns/gnunet-service-gns.c')
-rw-r--r-- | src/gns/gnunet-service-gns.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index d964a6f68..6e157ca4b 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -435,6 +435,9 @@ lookup_private_key(struct GNUNET_CRYPTO_ShortHashCode *zone) | |||
435 | struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; | 435 | struct GNUNET_CRYPTO_ShortHashAsciiEncoded zonename; |
436 | char* location; | 436 | char* location; |
437 | struct GNUNET_CRYPTO_RsaPrivateKey *key = NULL; | 437 | struct GNUNET_CRYPTO_RsaPrivateKey *key = NULL; |
438 | |||
439 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
440 | "Looking for private key\n"); | ||
438 | 441 | ||
439 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (GNS_cfg, | 442 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (GNS_cfg, |
440 | "namestore", | 443 | "namestore", |
@@ -445,10 +448,19 @@ lookup_private_key(struct GNUNET_CRYPTO_ShortHashCode *zone) | |||
445 | return NULL; | 448 | return NULL; |
446 | } | 449 | } |
447 | 450 | ||
451 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
452 | "Zonefile directory is %s\n", keydir); | ||
453 | |||
448 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); | 454 | GNUNET_CRYPTO_short_hash_to_enc (zone, &zonename); |
449 | 455 | ||
456 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
457 | "Zonefile is %s.zkey\n", &zonename); | ||
458 | |||
450 | GNUNET_asprintf(&location, "%s%s%s.zkey", keydir, | 459 | GNUNET_asprintf(&location, "%s%s%s.zkey", keydir, |
451 | DIR_SEPARATOR_STR, zonename); | 460 | DIR_SEPARATOR_STR, &zonename); |
461 | |||
462 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
463 | "Checking for %s\n", location); | ||
452 | 464 | ||
453 | if (GNUNET_YES == GNUNET_DISK_file_test (location)) | 465 | if (GNUNET_YES == GNUNET_DISK_file_test (location)) |
454 | key = GNUNET_CRYPTO_rsa_key_create_from_file (location); | 466 | key = GNUNET_CRYPTO_rsa_key_create_from_file (location); |
@@ -862,7 +874,7 @@ handle_lookup(void *cls, | |||
862 | key = zone_key; | 874 | key = zone_key; |
863 | else | 875 | else |
864 | { | 876 | { |
865 | key = lookup_private_key(&sh_msg->zone); | 877 | key = lookup_private_key(&zone); |
866 | clh->zone_key = key; | 878 | clh->zone_key = key; |
867 | } | 879 | } |
868 | 880 | ||