gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r12341 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r12341 - gnunet/src/transport
Date: Sun, 25 Jul 2010 16:17:24 +0200

Author: wachs
Date: 2010-07-25 16:17:24 +0200 (Sun, 25 Jul 2010)
New Revision: 12341

Modified:
   gnunet/src/transport/Makefile.am
   gnunet/src/transport/test_plugin_transport_https.c
   gnunet/src/transport/test_transport_api.c
   gnunet/src/transport/test_transport_api_http_peer1.conf
   gnunet/src/transport/test_transport_api_http_peer2.conf
Log:


Modified: gnunet/src/transport/Makefile.am
===================================================================
--- gnunet/src/transport/Makefile.am    2010-07-25 13:58:38 UTC (rev 12340)
+++ gnunet/src/transport/Makefile.am    2010-07-25 14:17:24 UTC (rev 12341)
@@ -14,7 +14,9 @@
                      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 @@
  $(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 = \

Modified: gnunet/src/transport/test_plugin_transport_https.c
===================================================================
--- gnunet/src/transport/test_plugin_transport_https.c  2010-07-25 13:58:38 UTC 
(rev 12340)
+++ gnunet/src/transport/test_plugin_transport_https.c  2010-07-25 14:17:24 UTC 
(rev 12341)
@@ -548,7 +548,7 @@
   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 @@
     {
       /* 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 @@
     {
       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 @@
       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 @@
     {
       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);

Modified: gnunet/src/transport/test_transport_api.c
===================================================================
--- gnunet/src/transport/test_transport_api.c   2010-07-25 13:58:38 UTC (rev 
12340)
+++ gnunet/src/transport/test_transport_api.c   2010-07-25 14:17:24 UTC (rev 
12341)
@@ -82,6 +82,8 @@
 
 static int is_http;
 
+static int is_https;
+
 static  GNUNET_SCHEDULER_TaskIdentifier die_task;
 
 #if VERBOSE
@@ -308,7 +310,11 @@
       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 @@
     {
       is_http = GNUNET_YES;
     }
-
+  else if (strstr(argv[0], "https") != NULL)
+    {
+      is_https = GNUNET_YES;
+    }
   GNUNET_log_setup ("test-transport-api",
 #if VERBOSE
                     "DEBUG",

Modified: gnunet/src/transport/test_transport_api_http_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_http_peer1.conf     2010-07-25 
13:58:38 UTC (rev 12340)
+++ gnunet/src/transport/test_transport_api_http_peer1.conf     2010-07-25 
14:17:24 UTC (rev 12341)
@@ -6,6 +6,13 @@
 #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 @@
 MINIMUM-FRIENDS = 0
 
 [transport]
-PLUGINS = http
+PLUGINS = https
 #PLUGINS = tcp http
 DEBUG = YES
 ACCEPT_FROM6 = ::1;

Modified: gnunet/src/transport/test_transport_api_http_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_http_peer2.conf     2010-07-25 
13:58:38 UTC (rev 12340)
+++ gnunet/src/transport/test_transport_api_http_peer2.conf     2010-07-25 
14:17:24 UTC (rev 12341)
@@ -6,6 +6,14 @@
 #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
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]