Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,23 @@ AC_ARG_ENABLE([freebsdkm-crypto-register],
[ENABLED_BSDKM_REGISTER=no]
)

# wolfzfs support
AC_ARG_ENABLE([wolfzfs],
[AS_HELP_STRING([--enable-wolfzfs],[Enable wolfZFS kernel support (default: disabled)])],
Comment thread
philljj marked this conversation as resolved.
[ENABLED_WOLFZFS=$enableval],
[ENABLED_WOLFZFS=no]
)
if test "x$ENABLED_WOLFZFS" = "xyes" || test "x$ENABLED_WOLFZFS" = "xkernel"
then
if test "x$ENABLED_WOLFZFS" = "xyes"; then
AM_CFLAGS="$AM_CFLAGS -DNO_OLD_SHA_NAMES"
fi

if test "x$ENABLED_WOLFZFS" = "xkernel"; then
AM_CFLAGS="$AM_CFLAGS -DNO_STDDEF_H -DNO_STDATOMIC_H"
fi
Comment on lines +195 to +201
fi

AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h time.h sys/ioctl.h sys/socket.h sys/time.h errno.h sys/un.h ctype.h sys/random.h])
AC_CHECK_LIB([network],[socket])
AC_C_BIGENDIAN
Expand All @@ -192,7 +209,8 @@ if test "x$ENABLED_BSDKM" = "xyes"; then
# The <stdatomic.h> header should not be included in freebsd kernel build.
# Look for <machine/atomic.h> instead.
AC_CHECK_HEADER(machine/atomic.h, [AM_CPPFLAGS="$AM_CPPFLAGS -DWOLFSSL_HAVE_ATOMIC_H"],[])
else
elif test "x$ENABLED_WOLFZFS" = "xno"; then
# Don't use stdatomic.h with wolfzfs kernel. It expects gcc builtins.
AC_CHECK_HEADER(stdatomic.h, [AM_CPPFLAGS="$AM_CPPFLAGS -DWOLFSSL_HAVE_ATOMIC_H"],[])
fi
AC_CHECK_HEADER(assert.h, [AM_CPPFLAGS="$AM_CPPFLAGS -DWOLFSSL_HAVE_ASSERT_H"],[])
Expand Down Expand Up @@ -3192,6 +3210,13 @@ then
ENABLED_AESGCM="4bit"
fi

if test "x$ENABLED_WOLFZFS" = "xyes" || test "x$ENABLED_WOLFZFS" = "xkernel"
then
# zfs uses ccm, and gcm streaming.
ENABLED_AESCCM="yes"
ENABLED_AESGCM="yes"
ENABLED_AESGCM_STREAM="yes"
Comment on lines +3216 to +3218
fi

# AES-CCM
AC_ARG_ENABLE([aesccm],
Expand All @@ -3200,7 +3225,8 @@ AC_ARG_ENABLE([aesccm],
[ ENABLED_AESCCM=no ]
)

if test "$ENABLED_AESCCM" = "yes" || test "$ENABLED_WOLFENGINE" = "yes"
if test "$ENABLED_AESCCM" = "yes" || test "$ENABLED_WOLFENGINE" = "yes" ||
test "$ENABLED_WOLFZFS" != "no"
then
AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM"
AM_CCASFLAGS="$AM_CCASFLAGS -DHAVE_AESCCM"
Expand Down
2 changes: 1 addition & 1 deletion wolfssl/wolfcrypt/wc_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
#ifdef XFENCE
/* use user-supplied XFENCE definition. */
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \
!defined(__STDC_NO_ATOMICS__)
!defined(__STDC_NO_ATOMICS__) && !defined(NO_STDATOMIC_H)
#ifdef WOLFSSL_NO_ATOMIC
#define XFENCE() WC_DO_NOTHING
#else
Expand Down
Loading