include $(TOPDIR)/rules.mk
PKG_NAME:=wolfssl
-PKG_VERSION:=4.8.1-stable
-PKG_RELEASE:=1
+PKG_VERSION:=5.1.1-stable
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
-PKG_HASH:=50db45f348f47e00c93dd244c24108220120cb3cc9d01434789229c32937c444
+PKG_HASH:=d3e0544dbe7e9587c0f6538cdc671b6492663bb7a4281819538abe6c99cdbd92
PKG_FIXUP:=libtool
PKG_INSTALL:=1
CONFIG_WOLFSSL_HAS_DH CONFIG_WOLFSSL_HAS_DTLS \
CONFIG_WOLFSSL_HAS_ECC25519 CONFIG_WOLFSSL_HAS_OCSP \
CONFIG_WOLFSSL_HAS_SESSION_TICKET CONFIG_WOLFSSL_HAS_TLSV10 \
- CONFIG_WOLFSSL_HAS_TLSV13 CONFIG_WOLFSSL_HAS_WPAS CONFIG_WOLFSSL_HAS_CERTGEN
+ CONFIG_WOLFSSL_HAS_TLSV13 CONFIG_WOLFSSL_HAS_WPAS CONFIG_WOLFSSL_ALT_NAMES
include $(INCLUDE_DIR)/package.mk
MENU:=1
PROVIDES:=libcyassl
DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user
- ABI_VERSION:=24
+ ABI_VERSION:=30
endef
define Package/libwolfssl/description
source "$(SOURCE)/Config.in"
endef
-TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 -fomit-frame-pointer -flto
+TARGET_CFLAGS += \
+ $(FPIC) \
+ -fomit-frame-pointer \
+ -flto \
+ -DFP_MAX_BITS=8192 \
+ $(if $(CONFIG_WOLFSSL_ALT_NAMES),-DWOLFSSL_ALT_NAMES)
+
TARGET_LDFLAGS += -flto
# --enable-stunnel needed for OpenSSL API compatibility bits
CONFIGURE_ARGS += \
+ --enable-reproducible-build \
+ --enable-opensslall \
--enable-opensslextra \
--enable-sni \
--enable-stunnel \
+ --enable-altcertchains \
+ --disable-crypttests \
--disable-examples \
--disable-jobserver \
--$(if $(CONFIG_IPV6),enable,disable)-ipv6 \
--$(if $(CONFIG_WOLFSSL_HAS_AES_CCM),enable,disable)-aesccm \
- --$(if $(CONFIG_WOLFSSL_HAS_CERTGEN),enable,disable)-certgen \
--$(if $(CONFIG_WOLFSSL_HAS_CHACHA_POLY),enable,disable)-chacha \
--$(if $(CONFIG_WOLFSSL_HAS_CHACHA_POLY),enable,disable)-poly1305 \
--$(if $(CONFIG_WOLFSSL_HAS_DH),enable,disable)-dh \
ifeq ($(CONFIG_WOLFSSL_HAS_WPAS),y)
CONFIGURE_ARGS += \
- --enable-wpas --enable-sha512 --enable-fortress --enable-fastmath
+ --enable-wpas --enable-fortress --enable-fastmath
endif
define Build/InstallDev
+++ /dev/null
-From fa8f23284d4689c2a737204b337b58d966dcbd8c Mon Sep 17 00:00:00 2001
-From: Sean Parkinson <sean@wolfssl.com>
-Date: Fri, 20 Aug 2021 10:23:38 +1000
-Subject: [PATCH] Maths x86 asm: change asm snippets to get compiling
-
-TFM:
- Use register or memory for c0, c1, c2 in SQRADD and SQRADD2.
-SP:
- Use register or memory for vl, vh, vo in SP_ASM_MUL_ADD,
-SP_ASM_MUL_ADD2 and SP_ASM_SQR_ADD.
----
- wolfcrypt/src/asm.c | 29 ++++++++++++++++++++---------
- wolfcrypt/src/sp_int.c | 6 +++---
- 2 files changed, 23 insertions(+), 12 deletions(-)
-
---- a/wolfcrypt/src/asm.c
-+++ b/wolfcrypt/src/asm.c
-@@ -698,33 +698,39 @@ __asm__( \
-
- #define SQRADD(i, j) \
- __asm__( \
-- "movl %6,%%eax \n\t" \
-+ "movl %3,%%eax \n\t" \
- "mull %%eax \n\t" \
- "addl %%eax,%0 \n\t" \
- "adcl %%edx,%1 \n\t" \
- "adcl $0,%2 \n\t" \
-- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i) :"%eax","%edx","cc");
-+ :"+rm"(c0), "+rm"(c1), "+rm"(c2) \
-+ : "m"(i) \
-+ :"%eax","%edx","cc");
-
- #define SQRADD2(i, j) \
- __asm__( \
-- "movl %6,%%eax \n\t" \
-- "mull %7 \n\t" \
-+ "movl %3,%%eax \n\t" \
-+ "mull %4 \n\t" \
- "addl %%eax,%0 \n\t" \
- "adcl %%edx,%1 \n\t" \
- "adcl $0,%2 \n\t" \
- "addl %%eax,%0 \n\t" \
- "adcl %%edx,%1 \n\t" \
- "adcl $0,%2 \n\t" \
-- :"=r"(c0), "=r"(c1), "=r"(c2): "0"(c0), "1"(c1), "2"(c2), "m"(i), "m"(j) :"%eax","%edx", "cc");
-+ :"+rm"(c0), "+rm"(c1), "+rm"(c2) \
-+ : "m"(i), "m"(j) \
-+ :"%eax","%edx", "cc");
-
- #define SQRADDSC(i, j) \
--__asm__( \
-+__asm__( \
- "movl %3,%%eax \n\t" \
- "mull %4 \n\t" \
- "movl %%eax,%0 \n\t" \
- "movl %%edx,%1 \n\t" \
- "xorl %2,%2 \n\t" \
-- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "g"(i), "g"(j) :"%eax","%edx","cc");
-+ :"=r"(sc0), "=r"(sc1), "=r"(sc2) \
-+ : "g"(i), "g"(j) \
-+ :"%eax","%edx","cc");
-
- #define SQRADDAC(i, j) \
- __asm__( \
-@@ -733,7 +739,9 @@ __asm__(
- "addl %%eax,%0 \n\t" \
- "adcl %%edx,%1 \n\t" \
- "adcl $0,%2 \n\t" \
-- :"=r"(sc0), "=r"(sc1), "=r"(sc2): "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) :"%eax","%edx","cc");
-+ :"=r"(sc0), "=r"(sc1), "=r"(sc2) \
-+ : "0"(sc0), "1"(sc1), "2"(sc2), "g"(i), "g"(j) \
-+ :"%eax","%edx","cc");
-
- #define SQRADDDB \
- __asm__( \
-@@ -743,7 +751,10 @@ __asm__(
- "addl %6,%0 \n\t" \
- "adcl %7,%1 \n\t" \
- "adcl %8,%2 \n\t" \
-- :"=r"(c0), "=r"(c1), "=r"(c2) : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), "r"(sc2) : "cc");
-+ :"=r"(c0), "=r"(c1), "=r"(c2) \
-+ : "0"(c0), "1"(c1), "2"(c2), "r"(sc0), "r"(sc1), \
-+ "r"(sc2) \
-+ : "cc");
-
- #elif defined(TFM_X86_64)
- /* x86-64 optimized */
---- a/wolfcrypt/src/sp_int.c
-+++ b/wolfcrypt/src/sp_int.c
-@@ -476,7 +476,7 @@ static WC_INLINE sp_int_digit sp_div_wor
- "addl %%eax, %[l] \n\t" \
- "adcl %%edx, %[h] \n\t" \
- "adcl $0 , %[o] \n\t" \
-- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \
-+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \
- : [a] "r" (va), [b] "r" (vb) \
- : "eax", "edx", "cc" \
- )
-@@ -502,7 +502,7 @@ static WC_INLINE sp_int_digit sp_div_wor
- "addl %%eax, %[l] \n\t" \
- "adcl %%edx, %[h] \n\t" \
- "adcl $0 , %[o] \n\t" \
-- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \
-+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \
- : [a] "r" (va), [b] "r" (vb) \
- : "eax", "edx", "cc" \
- )
-@@ -541,7 +541,7 @@ static WC_INLINE sp_int_digit sp_div_wor
- "addl %%eax, %[l] \n\t" \
- "adcl %%edx, %[h] \n\t" \
- "adcl $0 , %[o] \n\t" \
-- : [l] "+r" (vl), [h] "+r" (vh), [o] "+r" (vo) \
-+ : [l] "+rm" (vl), [h] "+rm" (vh), [o] "+rm" (vo) \
- : [a] "m" (va) \
- : "eax", "edx", "cc" \
- )