diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/microhttpd/test_client_put_stop.c | 10 | ||||
-rw-r--r-- | src/microhttpd/test_set_panic.c | 5 | ||||
-rw-r--r-- | src/microhttpd/test_str.c | 7 | ||||
-rw-r--r-- | src/microhttpd/test_upgrade.c | 12 | ||||
-rw-r--r-- | src/microhttpd/test_upgrade_large.c | 12 | ||||
-rw-r--r-- | src/testcurl/https/test_empty_response.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_iovec.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_parallel.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_parallel_threads.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_get_select.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_multi_daemon.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_session_info.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_https_time_out.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_tls_authentication.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_tls_extensions.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/test_tls_options.c | 4 | ||||
-rw-r--r-- | src/testcurl/https/tls_test_keys.h | 96 |
18 files changed, 86 insertions, 104 deletions
diff --git a/src/microhttpd/test_client_put_stop.c b/src/microhttpd/test_client_put_stop.c index 9ee7dcf6..c26ff78a 100644 --- a/src/microhttpd/test_client_put_stop.c +++ b/src/microhttpd/test_client_put_stop.c | |||
@@ -802,6 +802,7 @@ _MHD_dumbClient_send_req (struct _MHD_dumbClient *clnt) | |||
802 | 802 | ||
803 | 803 | ||
804 | /* internal */ | 804 | /* internal */ |
805 | _MHD_NORETURN /* Declared as 'noreturn' until it is implemented */ | ||
805 | static void | 806 | static void |
806 | _MHD_dumbClient_recv_reply (struct _MHD_dumbClient *clnt) | 807 | _MHD_dumbClient_recv_reply (struct _MHD_dumbClient *clnt) |
807 | { | 808 | { |
@@ -1687,7 +1688,8 @@ printTestResults (FILE *stream, | |||
1687 | fprintf (stream, " Final notification callback has been called %u time%s " | 1688 | fprintf (stream, " Final notification callback has been called %u time%s " |
1688 | "with %s code.", term_result->num_called, | 1689 | "with %s code.", term_result->num_called, |
1689 | (1 == term_result->num_called) ? "" : "s", | 1690 | (1 == term_result->num_called) ? "" : "s", |
1690 | term_reason_str (term_result->term_reason)); | 1691 | term_reason_str ((enum MHD_RequestTerminationCode) |
1692 | term_result->term_reason)); | ||
1691 | fprintf (stream, "\n"); | 1693 | fprintf (stream, "\n"); |
1692 | fflush (stream); | 1694 | fflush (stream); |
1693 | } | 1695 | } |
@@ -1848,7 +1850,9 @@ performTestQueries (struct MHD_Daemon *d, uint16_t d_port, | |||
1848 | if (! found_right_reason) | 1850 | if (! found_right_reason) |
1849 | { | 1851 | { |
1850 | fprintf (stderr, "FAILED: termination callback was not called with " | 1852 | fprintf (stderr, "FAILED: termination callback was not called with " |
1851 | "expected (%s) reason.\n", term_reason_str (expected_reason)); | 1853 | "expected (%s) reason.\n", |
1854 | term_reason_str ((enum MHD_RequestTerminationCode) | ||
1855 | expected_reason)); | ||
1852 | fflush (stderr); | 1856 | fflush (stderr); |
1853 | ret |= 1 << 1; | 1857 | ret |= 1 << 1; |
1854 | } | 1858 | } |
@@ -1971,7 +1975,7 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, | |||
1971 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); | 1975 | dinfo = MHD_get_daemon_info (d, MHD_DAEMON_INFO_BIND_PORT); |
1972 | if ((NULL == dinfo) || (0 == dinfo->port)) | 1976 | if ((NULL == dinfo) || (0 == dinfo->port)) |
1973 | mhdErrorExitDesc ("MHD_get_daemon_info() failed"); | 1977 | mhdErrorExitDesc ("MHD_get_daemon_info() failed"); |
1974 | *pport = (int) dinfo->port; | 1978 | *pport = dinfo->port; |
1975 | if (0 == global_port) | 1979 | if (0 == global_port) |
1976 | global_port = *pport; /* Reuse the same port for all tests */ | 1980 | global_port = *pport; /* Reuse the same port for all tests */ |
1977 | } | 1981 | } |
diff --git a/src/microhttpd/test_set_panic.c b/src/microhttpd/test_set_panic.c index f1548380..a2d889c1 100644 --- a/src/microhttpd/test_set_panic.c +++ b/src/microhttpd/test_set_panic.c | |||
@@ -708,6 +708,7 @@ _MHD_dumbClient_send_req (struct _MHD_dumbClient *clnt) | |||
708 | 708 | ||
709 | 709 | ||
710 | /* internal */ | 710 | /* internal */ |
711 | _MHD_NORETURN /* not implemented */ | ||
711 | static void | 712 | static void |
712 | _MHD_dumbClient_recv_reply (struct _MHD_dumbClient *clnt) | 713 | _MHD_dumbClient_recv_reply (struct _MHD_dumbClient *clnt) |
713 | { | 714 | { |
@@ -988,7 +989,7 @@ _MHD_dumbClient_close (struct _MHD_dumbClient *clnt) | |||
988 | } | 989 | } |
989 | 990 | ||
990 | 991 | ||
991 | static void | 992 | _MHD_NORETURN static void |
992 | socket_cb (void *cls, | 993 | socket_cb (void *cls, |
993 | struct MHD_Connection *c, | 994 | struct MHD_Connection *c, |
994 | void **socket_context, | 995 | void **socket_context, |
@@ -1409,7 +1410,7 @@ testNumThreadsForPool (enum testMhdPollType pollType) | |||
1409 | 1410 | ||
1410 | #define PANIC_MAGIC_CHECK 1133 | 1411 | #define PANIC_MAGIC_CHECK 1133 |
1411 | 1412 | ||
1412 | static void | 1413 | _MHD_NORETURN static void |
1413 | myPanicCallback (void *cls, | 1414 | myPanicCallback (void *cls, |
1414 | const char *file, | 1415 | const char *file, |
1415 | unsigned int line, | 1416 | unsigned int line, |
diff --git a/src/microhttpd/test_str.c b/src/microhttpd/test_str.c index 16b63bd6..35e31319 100644 --- a/src/microhttpd/test_str.c +++ b/src/microhttpd/test_str.c | |||
@@ -932,7 +932,7 @@ static const struct str_with_value dstrs_w_values[] = { | |||
932 | }; | 932 | }; |
933 | 933 | ||
934 | /* strings that should overflow uint64_t */ | 934 | /* strings that should overflow uint64_t */ |
935 | const struct str_with_len str_ovflw[] = { | 935 | static const struct str_with_len str_ovflw[] = { |
936 | D_STR_W_LEN ("18446744073709551616"), /* 0x10000000000000000, UINT64_MAX+1 */ | 936 | D_STR_W_LEN ("18446744073709551616"), /* 0x10000000000000000, UINT64_MAX+1 */ |
937 | D_STR_W_LEN ("18446744073709551620"), | 937 | D_STR_W_LEN ("18446744073709551620"), |
938 | D_STR_W_LEN ("18446744083709551615"), | 938 | D_STR_W_LEN ("18446744083709551615"), |
@@ -952,7 +952,7 @@ const struct str_with_len str_ovflw[] = { | |||
952 | }; | 952 | }; |
953 | 953 | ||
954 | /* strings that should not be convertible to numeric value */ | 954 | /* strings that should not be convertible to numeric value */ |
955 | const struct str_with_len str_no_num[] = { | 955 | static const struct str_with_len str_no_num[] = { |
956 | D_STR_W_LEN ("zero"), | 956 | D_STR_W_LEN ("zero"), |
957 | D_STR_W_LEN ("one"), | 957 | D_STR_W_LEN ("one"), |
958 | D_STR_W_LEN ("\xb9\xb2\xb3"), /* superscript "123" in ISO-8859-1/CP1252 */ | 958 | D_STR_W_LEN ("\xb9\xb2\xb3"), /* superscript "123" in ISO-8859-1/CP1252 */ |
@@ -1089,7 +1089,7 @@ static const struct str_with_value xdstrs_w_values[] = { | |||
1089 | }; | 1089 | }; |
1090 | 1090 | ||
1091 | /* hex strings that should overflow uint64_t */ | 1091 | /* hex strings that should overflow uint64_t */ |
1092 | const struct str_with_len strx_ovflw[] = { | 1092 | static const struct str_with_len strx_ovflw[] = { |
1093 | D_STR_W_LEN ("10000000000000000"), /* 0x10000000000000000, UINT64_MAX+1 */ | 1093 | D_STR_W_LEN ("10000000000000000"), /* 0x10000000000000000, UINT64_MAX+1 */ |
1094 | D_STR_W_LEN ("10000000000000001"), | 1094 | D_STR_W_LEN ("10000000000000001"), |
1095 | D_STR_W_LEN ("10000000000000002"), | 1095 | D_STR_W_LEN ("10000000000000002"), |
@@ -3338,6 +3338,7 @@ check_str_from_uint64 (void) | |||
3338 | (unsigned int) i, (unsigned int) t->str.len); | 3338 | (unsigned int) i, (unsigned int) t->str.len); |
3339 | exit (99); | 3339 | exit (99); |
3340 | } | 3340 | } |
3341 | rs = 0; /* Only to mute compiler warning */ | ||
3341 | for (b_size = 0; b_size <= t->str.len + 1; ++b_size) | 3342 | for (b_size = 0; b_size <= t->str.len + 1; ++b_size) |
3342 | { | 3343 | { |
3343 | /* fill buffer with pseudo-random values */ | 3344 | /* fill buffer with pseudo-random values */ |
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c index 5c95a10c..5836db6b 100644 --- a/src/microhttpd/test_upgrade.c +++ b/src/microhttpd/test_upgrade.c | |||
@@ -184,7 +184,7 @@ enum tls_tool | |||
184 | TLS_LIB_GNUTLS | 184 | TLS_LIB_GNUTLS |
185 | }; | 185 | }; |
186 | 186 | ||
187 | enum tls_tool use_tls_tool; | 187 | static enum tls_tool use_tls_tool; |
188 | 188 | ||
189 | #if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID) | 189 | #if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID) |
190 | /** | 190 | /** |
@@ -423,9 +423,9 @@ wr_create_from_plain_sckt (MHD_socket plain_sk) | |||
423 | static int | 423 | static int |
424 | wr_connect (struct wr_socket *s, | 424 | wr_connect (struct wr_socket *s, |
425 | const struct sockaddr *addr, | 425 | const struct sockaddr *addr, |
426 | int length) | 426 | unsigned int length) |
427 | { | 427 | { |
428 | if (0 != connect (s->fd, addr, length)) | 428 | if (0 != connect (s->fd, addr, (socklen_t) length)) |
429 | { | 429 | { |
430 | testErrorLogDesc ("connect() failed"); | 430 | testErrorLogDesc ("connect() failed"); |
431 | return -1; | 431 | return -1; |
@@ -797,7 +797,7 @@ send_all (struct wr_socket *sock, | |||
797 | 797 | ||
798 | /** | 798 | /** |
799 | * Read character-by-character until we | 799 | * Read character-by-character until we |
800 | * get '\r\n\r\n'. | 800 | * get 'CRLNCRLN'. |
801 | */ | 801 | */ |
802 | static void | 802 | static void |
803 | recv_hdr (struct wr_socket *sock) | 803 | recv_hdr (struct wr_socket *sock) |
@@ -1154,7 +1154,7 @@ run_mhd_select_loop (struct MHD_Daemon *daemon) | |||
1154 | * | 1154 | * |
1155 | * @param daemon daemon to run it for | 1155 | * @param daemon daemon to run it for |
1156 | */ | 1156 | */ |
1157 | static void | 1157 | _MHD_NORETURN static void |
1158 | run_mhd_poll_loop (struct MHD_Daemon *daemon) | 1158 | run_mhd_poll_loop (struct MHD_Daemon *daemon) |
1159 | { | 1159 | { |
1160 | (void) daemon; /* Unused. Silent compiler warning. */ | 1160 | (void) daemon; /* Unused. Silent compiler warning. */ |
@@ -1229,7 +1229,7 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon) | |||
1229 | */ | 1229 | */ |
1230 | static void | 1230 | static void |
1231 | run_mhd_loop (struct MHD_Daemon *daemon, | 1231 | run_mhd_loop (struct MHD_Daemon *daemon, |
1232 | int flags) | 1232 | unsigned int flags) |
1233 | { | 1233 | { |
1234 | if (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL))) | 1234 | if (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL))) |
1235 | run_mhd_select_loop (daemon); | 1235 | run_mhd_select_loop (daemon); |
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c index e6c9b01b..6f2331fa 100644 --- a/src/microhttpd/test_upgrade_large.c +++ b/src/microhttpd/test_upgrade_large.c | |||
@@ -350,7 +350,7 @@ enum tls_tool | |||
350 | TLS_LIB_GNUTLS | 350 | TLS_LIB_GNUTLS |
351 | }; | 351 | }; |
352 | 352 | ||
353 | enum tls_tool use_tls_tool; | 353 | static enum tls_tool use_tls_tool; |
354 | 354 | ||
355 | #if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID) | 355 | #if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID) |
356 | /** | 356 | /** |
@@ -589,9 +589,9 @@ wr_create_from_plain_sckt (MHD_socket plain_sk) | |||
589 | static int | 589 | static int |
590 | wr_connect (struct wr_socket *s, | 590 | wr_connect (struct wr_socket *s, |
591 | const struct sockaddr *addr, | 591 | const struct sockaddr *addr, |
592 | int length) | 592 | unsigned int length) |
593 | { | 593 | { |
594 | if (0 != connect (s->fd, addr, length)) | 594 | if (0 != connect (s->fd, addr, (socklen_t) length)) |
595 | { | 595 | { |
596 | testErrorLogDesc ("connect() failed"); | 596 | testErrorLogDesc ("connect() failed"); |
597 | return -1; | 597 | return -1; |
@@ -973,7 +973,7 @@ send_all (struct wr_socket *sock, | |||
973 | 973 | ||
974 | /** | 974 | /** |
975 | * Read character-by-character until we | 975 | * Read character-by-character until we |
976 | * get '\r\n\r\n'. | 976 | * get 'CRLNCRLN'. |
977 | */ | 977 | */ |
978 | static void | 978 | static void |
979 | recv_hdr (struct wr_socket *sock) | 979 | recv_hdr (struct wr_socket *sock) |
@@ -1340,7 +1340,7 @@ run_mhd_select_loop (struct MHD_Daemon *daemon) | |||
1340 | * | 1340 | * |
1341 | * @param daemon daemon to run it for | 1341 | * @param daemon daemon to run it for |
1342 | */ | 1342 | */ |
1343 | static void | 1343 | _MHD_NORETURN static void |
1344 | run_mhd_poll_loop (struct MHD_Daemon *daemon) | 1344 | run_mhd_poll_loop (struct MHD_Daemon *daemon) |
1345 | { | 1345 | { |
1346 | (void) daemon; /* Unused. Silent compiler warning. */ | 1346 | (void) daemon; /* Unused. Silent compiler warning. */ |
@@ -1417,7 +1417,7 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon) | |||
1417 | */ | 1417 | */ |
1418 | static void | 1418 | static void |
1419 | run_mhd_loop (struct MHD_Daemon *daemon, | 1419 | run_mhd_loop (struct MHD_Daemon *daemon, |
1420 | int flags) | 1420 | unsigned int flags) |
1421 | { | 1421 | { |
1422 | if (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL))) | 1422 | if (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL))) |
1423 | run_mhd_select_loop (daemon); | 1423 | run_mhd_select_loop (daemon); |
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c index b338fa2e..a8de5cd2 100644 --- a/src/testcurl/https/test_empty_response.c +++ b/src/testcurl/https/test_empty_response.c | |||
@@ -32,9 +32,7 @@ | |||
32 | #include <gcrypt.h> | 32 | #include <gcrypt.h> |
33 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 33 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
34 | #include "tls_test_common.h" | 34 | #include "tls_test_common.h" |
35 | 35 | #include "tls_test_keys.h" | |
36 | extern const char srv_key_pem[]; | ||
37 | extern const char srv_self_signed_cert_pem[]; | ||
38 | 36 | ||
39 | static int oneone; | 37 | static int oneone; |
40 | 38 | ||
diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c index 184cc48e..62546324 100644 --- a/src/testcurl/https/test_https_get.c +++ b/src/testcurl/https/test_https_get.c | |||
@@ -33,9 +33,7 @@ | |||
33 | #include <gcrypt.h> | 33 | #include <gcrypt.h> |
34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
35 | #include "tls_test_common.h" | 35 | #include "tls_test_common.h" |
36 | 36 | #include "tls_test_keys.h" | |
37 | extern const char srv_signed_cert_pem[]; | ||
38 | extern const char srv_signed_key_pem[]; | ||
39 | 37 | ||
40 | 38 | ||
41 | static int global_port; | 39 | static int global_port; |
diff --git a/src/testcurl/https/test_https_get_iovec.c b/src/testcurl/https/test_https_get_iovec.c index 3bdb610f..b2d46c3f 100644 --- a/src/testcurl/https/test_https_get_iovec.c +++ b/src/testcurl/https/test_https_get_iovec.c | |||
@@ -41,9 +41,7 @@ | |||
41 | #include <gcrypt.h> | 41 | #include <gcrypt.h> |
42 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 42 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
43 | #include "tls_test_common.h" | 43 | #include "tls_test_common.h" |
44 | 44 | #include "tls_test_keys.h" | |
45 | extern const char srv_signed_cert_pem[]; | ||
46 | extern const char srv_signed_key_pem[]; | ||
47 | 45 | ||
48 | 46 | ||
49 | static int global_port; | 47 | static int global_port; |
diff --git a/src/testcurl/https/test_https_get_parallel.c b/src/testcurl/https/test_https_get_parallel.c index 47f644d2..3de7cfe7 100644 --- a/src/testcurl/https/test_https_get_parallel.c +++ b/src/testcurl/https/test_https_get_parallel.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <gcrypt.h> | 35 | #include <gcrypt.h> |
36 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 36 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
37 | #include "tls_test_common.h" | 37 | #include "tls_test_common.h" |
38 | #include "tls_test_keys.h" | ||
38 | 39 | ||
39 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 4 | 40 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 4 |
40 | #undef MHD_CPU_COUNT | 41 | #undef MHD_CPU_COUNT |
@@ -43,9 +44,6 @@ | |||
43 | #define MHD_CPU_COUNT 4 | 44 | #define MHD_CPU_COUNT 4 |
44 | #endif | 45 | #endif |
45 | 46 | ||
46 | extern const char srv_key_pem[]; | ||
47 | extern const char srv_self_signed_cert_pem[]; | ||
48 | |||
49 | int curl_check_version (const char *req_version, ...); | 47 | int curl_check_version (const char *req_version, ...); |
50 | 48 | ||
51 | 49 | ||
diff --git a/src/testcurl/https/test_https_get_parallel_threads.c b/src/testcurl/https/test_https_get_parallel_threads.c index 4853e7eb..08ee35e6 100644 --- a/src/testcurl/https/test_https_get_parallel_threads.c +++ b/src/testcurl/https/test_https_get_parallel_threads.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <gcrypt.h> | 37 | #include <gcrypt.h> |
38 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 38 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
39 | #include "tls_test_common.h" | 39 | #include "tls_test_common.h" |
40 | #include "tls_test_keys.h" | ||
40 | 41 | ||
41 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 4 | 42 | #if defined(MHD_CPU_COUNT) && (MHD_CPU_COUNT + 0) < 4 |
42 | #undef MHD_CPU_COUNT | 43 | #undef MHD_CPU_COUNT |
@@ -45,9 +46,6 @@ | |||
45 | #define MHD_CPU_COUNT 4 | 46 | #define MHD_CPU_COUNT 4 |
46 | #endif | 47 | #endif |
47 | 48 | ||
48 | extern const char srv_key_pem[]; | ||
49 | extern const char srv_self_signed_cert_pem[]; | ||
50 | |||
51 | int curl_check_version (const char *req_version, ...); | 49 | int curl_check_version (const char *req_version, ...); |
52 | 50 | ||
53 | /** | 51 | /** |
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c index 217c6bfa..3b45323b 100644 --- a/src/testcurl/https/test_https_get_select.c +++ b/src/testcurl/https/test_https_get_select.c | |||
@@ -33,9 +33,7 @@ | |||
33 | #include <gcrypt.h> | 33 | #include <gcrypt.h> |
34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
35 | #include "tls_test_common.h" | 35 | #include "tls_test_common.h" |
36 | 36 | #include "tls_test_keys.h" | |
37 | extern const char srv_key_pem[]; | ||
38 | extern const char srv_self_signed_cert_pem[]; | ||
39 | 37 | ||
40 | static int oneone; | 38 | static int oneone; |
41 | 39 | ||
diff --git a/src/testcurl/https/test_https_multi_daemon.c b/src/testcurl/https/test_https_multi_daemon.c index 6c6e2b5d..10e7f6ed 100644 --- a/src/testcurl/https/test_https_multi_daemon.c +++ b/src/testcurl/https/test_https_multi_daemon.c | |||
@@ -33,9 +33,7 @@ | |||
33 | #include <gcrypt.h> | 33 | #include <gcrypt.h> |
34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
35 | #include "tls_test_common.h" | 35 | #include "tls_test_common.h" |
36 | 36 | #include "tls_test_keys.h" | |
37 | extern const char srv_key_pem[]; | ||
38 | extern const char srv_self_signed_cert_pem[]; | ||
39 | 37 | ||
40 | /* | 38 | /* |
41 | * assert initiating two separate daemons and having one shut down | 39 | * assert initiating two separate daemons and having one shut down |
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c index b0ccb576..fc6f82f7 100644 --- a/src/testcurl/https/test_https_session_info.c +++ b/src/testcurl/https/test_https_session_info.c | |||
@@ -33,9 +33,7 @@ | |||
33 | #include <gcrypt.h> | 33 | #include <gcrypt.h> |
34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
35 | #include "tls_test_common.h" | 35 | #include "tls_test_common.h" |
36 | 36 | #include "tls_test_keys.h" | |
37 | extern const char srv_key_pem[]; | ||
38 | extern const char srv_self_signed_cert_pem[]; | ||
39 | 37 | ||
40 | struct MHD_Daemon *d; | 38 | struct MHD_Daemon *d; |
41 | 39 | ||
diff --git a/src/testcurl/https/test_https_time_out.c b/src/testcurl/https/test_https_time_out.c index 88877b60..939101a6 100644 --- a/src/testcurl/https/test_https_time_out.c +++ b/src/testcurl/https/test_https_time_out.c | |||
@@ -52,9 +52,7 @@ | |||
52 | #endif /* !WIN32_LEAN_AND_MEAN */ | 52 | #endif /* !WIN32_LEAN_AND_MEAN */ |
53 | #include <windows.h> | 53 | #include <windows.h> |
54 | #endif | 54 | #endif |
55 | 55 | #include "tls_test_keys.h" | |
56 | extern const char srv_key_pem[]; | ||
57 | extern const char srv_self_signed_cert_pem[]; | ||
58 | 56 | ||
59 | static const int TIME_OUT = 2; | 57 | static const int TIME_OUT = 2; |
60 | 58 | ||
diff --git a/src/testcurl/https/test_tls_authentication.c b/src/testcurl/https/test_tls_authentication.c index 7aedee72..22d47b26 100644 --- a/src/testcurl/https/test_tls_authentication.c +++ b/src/testcurl/https/test_tls_authentication.c | |||
@@ -33,9 +33,7 @@ | |||
33 | #include <gcrypt.h> | 33 | #include <gcrypt.h> |
34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
35 | #include "tls_test_common.h" | 35 | #include "tls_test_common.h" |
36 | 36 | #include "tls_test_keys.h" | |
37 | extern const char srv_signed_cert_pem[]; | ||
38 | extern const char srv_signed_key_pem[]; | ||
39 | 37 | ||
40 | 38 | ||
41 | /* perform a HTTP GET request via SSL/TLS */ | 39 | /* perform a HTTP GET request via SSL/TLS */ |
diff --git a/src/testcurl/https/test_tls_extensions.c b/src/testcurl/https/test_tls_extensions.c index 19b98e7e..3fe4ef71 100644 --- a/src/testcurl/https/test_tls_extensions.c +++ b/src/testcurl/https/test_tls_extensions.c | |||
@@ -32,12 +32,10 @@ | |||
32 | #ifdef MHD_HTTPS_REQUIRE_GRYPT | 32 | #ifdef MHD_HTTPS_REQUIRE_GRYPT |
33 | #include <gcrypt.h> | 33 | #include <gcrypt.h> |
34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 34 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
35 | #include "tls_test_keys.h" | ||
35 | 36 | ||
36 | #define MAX_EXT_DATA_LENGTH 256 | 37 | #define MAX_EXT_DATA_LENGTH 256 |
37 | 38 | ||
38 | extern const char srv_key_pem[]; | ||
39 | extern const char srv_self_signed_cert_pem[]; | ||
40 | |||
41 | /** | 39 | /** |
42 | * Test daemon response to TLS client hello requests containing extensions | 40 | * Test daemon response to TLS client hello requests containing extensions |
43 | * | 41 | * |
diff --git a/src/testcurl/https/test_tls_options.c b/src/testcurl/https/test_tls_options.c index d5aa8310..8c67a0c6 100644 --- a/src/testcurl/https/test_tls_options.c +++ b/src/testcurl/https/test_tls_options.c | |||
@@ -32,9 +32,7 @@ | |||
32 | #include <gcrypt.h> | 32 | #include <gcrypt.h> |
33 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ | 33 | #endif /* MHD_HTTPS_REQUIRE_GRYPT */ |
34 | #include "tls_test_common.h" | 34 | #include "tls_test_common.h" |
35 | 35 | #include "tls_test_keys.h" | |
36 | extern const char srv_key_pem[]; | ||
37 | extern const char srv_self_signed_cert_pem[]; | ||
38 | 36 | ||
39 | int curl_check_version (const char *req_version, ...); | 37 | int curl_check_version (const char *req_version, ...); |
40 | 38 | ||
diff --git a/src/testcurl/https/tls_test_keys.h b/src/testcurl/https/tls_test_keys.h index 0c662c9e..53e2151d 100644 --- a/src/testcurl/https/tls_test_keys.h +++ b/src/testcurl/https/tls_test_keys.h | |||
@@ -23,7 +23,7 @@ | |||
23 | /* Test Certificates */ | 23 | /* Test Certificates */ |
24 | 24 | ||
25 | /* Certificate Authority cert */ | 25 | /* Certificate Authority cert */ |
26 | const char ca_cert_pem[] = | 26 | static const char ca_cert_pem[] = |
27 | "-----BEGIN CERTIFICATE-----\n\ | 27 | "-----BEGIN CERTIFICATE-----\n\ |
28 | MIIGITCCBAmgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgTELMAkGA1UEBhMCUlUx\n\ | 28 | MIIGITCCBAmgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgTELMAkGA1UEBhMCUlUx\n\ |
29 | DzANBgNVBAgMBk1vc2NvdzEPMA0GA1UEBwwGTW9zY293MRswGQYDVQQKDBJ0ZXN0\n\ | 29 | DzANBgNVBAgMBk1vc2NvdzEPMA0GA1UEBwwGTW9zY293MRswGQYDVQQKDBJ0ZXN0\n\ |
@@ -62,7 +62,7 @@ Gy5ZldbTMTjgn7fChNopz15ChPBnwFIjhm+S0CyiLRQAowfknRVq2IBkj7/5kOWg\n\ | |||
62 | 62 | ||
63 | 63 | ||
64 | /* test server key */ | 64 | /* test server key */ |
65 | const char srv_signed_key_pem[] = | 65 | static const char srv_signed_key_pem[] = |
66 | "-----BEGIN PRIVATE KEY-----\n\ | 66 | "-----BEGIN PRIVATE KEY-----\n\ |
67 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCff7amw9zNSE+h\n\ | 67 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCff7amw9zNSE+h\n\ |
68 | rOMhBrzbbsJluUP3gmd8nOKY5MUimoPkxmAXfp2L0il+MPZT/ZEmo11q0k6J2jfG\n\ | 68 | rOMhBrzbbsJluUP3gmd8nOKY5MUimoPkxmAXfp2L0il+MPZT/ZEmo11q0k6J2jfG\n\ |
@@ -93,7 +93,7 @@ qdJNJ1DkyUc9dN2cliX4R+rG\n\ | |||
93 | -----END PRIVATE KEY-----"; | 93 | -----END PRIVATE KEY-----"; |
94 | 94 | ||
95 | /* test server CA signed certificates */ | 95 | /* test server CA signed certificates */ |
96 | const char srv_signed_cert_pem[] = | 96 | static const char srv_signed_cert_pem[] = |
97 | "-----BEGIN CERTIFICATE-----\n\ | 97 | "-----BEGIN CERTIFICATE-----\n\ |
98 | MIIFSzCCAzOgAwIBAgIBBDANBgkqhkiG9w0BAQsFADCBgTELMAkGA1UEBhMCUlUx\n\ | 98 | MIIFSzCCAzOgAwIBAgIBBDANBgkqhkiG9w0BAQsFADCBgTELMAkGA1UEBhMCUlUx\n\ |
99 | DzANBgNVBAgMBk1vc2NvdzEPMA0GA1UEBwwGTW9zY293MRswGQYDVQQKDBJ0ZXN0\n\ | 99 | DzANBgNVBAgMBk1vc2NvdzEPMA0GA1UEBwwGTW9zY293MRswGQYDVQQKDBJ0ZXN0\n\ |
@@ -127,52 +127,52 @@ OT1qAbIblaRuWqCsid8BzP7ZQiAnAWgMRSUg1gzDwSwRhrYQRRWAyn/Qipzec+27\n\ | |||
127 | -----END CERTIFICATE-----"; | 127 | -----END CERTIFICATE-----"; |
128 | 128 | ||
129 | /* test server self signed certificates */ | 129 | /* test server self signed certificates */ |
130 | const char srv_self_signed_cert_pem[] = "-----BEGIN CERTIFICATE-----\n" | 130 | static const char srv_self_signed_cert_pem[] = "-----BEGIN CERTIFICATE-----\n" |
131 | "MIIC+jCCAeSgAwIBAgIES0KCvTALBgkqhkiG9w0BAQUwFzEVMBMGA1UEAxMMdGVz\n" | 131 | "MIIC+jCCAeSgAwIBAgIES0KCvTALBgkqhkiG9w0BAQUwFzEVMBMGA1UEAxMMdGVz\n" |
132 | "dF9jYV9jZXJ0MB4XDTEwMDEwNTAwMDcyNVoXDTQ1MDMxMjAwMDcyNVowFzEVMBMG\n" | 132 | "dF9jYV9jZXJ0MB4XDTEwMDEwNTAwMDcyNVoXDTQ1MDMxMjAwMDcyNVowFzEVMBMG\n" |
133 | "A1UEAxMMdGVzdF9jYV9jZXJ0MIIBHzALBgkqhkiG9w0BAQEDggEOADCCAQkCggEA\n" | 133 | "A1UEAxMMdGVzdF9jYV9jZXJ0MIIBHzALBgkqhkiG9w0BAQEDggEOADCCAQkCggEA\n" |
134 | "tDEagv3p9OUhUL55jMucxjNK9N5cuozhcnrwDfBSU6oVrqm5kPqO1I7Cggzw68Y5\n" | 134 | "tDEagv3p9OUhUL55jMucxjNK9N5cuozhcnrwDfBSU6oVrqm5kPqO1I7Cggzw68Y5\n" |
135 | "jhTcBi4FXmYOZppm1R3MhSJ5JSi/67Q7X4J5rnJLXYGN27qjMpnoGQ/2xmsNG/is\n" | 135 | "jhTcBi4FXmYOZppm1R3MhSJ5JSi/67Q7X4J5rnJLXYGN27qjMpnoGQ/2xmsNG/is\n" |
136 | "i+h/2vbtPU+WP9SEJnTfPLLpZ7KqCAk7FUUzKsuLx3/SOKtdkrWxPKwYTgnDEN6D\n" | 136 | "i+h/2vbtPU+WP9SEJnTfPLLpZ7KqCAk7FUUzKsuLx3/SOKtdkrWxPKwYTgnDEN6D\n" |
137 | "JL7tEzCnG5DFc4mQ7YW9PaRdC3rS1T8PvQ3jB2BUnohM0cFvKRuiU35tU7h7CPbL\n" | 137 | "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sKc174xn8vW6TxCUvmWFv5DPg5HG1v\n" |
145 | "y1SUX73qafRo+W6FN4UC/DHfwRhF8RSKEnVbmgDVCs6GHdKBjU2qRgYyj6nWZqK1\n" | 145 | "y1SUX73qafRo+W6FN4UC/DHfwRhF8RSKEnVbmgDVCs6GHdKBjU2qRgYyj6nWZqK1\n" |
146 | "XFUTWgia+Fl3D9vlsXaFcSZKA0Bq1eojl0B0AfeYAxTFwPWXscKvt/bXZfH8bg==\n" | 146 | "XFUTWgia+Fl3D9vlsXaFcSZKA0Bq1eojl0B0AfeYAxTFwPWXscKvt/bXZfH8bg==\n" |
147 | "-----END CERTIFICATE-----\n"; | 147 | "-----END CERTIFICATE-----\n"; |
148 | 148 | ||
149 | /* test server key */ | 149 | /* test server key */ |
150 | const char srv_key_pem[] = "-----BEGIN RSA PRIVATE KEY-----\n" | 150 | static const char srv_key_pem[] = "-----BEGIN RSA PRIVATE KEY-----\n" |
151 | "MIIEpAIBAAKCAQEAtDEagv3p9OUhUL55jMucxjNK9N5cuozhcnrwDfBSU6oVrqm5\n" | 151 | "MIIEpAIBAAKCAQEAtDEagv3p9OUhUL55jMucxjNK9N5cuozhcnrwDfBSU6oVrqm5\n" |
152 | "kPqO1I7Cggzw68Y5jhTcBi4FXmYOZppm1R3MhSJ5JSi/67Q7X4J5rnJLXYGN27qj\n" | 152 | "kPqO1I7Cggzw68Y5jhTcBi4FXmYOZppm1R3MhSJ5JSi/67Q7X4J5rnJLXYGN27qj\n" |
153 | "MpnoGQ/2xmsNG/isi+h/2vbtPU+WP9SEJnTfPLLpZ7KqCAk7FUUzKsuLx3/SOKtd\n" | 153 | "MpnoGQ/2xmsNG/isi+h/2vbtPU+WP9SEJnTfPLLpZ7KqCAk7FUUzKsuLx3/SOKtd\n" |
154 | "krWxPKwYTgnDEN6DJL7tEzCnG5DFc4mQ7YW9PaRdC3rS1T8PvQ3jB2BUnohM0cFv\n" | 154 | "krWxPKwYTgnDEN6DJL7tEzCnG5DFc4mQ7YW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NAqeP5698X7GD3tXcQSmZrg\n" | 169 | "B8Y3qAQr4RuSH0WkwDUOsALhqBX4N1QwI1USAQEDbNAqeP5698X7GD3tXcQSmZrg\n" |
170 | "O8WfdjBCRNjkq4EW9xX/vQKBgQDONtmwJ0iHiu2BseyeVo/4fzfKlgUSNQ4K1rOA\n" | 170 | "O8WfdjBCRNjkq4EW9xX/vQKBgQDONtmwJ0iHiu2BseyeVo/4fzfKlgUSNQ4K1rOA\n" |
171 | "xhIdMeu8Bxa/z7caHsGC4SVPSuYCtbE2Kh6BwapChcPJXCD45fgEViiJLuJiwEj1\n" | 171 | "xhIdMeu8Bxa/z7caHsGC4SVPSuYCtbE2Kh6BwapChcPJXCD45fgEViiJLuJiwEj1\n" |
172 | "caTpyvNsf1IoffJvCe9ZxtMyX549P8ZOgC3Dt0hN5CBrGLwu2Ox5l+YrqT10pi+5\n" | 172 | "caTpyvNsf1IoffJvCe9ZxtMyX549P8ZOgC3Dt0hN5CBrGLwu2Ox5l+YrqT10pi+5\n" |
173 | "JZX1UQKBgQCrcXrdkkDAc/a4+PxNRpJRLcU4fhv8/lr+UWItE8eUe7bd25bTQfQm\n" | 173 | "JZX1UQKBgQCrcXrdkkDAc/a4+PxNRpJRLcU4fhv8/lr+UWItE8eUe7bd25bTQfQm\n" |
174 | "VpNKc/kAJ66PjIED6fy3ADhd2y4naT2a24uAgQ/M494J68qLnGh6K4JU/09uxR2v\n" | 174 | "VpNKc/kAJ66PjIED6fy3ADhd2y4naT2a24uAgQ/M494J68qLnGh6K4JU/09uxR2v\n" |
175 | "1i2q/4FNLdFFk1XP4iNnTHRLZ+NYr2p5Y9RcvQfTjOauz8Ahav0lyg==\n" | 175 | "1i2q/4FNLdFFk1XP4iNnTHRLZ+NYr2p5Y9RcvQfTjOauz8Ahav0lyg==\n" |
176 | "-----END RSA PRIVATE KEY-----\n"; | 176 | "-----END RSA PRIVATE KEY-----\n"; |
177 | 177 | ||
178 | #endif | 178 | #endif |