aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto.h')
-rw-r--r--src/crypto.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/crypto.h b/src/crypto.h
index ad06066..01b4dee 100644
--- a/src/crypto.h
+++ b/src/crypto.h
@@ -6,9 +6,14 @@
#ifndef _WG_CRYPTO
#define _WG_CRYPTO
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/mbuf.h>
+#if __FreeBSD_version >= 1400036 || \
+ (__FreeBSD_version < 1400000 && __FreeBSD_version >= 1300519)
+#define OCF_CHACHA20_POLY1305
+#endif
+
enum chacha20poly1305_lengths {
XCHACHA20POLY1305_NONCE_SIZE = 24,
CHACHA20POLY1305_KEY_SIZE = 32,
@@ -109,4 +114,7 @@ static inline void curve25519_generate_secret(uint8_t secret[CURVE25519_KEY_SIZE
curve25519_clamp_secret(secret);
}
+int crypto_init(void);
+void crypto_deinit(void);
+
#endif