aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-gns-proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/gnunet-gns-proxy.c')
-rw-r--r--src/gns/gnunet-gns-proxy.c39
1 files changed, 25 insertions, 14 deletions
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index 6eb87a95e..35f42cdec 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -621,7 +621,7 @@ struct Socks5Request
621/** 621/**
622 * The port the proxy is running on (default 7777) 622 * The port the proxy is running on (default 7777)
623 */ 623 */
624static unsigned long port = GNUNET_GNS_PROXY_PORT; 624static unsigned long long port = GNUNET_GNS_PROXY_PORT;
625 625
626/** 626/**
627 * The CA file (pem) to use for the proxy CA 627 * The CA file (pem) to use for the proxy CA
@@ -865,7 +865,8 @@ check_ssl_certificate (struct Socks5Request *s5r)
865 const char *name; 865 const char *name;
866 866
867 s5r->ssl_checked = GNUNET_YES; 867 s5r->ssl_checked = GNUNET_YES;
868 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "XXXXXX\n"); 868 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
869 "Checking SSL certificate\n");
869 if (CURLE_OK != 870 if (CURLE_OK !=
870 curl_easy_getinfo (s5r->curl, 871 curl_easy_getinfo (s5r->curl,
871 CURLINFO_TLS_SESSION, 872 CURLINFO_TLS_SESSION,
@@ -1882,19 +1883,22 @@ mhd_connection_cb (void *cls,
1882 { 1883 {
1883 if (GNUNET_NETWORK_get_fd (s5r->sock) == sock) 1884 if (GNUNET_NETWORK_get_fd (s5r->sock) == sock)
1884 { 1885 {
1885 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Context set...\n"); 1886 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1887 "Context set...\n");
1888 s5r->ssl_checked = GNUNET_NO;
1886 *con_cls = s5r; 1889 *con_cls = s5r;
1887 break; 1890 break;
1888 } 1891 }
1889 } 1892 }
1890 s5r->ssl_checked = GNUNET_NO;
1891 break; 1893 break;
1892 case MHD_CONNECTION_NOTIFY_CLOSED: 1894 case MHD_CONNECTION_NOTIFY_CLOSED:
1893 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connection closed... cleaning up\n"); 1895 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1896 "Connection closed... cleaning up\n");
1894 s5r = *con_cls; 1897 s5r = *con_cls;
1895 if (NULL == s5r) 1898 if (NULL == s5r)
1896 { 1899 {
1897 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Connection stale!\n"); 1900 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1901 "Connection stale!\n");
1898 return; 1902 return;
1899 } 1903 }
1900 cleanup_s5r (s5r); 1904 cleanup_s5r (s5r);
@@ -3104,7 +3108,7 @@ run_cont ()
3104 return; 3108 return;
3105 } 3109 }
3106 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3110 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3107 "Proxy listens on port %lu\n", 3111 "Proxy listens on port %llu\n",
3108 port); 3112 port);
3109 3113
3110 /* start MHD daemon for HTTP */ 3114 /* start MHD daemon for HTTP */
@@ -3257,13 +3261,20 @@ run (void *cls,
3257int 3261int
3258main (int argc, char *const *argv) 3262main (int argc, char *const *argv)
3259{ 3263{
3260 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 3264 struct GNUNET_GETOPT_CommandLineOption options[] = {
3261 {'p', "port", NULL, 3265
3262 gettext_noop ("listen on specified port (default: 7777)"), 1, 3266 GNUNET_GETOPT_OPTION_SET_ULONG ('p',
3263 &GNUNET_GETOPT_set_ulong, &port}, 3267 "port",
3264 {'a', "authority", NULL, 3268 NULL,
3265 gettext_noop ("pem file to use as CA"), 1, 3269 gettext_noop ("listen on specified port (default: 7777)"),
3266 &GNUNET_GETOPT_set_string, &cafile_opt}, 3270 &port),
3271
3272 GNUNET_GETOPT_OPTION_STRING ('a',
3273 "authority",
3274 NULL,
3275 gettext_noop ("pem file to use as CA"),
3276 &cafile_opt),
3277
3267 GNUNET_GETOPT_OPTION_END 3278 GNUNET_GETOPT_OPTION_END
3268 }; 3279 };
3269 static const char* page = 3280 static const char* page =