summaryrefslogtreecommitdiff
path: root/sys/modules/crypto
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2018-08-17 00:30:04 +0000
committerConrad Meyer <cem@FreeBSD.org>2018-08-17 00:30:04 +0000
commit01d5de8fca77a55ddd9bc79db3078c9f2ccdbab1 (patch)
tree3415816ade3b3cca122229a69eaf66a993a50a9c /sys/modules/crypto
parentf36e41e20badf3af260e271a0fec6e7ffa07b1df (diff)
downloadsrc-test2-01d5de8fca77a55ddd9bc79db3078c9f2ccdbab1.tar.gz
src-test2-01d5de8fca77a55ddd9bc79db3078c9f2ccdbab1.zip
Notes
Diffstat (limited to 'sys/modules/crypto')
-rw-r--r--sys/modules/crypto/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile
index d324a6994306..0e66e4c3827a 100644
--- a/sys/modules/crypto/Makefile
+++ b/sys/modules/crypto/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+LIBSODIUM=${SRCTOP}/sys/contrib/libsodium/src/libsodium
+
.PATH: ${SRCTOP}/sys/opencrypto
.PATH: ${SRCTOP}/sys/crypto
.PATH: ${SRCTOP}/sys/crypto/blowfish
@@ -12,6 +14,10 @@
.PATH: ${SRCTOP}/sys/crypto/blake2
.PATH: ${SRCTOP}/sys/crypto/chacha20
.PATH: ${SRCTOP}/sys/contrib/libb2
+.PATH: ${LIBSODIUM}/crypto_onetimeauth/poly1305
+.PATH: ${LIBSODIUM}/crypto_onetimeauth/poly1305/donna
+.PATH: ${LIBSODIUM}/crypto_verify/sodium
+.PATH: ${SRCTOP}/sys/crypto/libsodium
KMOD = crypto
SRCS = crypto.c cryptodev_if.c
@@ -44,6 +50,22 @@ CWARNFLAGS.blake2b-ref.c += -Wno-cast-qual -Wno-unused-function
CWARNFLAGS.blake2s-ref.c += -Wno-cast-qual -Wno-unused-function
SRCS += chacha.c
SRCS += chacha-sw.c
+
+LIBSODIUM_INC=${LIBSODIUM}/include
+LIBSODIUM_COMPAT=${SRCTOP}/sys/crypto/libsodium
+SRCS += xform_poly1305.c
+CFLAGS.xform_poly1305.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
+SRCS += onetimeauth_poly1305.c
+CFLAGS.onetimeauth_poly1305.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
+SRCS += poly1305_donna.c
+CFLAGS.poly1305_donna.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
+SRCS += verify.c
+CFLAGS.verify.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
+SRCS += randombytes.c
+CFLAGS.randombytes.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
+SRCS += utils.c
+CFLAGS.utils.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
+
SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h
SRCS += opt_ddb.h