diff options
Diffstat (limited to 'src/transport')
6 files changed, 57 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_https.c b/src/transport/plugin_transport_https.c index 6cc9f9c7e..ea97712b5 100644 --- a/src/transport/plugin_transport_https.c +++ b/src/transport/plugin_transport_https.c | |||
@@ -370,6 +370,8 @@ struct Plugin | |||
370 | 370 | ||
371 | /* The private key MHD uses as an \0 terminated string */ | 371 | /* The private key MHD uses as an \0 terminated string */ |
372 | char * key; | 372 | char * key; |
373 | |||
374 | char * crypto_init; | ||
373 | }; | 375 | }; |
374 | 376 | ||
375 | 377 | ||
@@ -2347,7 +2349,8 @@ libgnunet_plugin_transport_https_done (void *cls) | |||
2347 | 2349 | ||
2348 | GNUNET_free_non_null (plugin->bind4_address); | 2350 | GNUNET_free_non_null (plugin->bind4_address); |
2349 | GNUNET_free_non_null (plugin->bind6_address); | 2351 | GNUNET_free_non_null (plugin->bind6_address); |
2350 | GNUNET_free_non_null(plugin->bind_hostname); | 2352 | GNUNET_free_non_null (plugin->bind_hostname); |
2353 | GNUNET_free_non_null (plugin->crypto_init); | ||
2351 | GNUNET_free (plugin); | 2354 | GNUNET_free (plugin); |
2352 | GNUNET_free (api); | 2355 | GNUNET_free (api); |
2353 | #if DEBUG_HTTPS | 2356 | #if DEBUG_HTTPS |
@@ -2453,6 +2456,34 @@ libgnunet_plugin_transport_https_init (void *cls) | |||
2453 | plugin->bind4_address = NULL; | 2456 | plugin->bind4_address = NULL; |
2454 | } | 2457 | } |
2455 | } | 2458 | } |
2459 | |||
2460 | /* Get crypto init string from config */ | ||
2461 | if (GNUNET_CONFIGURATION_have_value (env->cfg, | ||
2462 | "transport-https", "CRYPTO_INIT")) | ||
2463 | { | ||
2464 | GNUNET_CONFIGURATION_get_value_string (env->cfg, | ||
2465 | "transport-https", | ||
2466 | "CRYPTO_INIT", | ||
2467 | &plugin->crypto_init); | ||
2468 | } | ||
2469 | else | ||
2470 | { | ||
2471 | GNUNET_asprintf(&plugin->crypto_init,"NORMAL"); | ||
2472 | } | ||
2473 | |||
2474 | /* Get private key file from config */ | ||
2475 | if (GNUNET_CONFIGURATION_have_value (env->cfg, | ||
2476 | "transport-https", "CERT_FILE")) | ||
2477 | { | ||
2478 | GNUNET_CONFIGURATION_get_value_string (env->cfg, | ||
2479 | "transport-https", | ||
2480 | "CERT_FILE", | ||
2481 | &cert_file); | ||
2482 | } | ||
2483 | else | ||
2484 | { | ||
2485 | GNUNET_asprintf(&cert_file,"https.cert"); | ||
2486 | } | ||
2456 | 2487 | ||
2457 | /* Get private key file from config */ | 2488 | /* Get private key file from config */ |
2458 | if (GNUNET_CONFIGURATION_have_value (env->cfg, | 2489 | if (GNUNET_CONFIGURATION_have_value (env->cfg, |
@@ -2576,6 +2607,11 @@ libgnunet_plugin_transport_https_init (void *cls) | |||
2576 | port, | 2607 | port, |
2577 | &mhd_accept_cb, | 2608 | &mhd_accept_cb, |
2578 | plugin , &mdh_access_cb, plugin, | 2609 | plugin , &mdh_access_cb, plugin, |
2610 | /*MHD_OPTION_HTTPS_PRIORITIES, "NORMAL:",*/ | ||
2611 | /*MHD_OPTION_HTTPS_PRIORITIES, "PERFORMANCE:",*/ | ||
2612 | /* MHD_OPTION_HTTPS_PRIORITIES, "NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL", */ | ||
2613 | /*MHD_OPTION_HTTPS_PRIORITIES, "NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL",*/ | ||
2614 | MHD_OPTION_HTTPS_PRIORITIES, plugin->crypto_init, | ||
2579 | MHD_OPTION_HTTPS_MEM_KEY, plugin->key, | 2615 | MHD_OPTION_HTTPS_MEM_KEY, plugin->key, |
2580 | MHD_OPTION_HTTPS_MEM_CERT, plugin->cert, | 2616 | MHD_OPTION_HTTPS_MEM_CERT, plugin->cert, |
2581 | MHD_OPTION_SOCK_ADDR, tmp, | 2617 | MHD_OPTION_SOCK_ADDR, tmp, |
@@ -2596,6 +2632,11 @@ libgnunet_plugin_transport_https_init (void *cls) | |||
2596 | port, | 2632 | port, |
2597 | &mhd_accept_cb, | 2633 | &mhd_accept_cb, |
2598 | plugin , &mdh_access_cb, plugin, | 2634 | plugin , &mdh_access_cb, plugin, |
2635 | /*MHD_OPTION_HTTPS_PRIORITIES, "NORMAL:",*/ | ||
2636 | /*MHD_OPTION_HTTPS_PRIORITIES, "PERFORMANCE:",*/ | ||
2637 | /* MHD_OPTION_HTTPS_PRIORITIES, "NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL", */ | ||
2638 | /*MHD_OPTION_HTTPS_PRIORITIES, "NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL",*/ | ||
2639 | MHD_OPTION_HTTPS_PRIORITIES, plugin->crypto_init, | ||
2599 | MHD_OPTION_HTTPS_MEM_KEY, plugin->key, | 2640 | MHD_OPTION_HTTPS_MEM_KEY, plugin->key, |
2600 | MHD_OPTION_HTTPS_MEM_CERT, plugin->cert, | 2641 | MHD_OPTION_HTTPS_MEM_CERT, plugin->cert, |
2601 | MHD_OPTION_SOCK_ADDR, (struct sockaddr_in *)plugin->bind4_address, | 2642 | MHD_OPTION_SOCK_ADDR, (struct sockaddr_in *)plugin->bind4_address, |
diff --git a/src/transport/test_plugin_transport_data_http.conf b/src/transport/test_plugin_transport_data_http.conf index d4709aa7c..6e5e2d44c 100644 --- a/src/transport/test_plugin_transport_data_http.conf +++ b/src/transport/test_plugin_transport_data_http.conf | |||
@@ -24,7 +24,9 @@ USE_IPv6 = YES | |||
24 | #BINDTO6 = ::1 | 24 | #BINDTO6 = ::1 |
25 | KEY_FILE = https_key.key | 25 | KEY_FILE = https_key.key |
26 | CERT_FILE = https_cert.crt | 26 | CERT_FILE = https_cert.crt |
27 | 27 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | |
28 | #CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL | ||
29 | #CRYPTO_INIT = PERFORMANCE | ||
28 | 30 | ||
29 | [transport] | 31 | [transport] |
30 | PREFIX = valgrind --leak-check=full | 32 | PREFIX = valgrind --leak-check=full |
diff --git a/src/transport/test_transport_api_https_peer1.conf b/src/transport/test_transport_api_https_peer1.conf index f67ada8cc..712cd970a 100644 --- a/src/transport/test_transport_api_https_peer1.conf +++ b/src/transport/test_transport_api_https_peer1.conf | |||
@@ -15,6 +15,9 @@ USE_IPv4 = YES | |||
15 | #BINDTO6 = ::1 | 15 | #BINDTO6 = ::1 |
16 | KEY_FILE = https_key_p1.key | 16 | KEY_FILE = https_key_p1.key |
17 | CERT_FILE = https_cert_p1.crt | 17 | CERT_FILE = https_cert_p1.crt |
18 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | ||
19 | #CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL | ||
20 | #CRYPTO_INIT = PERFORMANCE | ||
18 | 21 | ||
19 | [fs] | 22 | [fs] |
20 | AUTOSTART = NO | 23 | AUTOSTART = NO |
diff --git a/src/transport/test_transport_api_https_peer2.conf b/src/transport/test_transport_api_https_peer2.conf index 308a06e18..f3703de92 100644 --- a/src/transport/test_transport_api_https_peer2.conf +++ b/src/transport/test_transport_api_https_peer2.conf | |||
@@ -15,6 +15,9 @@ USE_IPv4 = YES | |||
15 | #BINDTO6 = ::1 | 15 | #BINDTO6 = ::1 |
16 | KEY_FILE = https_key_p2.key | 16 | KEY_FILE = https_key_p2.key |
17 | CERT_FILE = https_cert_p2.crt | 17 | CERT_FILE = https_cert_p2.crt |
18 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | ||
19 | #CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL | ||
20 | #CRYPTO_INIT = PERFORMANCE | ||
18 | 21 | ||
19 | [fs] | 22 | [fs] |
20 | AUTOSTART = NO | 23 | AUTOSTART = NO |
diff --git a/src/transport/test_transport_api_rel_https_peer1.conf b/src/transport/test_transport_api_rel_https_peer1.conf index 0ee8fe99d..9098a67df 100644 --- a/src/transport/test_transport_api_rel_https_peer1.conf +++ b/src/transport/test_transport_api_rel_https_peer1.conf | |||
@@ -15,7 +15,9 @@ BINDTO4 = 127.0.0.1 | |||
15 | #BINDTO6 = ::1 | 15 | #BINDTO6 = ::1 |
16 | KEY_FILE = https_key_p1.key | 16 | KEY_FILE = https_key_p1.key |
17 | CERT_FILE = https_cert_p1.crt | 17 | CERT_FILE = https_cert_p1.crt |
18 | 18 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | |
19 | #CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL | ||
20 | #CRYPTO_INIT = PERFORMANCE | ||
19 | 21 | ||
20 | [fs] | 22 | [fs] |
21 | AUTOSTART = NO | 23 | AUTOSTART = NO |
diff --git a/src/transport/test_transport_api_rel_https_peer2.conf b/src/transport/test_transport_api_rel_https_peer2.conf index f20366262..892694a4c 100644 --- a/src/transport/test_transport_api_rel_https_peer2.conf +++ b/src/transport/test_transport_api_rel_https_peer2.conf | |||
@@ -15,7 +15,9 @@ BINDTO4 = 127.0.0.1 | |||
15 | #BINDTO6 = ::1 | 15 | #BINDTO6 = ::1 |
16 | KEY_FILE = https_key_p2.key | 16 | KEY_FILE = https_key_p2.key |
17 | CERT_FILE = https_cert_p2.crt | 17 | CERT_FILE = https_cert_p2.crt |
18 | 18 | CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+SHA1:+RSA:+COMP-NULL | |
19 | #CRYPTO_INIT = NONE:+VERS-TLS1.0:+ARCFOUR-128:+MD5:+RSA:+COMP-NULL | ||
20 | #CRYPTO_INIT = PERFORMANCE | ||
19 | 21 | ||
20 | [fs] | 22 | [fs] |
21 | AUTOSTART = NO | 23 | AUTOSTART = NO |