diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/http.c | 1 | ||||
-rw-r--r-- | src/libutil/keypair_private.h | 1 | ||||
-rw-r--r-- | src/libutil/keypairs_cache.c | 16 |
3 files changed, 8 insertions, 10 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index cafcbf6ea..615f21de6 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -28,7 +28,6 @@ #include "printf.h" #include "logger.h" #include "ref.h" -#include "tweetnacl.h" #include "blake2.h" #include "ottery.h" #include "keypair_private.h" diff --git a/src/libutil/keypair_private.h b/src/libutil/keypair_private.h index 84e936072..70f9bad59 100644 --- a/src/libutil/keypair_private.h +++ b/src/libutil/keypair_private.h @@ -26,7 +26,6 @@ #define KEYPAIR_PRIVATE_H_ #include "config.h" -#include "tweetnacl.h" #include "ref.h" #include "blake2.h" #include "cryptobox.h" diff --git a/src/libutil/keypairs_cache.c b/src/libutil/keypairs_cache.c index d43e38d72..20e7678e1 100644 --- a/src/libutil/keypairs_cache.c +++ b/src/libutil/keypairs_cache.c @@ -90,24 +90,24 @@ rspamd_keypair_cache_process (struct rspamd_keypair_cache *c, g_assert (kp_local != NULL); g_assert (kp_remote != NULL); - memcpy (search.pair, kp_remote->pk, crypto_box_PUBLICKEYBYTES); - memcpy (&search.pair[crypto_box_PUBLICKEYBYTES], kp_local->sk, - crypto_box_SECRETKEYBYTES); + memcpy (search.pair, kp_remote->pk, rspamd_cryptobox_PKBYTES); + memcpy (&search.pair[rspamd_cryptobox_PKBYTES], kp_local->sk, + rspamd_cryptobox_SKBYTES); new = rspamd_lru_hash_lookup (c->hash, &search, time (NULL)); if (new == NULL) { new = g_slice_alloc (sizeof (*new)); - memcpy (new->pair, kp_remote->pk, crypto_box_PUBLICKEYBYTES); - memcpy (&new->pair[crypto_box_PUBLICKEYBYTES], kp_local->sk, - crypto_box_SECRETKEYBYTES); + memcpy (new->pair, kp_remote->pk, rspamd_cryptobox_PKBYTES); + memcpy (&new->pair[rspamd_cryptobox_PKBYTES], kp_local->sk, + rspamd_cryptobox_SKBYTES); rspamd_cryptobox_nm (new->nm, kp_remote->pk, kp_local->sk); rspamd_lru_hash_insert (c->hash, new, new, time (NULL), -1); } g_assert (new != NULL); - memcpy (kp_remote->nm, new->nm, crypto_box_BEFORENMBYTES); - memcpy (kp_local->nm, new->nm, crypto_box_BEFORENMBYTES); + memcpy (kp_remote->nm, new->nm, rspamd_cryptobox_NMBYTES); + memcpy (kp_local->nm, new->nm, rspamd_cryptobox_NMBYTES); } void |