-make CA info better, connection limit mhd
authorMartin Schanzenbach <mschanzenbach@posteo.de>
Tue, 12 Jun 2012 18:52:34 +0000 (18:52 +0000)
committerMartin Schanzenbach <mschanzenbach@posteo.de>
Tue, 12 Jun 2012 18:52:34 +0000 (18:52 +0000)
src/gns/gnunet-gns-proxy-setup-ca
src/gns/gnunet-gns-proxy.c

index 5071235943e173efb8072df08dcfb74af0033610..48fae94f7dec2914f77c0208d899ed0f051ebfe7 100644 (file)
@@ -1,6 +1,6 @@
 echo "Generating CA"
 
-openssl req -new -x509 -days 3650 -extensions v3_ca -keyout gnscakey.pem -out gnscacert.pem -subj "/C=DE/ST=Bavaria/L=Munich/O=TUM/OU=IN/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNUnet Naming System"
+openssl req -new -x509 -days 3650 -extensions v3_ca -keyout gnscakey.pem -out gnscacert.pem -subj "/C=DE/ST=Bavaria/L=Munich/O=GNUnet Naming System/OU=GNUnet/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNUnet Naming System"
 
 echo "Removing passphrase from key"
 openssl rsa -passin pass:"GNUnet Naming System" -in gnscakey.pem -out gnscakeynoenc.pem
index c99010dc44d9b6b459feb7408af1d8ee3e6723e0..4effc0f04e47130e4c2aaed779343a1a2c10a29f 100644 (file)
@@ -35,7 +35,7 @@
 #include <time.h>
 
 #define GNUNET_GNS_PROXY_PORT 7777
-#define MAX_MHD_CONNECTIONS 300
+#define MHD_MAX_CONNECTIONS 300
 
 /* MHD/cURL defines */
 #define BUF_WAIT_FOR_CURL 0
@@ -1796,10 +1796,8 @@ accept_cb (void* cls, const struct sockaddr *addr, socklen_t addrlen)
       return MHD_NO;
   }
 
-  if (total_mhd_connections >= MAX_MHD_CONNECTIONS)
-    return MHD_NO;
-
-  total_mhd_connections++;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Connection accepted\n");
 
   return MHD_YES;
 }
@@ -1846,7 +1844,7 @@ add_handle_to_ssl_mhd (struct GNUNET_NETWORK_Handle *h, char* domain)
             &accept_cb, NULL,
             &create_response, hd,
             MHD_OPTION_LISTEN_SOCKET, GNUNET_NETWORK_get_fd (mhd_unix_socket),
-            MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 128,
+            MHD_OPTION_CONNECTION_LIMIT, MHD_MAX_CONNECTIONS,
             MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 16,
             MHD_OPTION_NOTIFY_COMPLETED,
             NULL, NULL,
@@ -2598,7 +2596,7 @@ run (void *cls, char *const *args, const char *cfgfile,
             &accept_cb, NULL,
             &create_response, hd,
             MHD_OPTION_LISTEN_SOCKET, GNUNET_NETWORK_get_fd (mhd_unix_socket),
-            MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 128,
+            MHD_OPTION_CONNECTION_LIMIT, MHD_MAX_CONNECTIONS,
             MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 16,
             MHD_OPTION_NOTIFY_COMPLETED,
             NULL, NULL,