aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-09 17:46:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-09 17:46:25 +0100
commitb8a099632ffc5c8fd84fa44b058acc14d46a7a9b (patch)
tree0b29b2219e11ddc507836df1bdba1aa4dbfd9404 /src/libstat
parent1d56cbb68b103ccca36135a53d611d3e3fed4ec9 (diff)
downloadrspamd-b8a099632ffc5c8fd84fa44b058acc14d46a7a9b.tar.gz
rspamd-b8a099632ffc5c8fd84fa44b058acc14d46a7a9b.zip
[Feature] Add multiple base32 alphabets for decoding
Diffstat (limited to 'src/libstat')
-rw-r--r--src/libstat/backends/sqlite3_backend.c2
-rw-r--r--src/libstat/tokenizers/osb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c
index 1ddfa6f17..6b1cca173 100644
--- a/src/libstat/backends/sqlite3_backend.c
+++ b/src/libstat/backends/sqlite3_backend.c
@@ -1053,7 +1053,7 @@ rspamd_sqlite3_load_tokenizer_config (gpointer runtime,
}
else {
/* Need to decode */
- copied_conf = rspamd_decode_base32 (tk_conf, sz, len);
+ copied_conf = rspamd_decode_base32 (tk_conf, sz, len, RSPAMD_BASE32_DEFAULT);
g_free (tk_conf);
rspamd_mempool_add_destructor (rt->task->task_pool, g_free, copied_conf);
}
diff --git a/src/libstat/tokenizers/osb.c b/src/libstat/tokenizers/osb.c
index 0b53f8af9..a8007ec0f 100644
--- a/src/libstat/tokenizers/osb.c
+++ b/src/libstat/tokenizers/osb.c
@@ -114,7 +114,7 @@ rspamd_tokenizer_osb_config_from_ucl (rspamd_mempool_t * pool,
if (elt != NULL && ucl_object_type (elt) == UCL_STRING) {
key = rspamd_decode_base32 (ucl_object_tostring (elt),
- 0, &keylen);
+ 0, &keylen, RSPAMD_BASE32_DEFAULT);
if (keylen < sizeof (rspamd_sipkey_t)) {
msg_warn ("siphash key is too short: %z", keylen);
g_free (key);