]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix http test.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Oct 2015 11:16:38 +0000 (12:16 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 19 Oct 2015 11:16:38 +0000 (12:16 +0100)
src/rspamadm/keypair.c
test/rspamd_http_test.c

index 4e985ebe7d5edc74603da3eec7738cb98f2717b4..4fd9ae8f14702c5a20b732f27b1253ea9e76cf7a 100644 (file)
@@ -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;
index ac8c0113ab43338cc9ac632d2707538937e7f5a0..ad3cb48d76c60ba17b4afd985d78ba28245aa7a5 100644 (file)
@@ -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]);
                        }