commit 296760de58c6f287c71fd994e07f45d85495a716 parent b96f4c727bea09f3c5b0db2956a6b02e99635667 Author: Christian Grothoff <christian@grothoff.org> Date: Tue, 3 Feb 2009 05:35:28 +0000 making stuff compile Diffstat:
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 @@ -21,6 +21,7 @@ * USA * */ +#include "gnutls_int.h" void MHD_gtls_write_datum16 (opaque * dest, MHD_gnutls_datum_t dat); 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 @@ -1493,7 +1493,7 @@ MHD__gnutls_read_server_hello (MHD_gtls_session_t session, /* This function copies the appropriate ciphersuites to a locally allocated buffer * Needed in client hello messages. Returns the new data length. */ -static int +int MHD__gnutls_copy_ciphersuites (MHD_gtls_session_t session, opaque * ret_data, size_t ret_data_size) { diff --git 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, struct CBC cbc; if (NULL == (cbc.buf = malloc (sizeof (char) * 256))) { - fprintf (stderr, "Error: failed to read test file. %s\n", + fprintf (stderr, "Error: failed to allocate: %s\n", strerror (errno)); return -1; } @@ -59,6 +59,7 @@ test_unmatching_ssl_version (FILE * test_fd, char *cipher_suite, char url[255]; if (gen_test_file_url (url, DEAMON_TEST_PORT)) { + free (cbc.buf); return -1; } @@ -66,9 +67,11 @@ test_unmatching_ssl_version (FILE * test_fd, char *cipher_suite, if (CURLE_OK == send_curl_req (url, &cbc, cipher_suite, curl_req_ssl_version)) { + free (cbc.buf); return -1; } + free (cbc.buf); return 0; } diff --git 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, MHD_gtls_hash_init (MHD_GNUTLS_MAC_SHA1); /* version = 2 , random = [4 for unix time + 28 for random bytes] */ - datalen = TLS_VERSION_SIZE + TLS_RANDOM_SIZE + (session_id_len + 1); + datalen = 2 /* version */ + TLS_RANDOM_SIZE + (session_id_len + 1); data = MHD_gnutls_malloc (datalen); diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c @@ -26,6 +26,8 @@ #include "tls_test_common.h" #include "tls_test_keys.h" +#include "gnutls.h" +#include "gnutls_datum.h" const char test_file_data[] = "Hello World\n"; @@ -125,6 +127,7 @@ http_dummy_ahc (void *cls, struct MHD_Connection *connection, * @return */ /* TODO have test wrap consider a NULL cbc */ +int send_curl_req (char *url, struct CBC * cbc, char *cipher_suite, int proto_version) { diff --git a/src/testcurl/https/tls_test_common.h b/src/testcurl/https/tls_test_common.h @@ -29,8 +29,8 @@ #include "gnutls.h" /* this enables verbos CURL version checking */ -#define DEBUG_HTTPS_TEST 1 -#define CURL_VERBOS_LEVEL 1 +#define DEBUG_HTTPS_TEST 0 +#define CURL_VERBOS_LEVEL 0 #define DEAMON_TEST_PORT 42433