(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Sun, 25 Jul 2010 14:17:24 +0000 (14:17 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Sun, 25 Jul 2010 14:17:24 +0000 (14:17 +0000)
src/transport/Makefile.am
src/transport/test_plugin_transport_https.c
src/transport/test_transport_api.c
src/transport/test_transport_api_http_peer1.conf
src/transport/test_transport_api_http_peer2.conf

index f4824ab701f79049637c1cbdd8ebe6aa98a37b8a..cf73faa9e337357c43dd32e0a9651410037014b5 100644 (file)
@@ -14,7 +14,9 @@ if HAVE_MHD
                      test_transport_api_reliability_http
                      
  HTTPS_PLUGIN_LA = libgnunet_plugin_transport_https.la
- HTTPS_PLUGIN_CHECK = test_plugin_transport_https                     
+ HTTPS_PLUGIN_CHECK = test_plugin_transport_https \
+                      test_transport_api_https \
+                     test_transport_api_reliability_https                     
 endif
 
 if USE_COVERAGE
@@ -238,7 +240,18 @@ test_plugin_transport_https_LDADD = \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  @LIBCURL@ \
  $(top_builddir)/src/util/libgnunetutil.la  
-    
+
+test_transport_api_https_SOURCES = \
+ test_transport_api.c
+test_transport_api_https_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la  
+test_transport_api_reliability_https_SOURCES = \
+ test_transport_api_reliability.c
+test_transport_api_reliability_https_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la    
 endif
 
 EXTRA_DIST = \
index 7c92291115041217b23f118855b23a9139a8048d..f22f6e95fbec6f72b14183cbfe5d43d524a1b53f 100644 (file)
@@ -548,7 +548,7 @@ receive (void *cls,
   if ((ntohs(message->type)==32) && (ntohs(message->size) == GNUNET_SERVER_MAX_MESSAGE_SIZE-1))
   {
     fail_msg_transmited_max_size = GNUNET_NO;
-    //shutdown_clean();
+    shutdown_clean();
   }
 
   return GNUNET_TIME_UNIT_ZERO;
@@ -963,7 +963,7 @@ static void run_connection_tests( int phase , void * cls)
     {
       /* Connecting to peer without identification */
       char * ident = "";
-      GNUNET_asprintf (&host_str, "http://%s/%s",test_addr,ident);
+      GNUNET_asprintf (&host_str, "https://%s/%s",test_addr,ident);
       GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Connecting to peer without any peer identification.\n"));
       test_no_ident.test_executed = GNUNET_YES;
       send_data ( &test_no_ident, host_str);
@@ -974,7 +974,7 @@ static void run_connection_tests( int phase , void * cls)
     {
       char * ident = "AAAAAAAAAA";
       /* Connecting to peer with too short identification */
-      GNUNET_asprintf (&host_str, "http://%s/%s",test_addr,ident);
+      GNUNET_asprintf (&host_str, "https://%s/%s",test_addr,ident);
       GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Connecting to peer with too short peer identification.\n"));
       test_too_short_ident.test_executed = GNUNET_YES;
       send_data ( &test_too_short_ident, host_str);
@@ -987,7 +987,7 @@ static void run_connection_tests( int phase , void * cls)
       char * ident = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
 
       /* Connecting to peer with too long identification */
-      GNUNET_asprintf (&host_str, "http://%s/%s",test_addr,ident);
+      GNUNET_asprintf (&host_str, "https://%s/%s",test_addr,ident);
       GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Connecting to peer with too long peer identification.\n"));
       test_too_long_ident.test_executed = GNUNET_YES;
       send_data ( &test_too_long_ident, host_str);
@@ -998,7 +998,7 @@ static void run_connection_tests( int phase , void * cls)
     {
       struct GNUNET_CRYPTO_HashAsciiEncoded ident;
       GNUNET_CRYPTO_hash_to_enc(&my_identity.hashPubKey,&ident);
-      GNUNET_asprintf (&host_str, "http://%s/%s%s",test_addr,(char *) &ident,";0");
+      GNUNET_asprintf (&host_str, "https://%s/%s%s",test_addr,(char *) &ident,";0");
       GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Connecting to peer with valid peer identification.\n"));
       test_valid_ident.test_executed = GNUNET_YES;
       send_data ( &test_valid_ident, host_str);
index 7aa81bff860982b3c99190310b67bb44d9d29832..de75d5da330f41d442923d380f411192716e07cc 100644 (file)
@@ -82,6 +82,8 @@ static int is_udp_nat;
 
 static int is_http;
 
+static int is_https;
+
 static  GNUNET_SCHEDULER_TaskIdentifier die_task;
 
 #if VERBOSE
@@ -308,7 +310,11 @@ run (void *cls,
       setup_peer (&p1, "test_transport_api_http_peer1.conf");
       setup_peer (&p2, "test_transport_api_http_peer2.conf");
     }
-
+  else if (is_https)
+    {
+      setup_peer (&p1, "test_transport_api_https_peer1.conf");
+      setup_peer (&p2, "test_transport_api_https_peer2.conf");
+    }
   GNUNET_assert(p1.th != NULL);
   GNUNET_assert(p2.th != NULL);
 
@@ -441,7 +447,10 @@ main (int argc, char *argv[])
     {
       is_http = GNUNET_YES;
     }
-
+  else if (strstr(argv[0], "https") != NULL)
+    {
+      is_https = GNUNET_YES;
+    }
   GNUNET_log_setup ("test-transport-api",
 #if VERBOSE
                     "DEBUG",
index bb7027c0d6364cce5d14364edfccb2fb88a24ebd..1430197d336e5abbec912013948a5d4f70431d45 100644 (file)
@@ -6,6 +6,13 @@ USE_IPv4 = YES
 #BINDTO4 = 127.0.0.1
 #BINDTO6 = ::1
 
+[transport-https]
+PORT = 42389
+DEBUG = NO
+USE_IPv6 = YES
+USE_IPv4 = YES
+#BINDTO4 = 127.0.0.1
+#BINDTO6 = ::1
 
 [fs]
 AUTOSTART = NO
@@ -36,7 +43,7 @@ FRIENDS-ONLY = NO
 MINIMUM-FRIENDS = 0
 
 [transport]
-PLUGINS = http
+PLUGINS = https
 #PLUGINS = tcp http
 DEBUG = YES
 ACCEPT_FROM6 = ::1;
index 910a63c9c7cbe4ab9d5695db1074ecc525678ab3..cbdf981d47e9352bbfb5103653e5d554f740db5c 100644 (file)
@@ -6,6 +6,14 @@ USE_IPv4 = YES
 #BINDTO4 = 127.0.0.1
 #BINDTO6 = ::1
 
+[transport-https]
+PORT = 42388
+DEBUG = NO
+USE_IPv6 = YES
+USE_IPv4 = YES
+#BINDTO4 = 127.0.0.1
+#BINDTO6 = ::1
+
 [fs]
 AUTOSTART = NO