diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-11 22:13:02 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-11 22:13:02 +0000 |
commit | 587d0df0c0d8870fd56cea70663cebbb2b5fb074 (patch) | |
tree | 10778a58138936f364d58800c5892d914d86eae6 /src/libutil | |
parent | 31d8cb8d0323e2a800e3fdf623a0eedad72a8dfc (diff) | |
download | rspamd-587d0df0c0d8870fd56cea70663cebbb2b5fb074.tar.gz rspamd-587d0df0c0d8870fd56cea70663cebbb2b5fb074.zip |
Allow to specify keypairs cache externally.
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/http.c | 6 | ||||
-rw-r--r-- | src/libutil/http.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index 2f948f452..cafcbf6ea 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -1600,7 +1600,8 @@ struct rspamd_http_connection_router * rspamd_http_router_new (rspamd_http_router_error_handler_t eh, rspamd_http_router_finish_handler_t fh, struct timeval *timeout, struct event_base *base, - const char *default_fs_path) + const char *default_fs_path, + struct rspamd_keypair_cache *cache) { struct rspamd_http_connection_router * new; struct stat st; @@ -1635,8 +1636,7 @@ rspamd_http_router_new (rspamd_http_router_error_handler_t eh, } } - /* XXX: stupid default value, should be configurable */ - new->cache = rspamd_keypair_cache_new (256); + new->cache = cache; return new; } diff --git a/src/libutil/http.h b/src/libutil/http.h index 1c79fb45c..c581cb6f6 100644 --- a/src/libutil/http.h +++ b/src/libutil/http.h @@ -333,7 +333,8 @@ struct rspamd_http_connection_router * rspamd_http_router_new ( rspamd_http_router_finish_handler_t fh, struct timeval *timeout, struct event_base *base, - const char *default_fs_path); + const char *default_fs_path, + struct rspamd_keypair_cache *cache); /** * Set encryption key for the HTTP router |