aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fuzzy_storage.h')
-rw-r--r--src/fuzzy_storage.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/fuzzy_storage.h b/src/fuzzy_storage.h
index 57d7b5cc7..2e97f8190 100644
--- a/src/fuzzy_storage.h
+++ b/src/fuzzy_storage.h
@@ -4,6 +4,7 @@
#include "config.h"
#include "rspamd.h"
#include "shingles.h"
+#include "cryptobox.h"
#define RSPAMD_FUZZY_VERSION 3
@@ -34,4 +35,32 @@ RSPAMD_PACKED(rspamd_fuzzy_reply) {
float prob;
};
+RSPAMD_PACKED(rspamd_fuzzy_encrypted_req_hdr) {
+ guchar magic[4];
+ guchar reserved[8];
+ guchar pubkey[rspamd_cryptobox_PKBYTES];
+ guchar nonce[rspamd_cryptobox_NONCEBYTES];
+ guchar mac[rspamd_cryptobox_MACBYTES];
+};
+
+RSPAMD_PACKED(rspamd_fuzzy_encrypted_cmd) {
+ struct rspamd_fuzzy_encrypted_req_hdr hdr;
+ struct rspamd_fuzzy_cmd cmd;
+};
+
+RSPAMD_PACKED(rspamd_fuzzy_encrypted_shingle_cmd) {
+ struct rspamd_fuzzy_encrypted_req_hdr hdr;
+ struct rspamd_fuzzy_shingle_cmd cmd;
+};
+
+RSPAMD_PACKED(rspamd_fuzzy_encrypted_rep_hdr) {
+ guchar nonce[rspamd_cryptobox_NONCEBYTES];
+ guchar mac[rspamd_cryptobox_MACBYTES];
+};
+
+RSPAMD_PACKED(rspamd_fuzzy_encrypted_reply) {
+ struct rspamd_fuzzy_encrypted_rep_hdr hdr;
+ struct rspamd_fuzzy_reply rep;
+};
+
#endif