summaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-29 11:24:43 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-29 11:24:43 +0100
commitc4ccac7afb09784d15a38a27ec1b4c167cb031c5 (patch)
tree6fed6fb64529498175c57190582c975a63d3ec6d /src/fuzzy_storage.c
parent53632b619666d67d14640b1dc0832b2ab6eb8aa8 (diff)
downloadrspamd-c4ccac7afb09784d15a38a27ec1b4c167cb031c5.tar.gz
rspamd-c4ccac7afb09784d15a38a27ec1b4c167cb031c5.zip
[CritFix] Check NM part of pubkey to match it with rotating keypairs
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r--src/fuzzy_storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 5499fa732..9243e369e 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -1060,7 +1060,7 @@ rspamd_fuzzy_decrypt_command (struct fuzzy_session *s)
/* Now decrypt request */
if (!rspamd_cryptobox_decrypt_nm_inplace (payload, payload_len, hdr->nonce,
- rspamd_pubkey_get_nm (rk),
+ rspamd_pubkey_get_nm (rk, key->key),
hdr->mac, RSPAMD_CRYPTOBOX_MODE_25519)) {
msg_err ("decryption failed");
rspamd_pubkey_unref (rk);
@@ -1068,7 +1068,7 @@ rspamd_fuzzy_decrypt_command (struct fuzzy_session *s)
return FALSE;
}
- memcpy (s->nm, rspamd_pubkey_get_nm (rk), sizeof (s->nm));
+ memcpy (s->nm, rspamd_pubkey_get_nm (rk, key->key), sizeof (s->nm));
rspamd_pubkey_unref (rk);
return TRUE;