mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-27 04:09:31 +03:00
making stuff compile
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user