aboutsummaryrefslogtreecommitdiffstats
path: root/src/wg_cookie.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-04-20 15:10:16 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-04-20 15:10:16 -0600
commit36e259a6e00ae444210862eaeb256b899bf0ae23 (patch)
tree03cbd58d496d4e1a82cbf6ec90b9afe036771310 /src/wg_cookie.h
parentTODO: add a few things (diff)
downloadwireguard-freebsd-36e259a6e00ae444210862eaeb256b899bf0ae23.tar.xz
wireguard-freebsd-36e259a6e00ae444210862eaeb256b899bf0ae23.zip
global: move siphash helper out of support
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/wg_cookie.h')
-rw-r--r--src/wg_cookie.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wg_cookie.h b/src/wg_cookie.h
index c6e4604..0616590 100644
--- a/src/wg_cookie.h
+++ b/src/wg_cookie.h
@@ -11,9 +11,8 @@
#include <sys/time.h>
#include <sys/rwlock.h>
#include <sys/queue.h>
-
#include <netinet/in.h>
-
+#include <crypto/siphash/siphash.h>
#include "crypto.h"
#define COOKIE_MAC_SIZE 16
@@ -59,7 +58,7 @@ struct ratelimit_entry {
};
struct ratelimit {
- SIPHASH_KEY rl_secret;
+ uint8_t rl_secret[SIPHASH_KEY_LENGTH];
uma_zone_t rl_zone;
struct rwlock rl_lock;