config WOLFSSL_HAS_DEVCRYPTO
bool
+config WOLFSSL_ASM_CAPABLE
+ bool
+ default x86_64 || (aarch64 && !TARGET_bcm27xx)
+
choice
prompt "Hardware Acceleration"
+ default WOLFSSL_HAS_CPU_CRYPTO if WOLFSSL_ASM_CAPABLE
default WOLFSSL_HAS_NO_HW
config WOLFSSL_HAS_NO_HW
bool "None"
+ config WOLFSSL_HAS_CPU_CRYPTO
+ bool "Use CPU crypto instructions"
+ depends on WOLFSSL_ASM_CAPABLE
+ help
+ This will use Intel AESNI insturctions or armv8 Crypto Extensions.
+ Either of them should easily outperform hardware crypto in WolfSSL.
+
config WOLFSSL_HAS_AFALG
bool "AF_ALG"
PKG_CONFIG_DEPENDS+=\
CONFIG_WOLFSSL_HAS_AFALG \
+ CONFIG_WOLFSSL_HAS_CPU_CRYPTO \
CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES \
CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC \
CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL
define Package/libwolfssl
$(call Package/libwolfssl/Default)
TITLE:=wolfSSL library
+ PKGFLAGS:=nonshared
MENU:=1
PROVIDES:=libcyassl
DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user
--enable-wpas --enable-fortress --enable-fastmath
endif
+ifdef CONFIG_WOLFSSL_HAS_CPU_CRYPTO
+ ifdef CONFIG_aarch64
+ CONFIGURE_ARGS += --enable-armasm
+ TARGET_CFLAGS:=$(TARGET_CFLAGS:-mcpu%=-mcpu%+crypto)
+ else ifdef CONFIG_TARGET_x86_64
+ CONFIGURE_ARGS += --enable-intelasm
+ endif
+endif
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/