Skip to content

Commit

Permalink
wolfssl: build with WOLFSSL_ALT_CERT_CHAINS
Browse files Browse the repository at this point in the history
"Alternate certification chains, as oppossed to requiring full chain
validataion. Certificate validation behavior is relaxed, similar to
openssl and browsers. Only the peer certificate must validate to a trusted
certificate. Without this, all certificates sent by a peer must be
used in the trust chain or the connection will be rejected."

This fixes e.g. uclient-fetch and curl connecting to servers using a Let's
Encrypt certificate which are cross-signed by the now expired
DST Root CA X3, see [0].

This is the recommended solution from upstream [1].

The binary size increases by ~12.3kb:
1236160 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f
1248704 staging_dir/target-mipsel_24kc_musl/usr/lib/libwolfssl.so.4.8.1.39c36f2f

[0] openwrt/packages#16674
[1] wolfSSL/wolfssl#4443 (comment)

Signed-off-by: Andre Heider <a.heider@gmail.com>
[bump PKG_RELEASE]
Signed-off-by: David Bauer <mail@david-bauer.net>
  • Loading branch information
dhewg authored and blocktrron committed Oct 17, 2021
1 parent a1ac872 commit 28d8e6a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions package/libs/wolfssl/Makefile
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=wolfssl
PKG_VERSION:=4.8.1-stable
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
Expand Down Expand Up @@ -59,7 +59,13 @@ define Package/libwolfssl/config
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 \
-DWOLFSSL_ALT_CERT_CHAINS

TARGET_LDFLAGS += -flto

# --enable-stunnel needed for OpenSSL API compatibility bits
Expand Down

0 comments on commit 28d8e6a

Please sign in to comment.