diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-05 17:27:24 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-05 17:27:24 +0000 |
commit | 094529b9cd48a56f1cbd154bb626795ac865388e (patch) | |
tree | 7311e83271f17a6f3b6f9c327be183e00ab5231c /src/libcryptobox/keypairs_cache.c | |
parent | 40d7391a2a7a2568ddf5c9fb526a39616b75ecee (diff) | |
download | rspamd-094529b9cd48a56f1cbd154bb626795ac865388e.tar.gz rspamd-094529b9cd48a56f1cbd154bb626795ac865388e.zip |
Implement keypairs creation
Diffstat (limited to 'src/libcryptobox/keypairs_cache.c')
-rw-r--r-- | src/libcryptobox/keypairs_cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcryptobox/keypairs_cache.c b/src/libcryptobox/keypairs_cache.c index 6e1d056e7..a259c2ac1 100644 --- a/src/libcryptobox/keypairs_cache.c +++ b/src/libcryptobox/keypairs_cache.c @@ -95,7 +95,11 @@ rspamd_keypair_cache_process (struct rspamd_keypair_cache *c, if (new == NULL) { new = g_slice_alloc0 (sizeof (*new)); - new->nm = g_slice_alloc (sizeof (*new->nm)); + + if (posix_memalign ((void **)&new->nm, 32, sizeof (*new->nm)) != 0) { + abort (); + } + REF_INIT_RETAIN (new->nm, rspamd_cryptobox_nm_dtor); memcpy (new->pair, rk->id, rspamd_cryptobox_HASHBYTES); |