From 6e96935b1399008099e388bfc29747da401e081c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 19 Oct 2015 12:16:38 +0100 Subject: [PATCH] Fix http test. --- src/rspamadm/keypair.c | 1 + test/rspamd_http_test.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/rspamadm/keypair.c b/src/rspamadm/keypair.c index 4e985ebe7d..4fd9ae8f14 100644 --- a/src/rspamadm/keypair.c +++ b/src/rspamadm/keypair.c @@ -27,6 +27,7 @@ #include "cryptobox.h" #include "printf.h" #include "http.h" +#include "keypair_private.h" static gboolean hex_encode = FALSE; static gboolean raw = FALSE; diff --git a/test/rspamd_http_test.c b/test/rspamd_http_test.c index ac8c0113ab..ad3cb48d76 100644 --- a/test/rspamd_http_test.c +++ b/test/rspamd_http_test.c @@ -257,7 +257,7 @@ rspamd_http_test_func (void) mtx = rspamd_mempool_get_mutex (pool); rspamd_parse_inet_address (&addr, "127.0.0.1", 0); - rspamd_inet_address_set_port (addr, ottery_rand_range (30000) + 32768); + rspamd_inet_address_set_port (addr, 43898); serv_key = rspamd_http_connection_gen_key (); client_key = rspamd_http_connection_gen_key (); c = rspamd_keypair_cache_new (16); @@ -384,6 +384,10 @@ rspamd_http_test_func (void) /* AES mode */ if (rspamd_cryptobox_openssl_mode (TRUE)) { + serv_key = rspamd_http_connection_gen_key (); + client_key = rspamd_http_connection_gen_key (); + c = rspamd_keypair_cache_new (16); + kill (sfd, SIGTERM); wait (&res); sfd = fork (); @@ -412,7 +416,7 @@ rspamd_http_test_func (void) addr, client_key, peer_key, - c, + NULL, ev_base, &latency[i * pconns + j]); } -- 2.47.3