-PKEY records should contain hash of public key, not public key
authorChristian Grothoff <christian@grothoff.org>
Wed, 7 Mar 2012 09:33:59 +0000 (09:33 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 7 Mar 2012 09:33:59 +0000 (09:33 +0000)
src/gns/gns.conf.in
src/gns/gnunet-gns-fcfsd.c

index 6ee09018cbc8d97e77d843ba3ad94cf8fbb3c00b..07a955a9c0827c5adbf21f041d1e1b743ea00d1a 100644 (file)
@@ -5,7 +5,7 @@ HOME = $SERVICEHOME
 CONFIG = $DEFAULTCONFIG
 BINARY = gnunet-service-gns
 UNIXPATH = /tmp/gnunet-service-gns.sock
-ZONEKEY = zonekey
+ZONEKEY = $SERVICEHOME/gns/zonekey
 HIJACK_DNS = YES
 OPTIONS = -L INFO
 
index 178772089e2ed438fab4ad0a3287c9922410b97e..f931a368038c3726264331a120c21674bb0283df 100644 (file)
@@ -368,12 +368,12 @@ lookup_result_processor (void *cls,
 {
   struct Request *request = cls;
   struct GNUNET_NAMESTORE_RecordData r;
-  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
+  GNUNET_HashCode pub;
   
   GNUNET_assert (GNUNET_OK ==
-                GNUNET_CRYPTO_rsa_public_key_from_string (request->public_key,
-                                                          strlen (request->public_key),
-                                                          &pub));
+                GNUNET_CRYPTO_hash_from_string2 (request->public_key,
+                                                 strlen (request->public_key),
+                                                 &pub));
   request->qe = NULL;
   if (0 != rd_count)
   {
@@ -435,7 +435,7 @@ create_response (void *cls,
   struct MHD_Response *response;
   struct Request *request;
   int ret;
-  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
+  GNUNET_HashCode pub;
 
   if ( (0 == strcmp (method, MHD_HTTP_METHOD_GET)) ||
        (0 == strcmp (method, MHD_HTTP_METHOD_HEAD)) )
@@ -481,9 +481,9 @@ create_response (void *cls,
        request->pp = NULL;
       }
       if (GNUNET_OK !=
-         GNUNET_CRYPTO_rsa_public_key_from_string (request->public_key,
-                                                   strlen (request->public_key),
-                                                   &pub))
+         GNUNET_CRYPTO_hash_from_string2 (request->public_key,
+                                          strlen (request->public_key),
+                                          &pub))
       {
        /* parse error */
        return fill_s_reply ("Failed to parse given public key",