diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -10,12 +10,7 @@ #include "ratelimiter.h" #include "netlink.h" #include "uapi/wireguard.h" - -#include <zinc/chacha20poly1305.h> -#include <zinc/chacha20.h> -#include <zinc/poly1305.h> -#include <zinc/blake2s.h> -#include <zinc/curve25519.h> +#include "crypto/zinc.h" #include <linux/version.h> #include <linux/init.h> @@ -27,14 +22,13 @@ static int __init mod_init(void) { int ret; - chacha20_fpu_init(); - poly1305_fpu_init(); - blake2s_fpu_init(); - curve25519_fpu_init(); + if ((ret = chacha20_mod_init()) || (ret = poly1305_mod_init()) || + (ret = chacha20poly1305_mod_init()) || (ret = blake2s_mod_init()) || + (ret = curve25519_mod_init())) + return ret; + #ifdef DEBUG if (!allowedips_selftest() || !packet_counter_selftest() || - !curve25519_selftest() || !poly1305_selftest() || - !chacha20poly1305_selftest() || !blake2s_selftest() || !ratelimiter_selftest()) return -ENOTRECOVERABLE; #endif |