aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-16 16:45:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-16 17:05:02 +0100
commitdb25f46740511104bbe565f20914b4aabec7864e (patch)
treec0c52c829d5639d445b48466db4d54a7c9d863e3 /src/libserver
parent13aa518f897059689fb71d3896956f6f7be21224 (diff)
downloadrspamd-db25f46740511104bbe565f20914b4aabec7864e.tar.gz
rspamd-db25f46740511104bbe565f20914b4aabec7864e.zip
[Feature] Implement encrypted logs
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/cfg_file.h2
-rw-r--r--src/libserver/cfg_rcl.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index f0e09f0b2..2eb418506 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -29,6 +29,7 @@ struct rspamd_stat_classifier;
struct module_s;
struct worker_s;
struct rspamd_external_libs_ctx;
+struct rspamd_cryptobox_pubkey;
enum { VAL_UNDEF=0, VAL_TRUE, VAL_FALSE };
@@ -312,6 +313,7 @@ struct rspamd_config {
gboolean log_urls; /**< whether we should log URLs */
GList *debug_symbols; /**< symbols to debug */
GHashTable *debug_modules; /**< logging modules to debug */
+ struct rspamd_cryptobox_pubkey *log_encryption_key; /**< encryption key for logs */
gboolean log_color; /**< output colors for console output */
gboolean log_extended; /**< log extended information */
gboolean log_systemd; /**< special case for systemd logger */
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index ad0629f25..94c5862d7 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -1680,6 +1680,12 @@ rspamd_rcl_config_init (struct rspamd_config *cfg)
"Specify format string for the task logging output "
"(https://rspamd.com/doc/configuration/logging.html "
"for details)");
+ rspamd_rcl_add_default_handler (sub,
+ "encryption_key",
+ rspamd_rcl_parse_struct_pubkey,
+ G_STRUCT_OFFSET (struct rspamd_config, log_encryption_key),
+ 0,
+ "Encrypt sensitive information in logs using this pubkey");
/**
* Options section
*/