-more rsa refactoring
[oweals/gnunet.git] / src / gns / test_gns_proxy.c
index 96fe35edefc6cb75f7fb2b5ee3a9dfa0fee18b3b..545551411ebeab1a544cbff175a5a0d0c42a2f98 100644 (file)
@@ -32,7 +32,7 @@
 #include "gnunet_os_lib.h"
 
 #define PORT 8080
-#define TEST_DOMAIN "www.gnunet"
+#define TEST_DOMAIN "www.gads"
 
 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 300)
 
@@ -135,11 +135,21 @@ do_shutdown ()
   GNUNET_free_non_null (url);
 
   if (NULL != tmp_cfgfile)
-    remove (tmp_cfgfile);
-
+    {
+      if (0 != remove (tmp_cfgfile))
+       GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "remove", tmp_cfgfile);
+      GNUNET_free (tmp_cfgfile);
+      tmp_cfgfile = NULL;
+    }
   if (NULL != proxy_proc)
-    GNUNET_OS_process_kill (proxy_proc, 9);
+    {
+      (void) GNUNET_OS_process_kill (proxy_proc, SIGKILL);
+      GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (proxy_proc));
+      GNUNET_OS_process_destroy (proxy_proc);
+      proxy_proc = NULL;
+    }
   url = NULL;
+  GNUNET_SCHEDULER_shutdown ();
 }
 
 
@@ -447,7 +457,7 @@ main (int argc, char *const *argv)
     return 0;
   }
 
-  GNUNET_CRYPTO_setup_hostkey ("test_gns_proxy.conf");
+  GNUNET_CRYPTO_rsa_setup_hostkey ("test_gns_proxy.conf");
   
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
   {