]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix init code for servers keypairs cache
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 24 Apr 2019 09:38:04 +0000 (10:38 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 24 Apr 2019 09:38:04 +0000 (10:38 +0100)
src/libutil/http_connection.c
src/libutil/http_context.c
src/worker.c

index b82f3c98fd49ba9b1dea78a1a218332bf698f7e6..f4f494cf6b94f5af5081aa9cf3104d3ea8f0b96a 100644 (file)
@@ -44,14 +44,14 @@ struct _rspamd_http_privbuf {
 };
 
 enum rspamd_http_priv_flags {
-       RSPAMD_HTTP_CONN_FLAG_ENCRYPTED = 1 << 0,
-       RSPAMD_HTTP_CONN_FLAG_NEW_HEADER = 1 << 1,
-       RSPAMD_HTTP_CONN_FLAG_RESETED = 1 << 2,
-       RSPAMD_HTTP_CONN_FLAG_TOO_LARGE = 1 << 3,
-       RSPAMD_HTTP_CONN_FLAG_ENCRYPTION_NEEDED = 1 << 4,
-       RSPAMD_HTTP_CONN_FLAG_PROXY = 1 << 5,
-       RSPAMD_HTTP_CONN_FLAG_PROXY_REQUEST = 1 << 6,
-       RSPAMD_HTTP_CONN_OWN_SOCKET = 1 << 7,
+       RSPAMD_HTTP_CONN_FLAG_ENCRYPTED = 1u << 0u,
+       RSPAMD_HTTP_CONN_FLAG_NEW_HEADER = 1u << 1u,
+       RSPAMD_HTTP_CONN_FLAG_RESETED = 1u << 2u,
+       RSPAMD_HTTP_CONN_FLAG_TOO_LARGE = 1u << 3u,
+       RSPAMD_HTTP_CONN_FLAG_ENCRYPTION_NEEDED = 1u << 4u,
+       RSPAMD_HTTP_CONN_FLAG_PROXY = 1u << 5u,
+       RSPAMD_HTTP_CONN_FLAG_PROXY_REQUEST = 1u << 6u,
+       RSPAMD_HTTP_CONN_OWN_SOCKET = 1u << 7u,
 };
 
 #define IS_CONN_ENCRYPTED(c) ((c)->flags & RSPAMD_HTTP_CONN_FLAG_ENCRYPTED)
index b3a30889135add229a8d341acd639f3f70611d35..95500aaad1a9f58652434ca45149c2dc750a0a82 100644 (file)
@@ -182,8 +182,8 @@ rspamd_http_context_init (struct rspamd_http_context *ctx)
                ctx->client_kp_cache = rspamd_keypair_cache_new (ctx->config.kp_cache_size_client);
        }
 
-       if (ctx->config.kp_cache_size_client > 0) {
-               ctx->client_kp_cache = rspamd_keypair_cache_new (ctx->config.kp_cache_size_client);
+       if (ctx->config.kp_cache_size_server > 0) {
+               ctx->server_kp_cache = rspamd_keypair_cache_new (ctx->config.kp_cache_size_server);
        }
 
        if (ctx->config.client_key_rotate_time > 0 && ctx->ev_base) {
index ee8b261d6580e4ea5cb79fb1836037692e9ba073..c7f4f76871c1ebdbecc3c1e39258fa08ad29bd15 100644 (file)
@@ -576,7 +576,7 @@ init_worker (struct rspamd_config *cfg)
                        ctx,
                        G_STRUCT_OFFSET (struct rspamd_worker_ctx, encrypted_only),
                        0,
-                       "Deprecated: always true now");
+                       "Allow only encrypted connections");
 
 
        rspamd_rcl_register_worker_option (cfg,