making stuff compile

This commit is contained in:
Christian Grothoff
2009-02-03 05:35:28 +00:00
parent b96f4c727b
commit 296760de58
6 changed files with 12 additions and 5 deletions
+4 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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);
+3
View File
@@ -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)
{
+2 -2
View File
@@ -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