aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/keypairs_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-15 16:14:20 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-15 16:14:20 +0000
commit2fcf5d83cf8ad17e84a78aecbf924c5d23236279 (patch)
tree6a21c1e34188d9319ba21fa3bee8e780524dda62 /src/libutil/keypairs_cache.c
parent137349a07625326251e8a090b4bc84398f766968 (diff)
downloadrspamd-2fcf5d83cf8ad17e84a78aecbf924c5d23236279.tar.gz
rspamd-2fcf5d83cf8ad17e84a78aecbf924c5d23236279.zip
Remove tweetnacl for now.
Diffstat (limited to 'src/libutil/keypairs_cache.c')
-rw-r--r--src/libutil/keypairs_cache.c16
1 files changed, 8 insertions, 8 deletions
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