diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-02-03 05:35:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-02-03 05:35:28 +0000 |
commit | 296760de58c6f287c71fd994e07f45d85495a716 (patch) | |
tree | f636e2978d76bc59545f571b3ec1bced4b8a1712 | |
parent | b96f4c727bea09f3c5b0db2956a6b02e99635667 (diff) | |
download | libmicrohttpd-296760de58c6f287c71fd994e07f45d85495a716.tar.gz libmicrohttpd-296760de58c6f287c71fd994e07f45d85495a716.zip |
making stuff compile
-rw-r--r-- | src/daemon/https/tls/gnutls_datum.h | 1 | ||||
-rw-r--r-- | src/daemon/https/tls/gnutls_handshake.c | 2 | ||||
-rw-r--r-- | src/testcurl/https/tls_daemon_options_test.c | 5 | ||||
-rw-r--r-- | src/testcurl/https/tls_extension_test.c | 2 | ||||
-rw-r--r-- | src/testcurl/https/tls_test_common.c | 3 | ||||
-rw-r--r-- | src/testcurl/https/tls_test_common.h | 4 |
6 files changed, 12 insertions, 5 deletions
diff --git a/src/daemon/https/tls/gnutls_datum.h b/src/daemon/https/tls/gnutls_datum.h index 6160de3d..c6813216 100644 --- a/src/daemon/https/tls/gnutls_datum.h +++ b/src/daemon/https/tls/gnutls_datum.h | |||
@@ -21,6 +21,7 @@ | |||
21 | * USA | 21 | * USA |
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | #include "gnutls_int.h" | ||
24 | 25 | ||
25 | void MHD_gtls_write_datum16 (opaque * dest, MHD_gnutls_datum_t dat); | 26 | void MHD_gtls_write_datum16 (opaque * dest, MHD_gnutls_datum_t dat); |
26 | void MHD_gtls_write_datum24 (opaque * dest, MHD_gnutls_datum_t dat); | 27 | void MHD_gtls_write_datum24 (opaque * dest, MHD_gnutls_datum_t dat); |
diff --git a/src/daemon/https/tls/gnutls_handshake.c b/src/daemon/https/tls/gnutls_handshake.c index 906350e2..cb6cd583 100644 --- a/src/daemon/https/tls/gnutls_handshake.c +++ b/src/daemon/https/tls/gnutls_handshake.c | |||
@@ -1493,7 +1493,7 @@ MHD__gnutls_read_server_hello (MHD_gtls_session_t session, | |||
1493 | /* This function copies the appropriate ciphersuites to a locally allocated buffer | 1493 | /* This function copies the appropriate ciphersuites to a locally allocated buffer |
1494 | * Needed in client hello messages. Returns the new data length. | 1494 | * Needed in client hello messages. Returns the new data length. |
1495 | */ | 1495 | */ |
1496 | static int | 1496 | int |
1497 | MHD__gnutls_copy_ciphersuites (MHD_gtls_session_t session, | 1497 | MHD__gnutls_copy_ciphersuites (MHD_gtls_session_t session, |
1498 | opaque * ret_data, size_t ret_data_size) | 1498 | opaque * ret_data, size_t ret_data_size) |
1499 | { | 1499 | { |
diff --git a/src/testcurl/https/tls_daemon_options_test.c b/src/testcurl/https/tls_daemon_options_test.c index 7b56f334..e14877b3 100644 --- a/src/testcurl/https/tls_daemon_options_test.c +++ b/src/testcurl/https/tls_daemon_options_test.c | |||
@@ -49,7 +49,7 @@ test_unmatching_ssl_version (FILE * test_fd, char *cipher_suite, | |||
49 | struct CBC cbc; | 49 | struct CBC cbc; |
50 | if (NULL == (cbc.buf = malloc (sizeof (char) * 256))) | 50 | if (NULL == (cbc.buf = malloc (sizeof (char) * 256))) |
51 | { | 51 | { |
52 | fprintf (stderr, "Error: failed to read test file. %s\n", | 52 | fprintf (stderr, "Error: failed to allocate: %s\n", |
53 | strerror (errno)); | 53 | strerror (errno)); |
54 | return -1; | 54 | return -1; |
55 | } | 55 | } |
@@ -59,6 +59,7 @@ test_unmatching_ssl_version (FILE * test_fd, char *cipher_suite, | |||
59 | char url[255]; | 59 | char url[255]; |
60 | if (gen_test_file_url (url, DEAMON_TEST_PORT)) | 60 | if (gen_test_file_url (url, DEAMON_TEST_PORT)) |
61 | { | 61 | { |
62 | free (cbc.buf); | ||
62 | return -1; | 63 | return -1; |
63 | } | 64 | } |
64 | 65 | ||
@@ -66,9 +67,11 @@ test_unmatching_ssl_version (FILE * test_fd, char *cipher_suite, | |||
66 | if (CURLE_OK == | 67 | if (CURLE_OK == |
67 | send_curl_req (url, &cbc, cipher_suite, curl_req_ssl_version)) | 68 | send_curl_req (url, &cbc, cipher_suite, curl_req_ssl_version)) |
68 | { | 69 | { |
70 | free (cbc.buf); | ||
69 | return -1; | 71 | return -1; |
70 | } | 72 | } |
71 | 73 | ||
74 | free (cbc.buf); | ||
72 | return 0; | 75 | return 0; |
73 | } | 76 | } |
74 | 77 | ||
diff --git a/src/testcurl/https/tls_extension_test.c b/src/testcurl/https/tls_extension_test.c index 6f185bac..17745529 100644 --- a/src/testcurl/https/tls_extension_test.c +++ b/src/testcurl/https/tls_extension_test.c | |||
@@ -93,7 +93,7 @@ test_hello_extension (MHD_gtls_session_t session, extensions_t exten_t, | |||
93 | MHD_gtls_hash_init (MHD_GNUTLS_MAC_SHA1); | 93 | MHD_gtls_hash_init (MHD_GNUTLS_MAC_SHA1); |
94 | 94 | ||
95 | /* version = 2 , random = [4 for unix time + 28 for random bytes] */ | 95 | /* version = 2 , random = [4 for unix time + 28 for random bytes] */ |
96 | datalen = TLS_VERSION_SIZE + TLS_RANDOM_SIZE + (session_id_len + 1); | 96 | datalen = 2 /* version */ + TLS_RANDOM_SIZE + (session_id_len + 1); |
97 | 97 | ||
98 | data = MHD_gnutls_malloc (datalen); | 98 | data = MHD_gnutls_malloc (datalen); |
99 | 99 | ||
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c index e9367462..93eb4bed 100644 --- a/src/testcurl/https/tls_test_common.c +++ b/src/testcurl/https/tls_test_common.c | |||
@@ -26,6 +26,8 @@ | |||
26 | 26 | ||
27 | #include "tls_test_common.h" | 27 | #include "tls_test_common.h" |
28 | #include "tls_test_keys.h" | 28 | #include "tls_test_keys.h" |
29 | #include "gnutls.h" | ||
30 | #include "gnutls_datum.h" | ||
29 | 31 | ||
30 | const char test_file_data[] = "Hello World\n"; | 32 | const char test_file_data[] = "Hello World\n"; |
31 | 33 | ||
@@ -125,6 +127,7 @@ http_dummy_ahc (void *cls, struct MHD_Connection *connection, | |||
125 | * @return | 127 | * @return |
126 | */ | 128 | */ |
127 | /* TODO have test wrap consider a NULL cbc */ | 129 | /* TODO have test wrap consider a NULL cbc */ |
130 | int | ||
128 | send_curl_req (char *url, struct CBC * cbc, char *cipher_suite, | 131 | send_curl_req (char *url, struct CBC * cbc, char *cipher_suite, |
129 | int proto_version) | 132 | int proto_version) |
130 | { | 133 | { |
diff --git a/src/testcurl/https/tls_test_common.h b/src/testcurl/https/tls_test_common.h index 75c4361d..206a9206 100644 --- a/src/testcurl/https/tls_test_common.h +++ b/src/testcurl/https/tls_test_common.h | |||
@@ -29,8 +29,8 @@ | |||
29 | #include "gnutls.h" | 29 | #include "gnutls.h" |
30 | 30 | ||
31 | /* this enables verbos CURL version checking */ | 31 | /* this enables verbos CURL version checking */ |
32 | #define DEBUG_HTTPS_TEST 1 | 32 | #define DEBUG_HTTPS_TEST 0 |
33 | #define CURL_VERBOS_LEVEL 1 | 33 | #define CURL_VERBOS_LEVEL 0 |
34 | 34 | ||
35 | #define DEAMON_TEST_PORT 42433 | 35 | #define DEAMON_TEST_PORT 42433 |
36 | 36 | ||