-fix uninit and fix leak
[oweals/gnunet.git] / src / gns / gnunet-service-gns_interceptor.c
index 9c1c3a6666c1e336ef69efd98256071cde9c0afd..affa0f5d6f64374a5549d7019b526e9fcdb4d60a 100644 (file)
@@ -30,8 +30,6 @@
 #include "gnunet-service-gns_resolver.h"
 #include "gns.h"
 
-#define MAX_DNS_LABEL_LENGTH 63
-
 /**
  * Handle to a DNS intercepted
  * reslution request
@@ -68,7 +66,7 @@ static struct GNUNET_CRYPTO_ShortHashCode our_zone;
 /**
  * Our priv key
  */
-static struct GNUNET_CRYPTO_RsaPrivateKey *our_key;
+static struct GNUNET_CRYPTO_EccPrivateKey *our_key;
 
 /**
  * Default timeout
@@ -312,7 +310,7 @@ handle_dns_request (void *cls,
    * Check for .gads/.zkey
    */
   
-  if ((is_gnunet_tld(p->queries[0].name) == GNUNET_YES) ||
+  if ((is_gads_tld(p->queries[0].name) == GNUNET_YES) ||
       (is_zkey_tld(p->queries[0].name) == GNUNET_YES) ||
       (strcmp(p->queries[0].name, GNUNET_GNS_TLD) == 0))
   {
@@ -346,7 +344,7 @@ handle_dns_request (void *cls,
  */
 int
 gns_interceptor_init (struct GNUNET_CRYPTO_ShortHashCode zone,
-                     struct GNUNET_CRYPTO_RsaPrivateKey *key,
+                     struct GNUNET_CRYPTO_EccPrivateKey *key,
                      const struct GNUNET_CONFIGURATION_Handle *c)
 {
   GNUNET_log(GNUNET_ERROR_TYPE_INFO,