From bc6a03a1086e8f7d1c1211633f61ee25b12e16a2 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 13 Jun 2016 14:27:48 +0100 Subject: [Feature] Implement SSL support in http client --- utils/rspamd_http_bench.c | 10 +++++++--- utils/rspamd_http_server.c | 9 +++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/rspamd_http_bench.c b/utils/rspamd_http_bench.c index 64b4e6ed2..32aedb334 100644 --- a/utils/rspamd_http_bench.c +++ b/utils/rspamd_http_bench.c @@ -146,9 +146,13 @@ rspamd_http_client_func (struct event_base *ev_base, struct lat_elt *latency, g_assert (fd != -1); flags = 1; (void)setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof (flags)); - conn = rspamd_http_connection_new (rspamd_client_body, rspamd_client_err, - rspamd_client_finish, RSPAMD_HTTP_CLIENT_SIMPLE, - RSPAMD_HTTP_CLIENT, c); + conn = rspamd_http_connection_new (rspamd_client_body, + rspamd_client_err, + rspamd_client_finish, + RSPAMD_HTTP_CLIENT_SIMPLE, + RSPAMD_HTTP_CLIENT, + c, + NULL); rspamd_snprintf (urlbuf, sizeof (urlbuf), "http://%s/%d", host, file_size); msg = rspamd_http_message_from_url (urlbuf); diff --git a/utils/rspamd_http_server.c b/utils/rspamd_http_server.c index d920c425d..69ef852e6 100644 --- a/utils/rspamd_http_server.c +++ b/utils/rspamd_http_server.c @@ -150,8 +150,13 @@ rspamd_server_accept (gint fd, short what, void *arg) rspamd_inet_address_destroy (addr); session = g_slice_alloc (sizeof (*session)); - session->conn = rspamd_http_connection_new (NULL, rspamd_server_error, - rspamd_server_finish, 0, RSPAMD_HTTP_SERVER, c); + session->conn = rspamd_http_connection_new (NULL, + rspamd_server_error, + rspamd_server_finish, + 0, + RSPAMD_HTTP_SERVER, + c, + NULL); rspamd_http_connection_set_key (session->conn, server_key); rspamd_http_connection_read_message (session->conn, session, -- cgit v1.2.3