aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/https/tls_test_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/https/tls_test_common.h')
-rw-r--r--src/testcurl/https/tls_test_common.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/testcurl/https/tls_test_common.h b/src/testcurl/https/tls_test_common.h
index 490239ef..36f5ffa5 100644
--- a/src/testcurl/https/tls_test_common.h
+++ b/src/testcurl/https/tls_test_common.h
@@ -35,15 +35,18 @@
35#define test_data "Hello World\n" 35#define test_data "Hello World\n"
36#define ca_cert_file_name "tmp_ca_cert.pem" 36#define ca_cert_file_name "tmp_ca_cert.pem"
37 37
38#define EMPTY_PAGE "<html><head><title>Empty page</title></head><body>Empty page</body></html>" 38#define EMPTY_PAGE \
39#define PAGE_NOT_FOUND "<html><head><title>File not found</title></head><body>File not found</body></html>" 39 "<html><head><title>Empty page</title></head><body>Empty page</body></html>"
40#define PAGE_NOT_FOUND \
41 "<html><head><title>File not found</title></head><body>File not found</body></html>"
40 42
41#define MHD_E_MEM "Error: memory error\n" 43#define MHD_E_MEM "Error: memory error\n"
42#define MHD_E_SERVER_INIT "Error: failed to start server\n" 44#define MHD_E_SERVER_INIT "Error: failed to start server\n"
43#define MHD_E_TEST_FILE_CREAT "Error: failed to setup test file\n" 45#define MHD_E_TEST_FILE_CREAT "Error: failed to setup test file\n"
44#define MHD_E_CERT_FILE_CREAT "Error: failed to setup test certificate\n" 46#define MHD_E_CERT_FILE_CREAT "Error: failed to setup test certificate\n"
45#define MHD_E_KEY_FILE_CREAT "Error: failed to setup test certificate\n" 47#define MHD_E_KEY_FILE_CREAT "Error: failed to setup test certificate\n"
46#define MHD_E_FAILED_TO_CONNECT "Error: server connection could not be established\n" 48#define MHD_E_FAILED_TO_CONNECT \
49 "Error: server connection could not be established\n"
47 50
48/* TODO rm if unused */ 51/* TODO rm if unused */
49struct https_test_data 52struct https_test_data
@@ -82,8 +85,8 @@ setup_ca_cert (void);
82 * perform cURL request for file 85 * perform cURL request for file
83 */ 86 */
84int 87int
85test_daemon_get (void * cls, 88test_daemon_get (void *cls,
86 const char *cipher_suite, int proto_version, 89 const char *cipher_suite, int proto_version,
87 int port, int ver_peer); 90 int port, int ver_peer);
88 91
89void 92void
@@ -122,31 +125,33 @@ send_curl_req (char *url, struct CBC *cbc, const char *cipher_suite,
122 int proto_version); 125 int proto_version);
123 126
124int 127int
125test_https_transfer (void *cls, int port, const char *cipher_suite, int proto_version); 128test_https_transfer (void *cls, int port, const char *cipher_suite, int
129 proto_version);
126 130
127int 131int
128setup_testcase (struct MHD_Daemon **d, int port, int daemon_flags, va_list arg_list); 132setup_testcase (struct MHD_Daemon **d, int port, int daemon_flags, va_list
133 arg_list);
129 134
130void 135void
131teardown_testcase (struct MHD_Daemon *d); 136teardown_testcase (struct MHD_Daemon *d);
132 137
133 138
134int 139int
135setup_session (gnutls_session_t * session, 140setup_session (gnutls_session_t *session,
136 gnutls_datum_t * key, 141 gnutls_datum_t *key,
137 gnutls_datum_t * cert, 142 gnutls_datum_t *cert,
138 gnutls_certificate_credentials_t * xcred); 143 gnutls_certificate_credentials_t *xcred);
139 144
140int 145int
141teardown_session (gnutls_session_t session, 146teardown_session (gnutls_session_t session,
142 gnutls_datum_t * key, 147 gnutls_datum_t *key,
143 gnutls_datum_t * cert, 148 gnutls_datum_t *cert,
144 gnutls_certificate_credentials_t xcred); 149 gnutls_certificate_credentials_t xcred);
145 150
146int 151int
147test_wrap (const char *test_name, int 152test_wrap (const char *test_name, int
148 (*test_function) (void * cls, int port, const char *cipher_suite, 153 (*test_function)(void *cls, int port, const char *cipher_suite,
149 int proto_version), void * cls, 154 int proto_version), void *cls,
150 int port, 155 int port,
151 int daemon_flags, const char *cipher_suite, int proto_version, ...); 156 int daemon_flags, const char *cipher_suite, int proto_version, ...);
152 157