From: Christian Grothoff Date: Wed, 7 Mar 2012 09:33:59 +0000 (+0000) Subject: -PKEY records should contain hash of public key, not public key X-Git-Tag: initial-import-from-subversion-38251~14389 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1eb6660144445bd81396eea0bf49d42efc07e5ed;p=oweals%2Fgnunet.git -PKEY records should contain hash of public key, not public key --- diff --git a/src/gns/gns.conf.in b/src/gns/gns.conf.in index 6ee09018c..07a955a9c 100644 --- a/src/gns/gns.conf.in +++ b/src/gns/gns.conf.in @@ -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 diff --git a/src/gns/gnunet-gns-fcfsd.c b/src/gns/gnunet-gns-fcfsd.c index 178772089..f931a3680 100644 --- a/src/gns/gnunet-gns-fcfsd.c +++ b/src/gns/gnunet-gns-fcfsd.c @@ -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",