gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r12461 - gnunet/src/transport
Date: Wed, 4 Aug 2010 17:28:08 +0200

Author: wachs
Date: 2010-08-04 17:28:08 +0200 (Wed, 04 Aug 2010)
New Revision: 12461

Modified:
   gnunet/src/transport/plugin_transport_https.c
   gnunet/src/transport/test_plugin_transport_data_http.conf
   gnunet/src/transport/test_transport_api_https_peer1.conf
   gnunet/src/transport/test_transport_api_https_peer2.conf
   gnunet/src/transport/test_transport_api_rel_https_peer1.conf
   gnunet/src/transport/test_transport_api_rel_https_peer2.conf
Log:
changed https cipher from aes256 to rc4-128 SHA1
-> 3x faster
crypto_init string can be configured in the config file for testing
purposes



Modified: gnunet/src/transport/plugin_transport_https.c
===================================================================
--- gnunet/src/transport/plugin_transport_https.c       2010-08-04 12:51:41 UTC 
(rev 12460)
+++ gnunet/src/transport/plugin_transport_https.c       2010-08-04 15:28:08 UTC 
(rev 12461)
@@ -370,6 +370,8 @@
 
   /* The private key MHD uses as an \0 terminated string */
   char * key;
+  
+  char * crypto_init;
 };
 
 
@@ -2347,7 +2349,8 @@
 
   GNUNET_free_non_null (plugin->bind4_address);
   GNUNET_free_non_null (plugin->bind6_address);
-  GNUNET_free_non_null(plugin->bind_hostname);
+  GNUNET_free_non_null (plugin->bind_hostname);
+  GNUNET_free_non_null (plugin->crypto_init);
   GNUNET_free (plugin);
   GNUNET_free (api);
 #if DEBUG_HTTPS
@@ -2453,9 +2456,37 @@
                  plugin->bind4_address = NULL;
          }
   }
+  
+    /* Get crypto init string from config */
+  if (GNUNET_CONFIGURATION_have_value (env->cfg,
+                                                                          
"transport-https", "CRYPTO_INIT"))
+  {
+               GNUNET_CONFIGURATION_get_value_string (env->cfg,
+                                                                               
           "transport-https",
+                                                                               
           "CRYPTO_INIT",
+                                                                               
           &plugin->crypto_init);
+  }
+  else
+  {
+         GNUNET_asprintf(&plugin->crypto_init,"NORMAL");
+  }
 
   /* Get private key file from config */
   if (GNUNET_CONFIGURATION_have_value (env->cfg,
+                                                                          
"transport-https", "CERT_FILE"))
+  {
+         GNUNET_CONFIGURATION_get_value_string (env->cfg,
+                                                                               
         "transport-https",
+                                                                               
     "CERT_FILE",
+                                                                               
     &cert_file);
+  }
+  else
+  {
+         GNUNET_asprintf(&cert_file,"https.cert");
+  }
+
+  /* Get private key file from config */
+  if (GNUNET_CONFIGURATION_have_value (env->cfg,
                                                                           
"transport-https", "KEY_FILE"))
   {
                GNUNET_CONFIGURATION_get_value_string (env->cfg,
@@ -2576,6 +2607,11 @@
                                        port,
                                        &mhd_accept_cb,
                                        plugin , &mdh_access_cb, plugin,
+                                       /*MHD_OPTION_HTTPS_PRIORITIES,  
"NORMAL:",*/
+                                       /*MHD_OPTION_HTTPS_PRIORITIES,  
"PERFORMANCE:",*/
+                                       /* MHD_OPTION_HTTPS_PRIORITIES, 
"NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL", */
+                                       /*MHD_OPTION_HTTPS_PRIORITIES,  
"NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL",*/
+                                      MHD_OPTION_HTTPS_PRIORITIES,  
plugin->crypto_init,
                                        MHD_OPTION_HTTPS_MEM_KEY, plugin->key,
                                        MHD_OPTION_HTTPS_MEM_CERT, plugin->cert,
                                        MHD_OPTION_SOCK_ADDR, tmp,
@@ -2596,6 +2632,11 @@
                                        port,
                                        &mhd_accept_cb,
                                        plugin , &mdh_access_cb, plugin,
+                                       /*MHD_OPTION_HTTPS_PRIORITIES,  
"NORMAL:",*/
+                                       /*MHD_OPTION_HTTPS_PRIORITIES,  
"PERFORMANCE:",*/
+                                       /* MHD_OPTION_HTTPS_PRIORITIES, 
"NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL", */
+                                       /*MHD_OPTION_HTTPS_PRIORITIES,  
"NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL",*/
+                                      MHD_OPTION_HTTPS_PRIORITIES,  
plugin->crypto_init,
                                        MHD_OPTION_HTTPS_MEM_KEY, plugin->key,
                                        MHD_OPTION_HTTPS_MEM_CERT, plugin->cert,
                                        MHD_OPTION_SOCK_ADDR, (struct 
sockaddr_in *)plugin->bind4_address,

Modified: gnunet/src/transport/test_plugin_transport_data_http.conf
===================================================================
--- gnunet/src/transport/test_plugin_transport_data_http.conf   2010-08-04 
12:51:41 UTC (rev 12460)
+++ gnunet/src/transport/test_plugin_transport_data_http.conf   2010-08-04 
15:28:08 UTC (rev 12461)
@@ -24,8 +24,10 @@
 #BINDTO6 = ::1
 KEY_FILE = https_key.key
 CERT_FILE = https_cert.crt
+CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL
+#CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL
+#CRYPTO_INIT = PERFORMANCE
 
-
 [transport]
 PREFIX = valgrind --leak-check=full
 #DEBUG = YES

Modified: gnunet/src/transport/test_transport_api_https_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_https_peer1.conf    2010-08-04 
12:51:41 UTC (rev 12460)
+++ gnunet/src/transport/test_transport_api_https_peer1.conf    2010-08-04 
15:28:08 UTC (rev 12461)
@@ -15,6 +15,9 @@
 #BINDTO6 = ::1
 KEY_FILE = https_key_p1.key
 CERT_FILE = https_cert_p1.crt
+CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL
+#CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL
+#CRYPTO_INIT = PERFORMANCE
 
 [fs]
 AUTOSTART = NO

Modified: gnunet/src/transport/test_transport_api_https_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_https_peer2.conf    2010-08-04 
12:51:41 UTC (rev 12460)
+++ gnunet/src/transport/test_transport_api_https_peer2.conf    2010-08-04 
15:28:08 UTC (rev 12461)
@@ -15,6 +15,9 @@
 #BINDTO6 = ::1
 KEY_FILE = https_key_p2.key
 CERT_FILE = https_cert_p2.crt
+CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL
+#CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL
+#CRYPTO_INIT = PERFORMANCE
 
 [fs]
 AUTOSTART = NO

Modified: gnunet/src/transport/test_transport_api_rel_https_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_rel_https_peer1.conf        
2010-08-04 12:51:41 UTC (rev 12460)
+++ gnunet/src/transport/test_transport_api_rel_https_peer1.conf        
2010-08-04 15:28:08 UTC (rev 12461)
@@ -15,8 +15,10 @@
 #BINDTO6 = ::1
 KEY_FILE = https_key_p1.key
 CERT_FILE = https_cert_p1.crt
+CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL
+#CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL
+#CRYPTO_INIT = PERFORMANCE
 
-
 [fs]
 AUTOSTART = NO
 

Modified: gnunet/src/transport/test_transport_api_rel_https_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_rel_https_peer2.conf        
2010-08-04 12:51:41 UTC (rev 12460)
+++ gnunet/src/transport/test_transport_api_rel_https_peer2.conf        
2010-08-04 15:28:08 UTC (rev 12461)
@@ -15,8 +15,10 @@
 #BINDTO6 = ::1
 KEY_FILE = https_key_p2.key
 CERT_FILE = https_cert_p2.crt
+CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL
+#CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL
+#CRYPTO_INIT = PERFORMANCE
 
-
 [fs]
 AUTOSTART = NO
 




reply via email to

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