From: RISCi_ATOM Date: Sun, 17 Sep 2023 15:17:58 +0000 (-0400) Subject: wolfssl : Bump to 5.6.3 X-Git-Tag: v1.5.14~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bde078477c4b6c0b66642dd52d663fff6b7fc483;p=librecmc%2Flibrecmc.git wolfssl : Bump to 5.6.3 Wolfssl is now the default in luci --- diff --git a/package/libs/wolfssl/Config.in b/package/libs/wolfssl/Config.in index 025362ff6f..8b16bf0b01 100644 --- a/package/libs/wolfssl/Config.in +++ b/package/libs/wolfssl/Config.in @@ -85,7 +85,7 @@ choice bool "AF_ALG" config WOLFSSL_HAS_DEVCRYPTO_CBC - bool "/dev/crytpo - AES-CBC-only" + bool "/dev/crypto - AES-CBC-only" select WOLFSSL_HAS_DEVCRYPTO config WOLFSSL_HAS_DEVCRYPTO_AES diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index 2c2226405d..113bf63f93 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl -PKG_VERSION:=5.5.4-stable +PKG_VERSION:=5.6.3-stable PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) -PKG_HASH:=b7ee150e49def77c765bc02aac92ddeb0bebefd4cb12aa263d8f95e405221fb8 +PKG_HASH:=2e74a397fa797c2902d7467d500de904907666afb4ff80f6464f6efd5afb114a PKG_FIXUP:=libtool PKG_INSTALL:=1 @@ -79,6 +79,7 @@ TARGET_LDFLAGS += -flto # --enable-stunnel needed for OpenSSL API compatibility bits CONFIGURE_ARGS += \ --enable-reproducible-build \ + --enable-lighty \ --enable-opensslall \ --enable-opensslextra \ --enable-sni \ @@ -99,6 +100,7 @@ CONFIGURE_ARGS += \ --$(if $(CONFIG_WOLFSSL_HAS_DTLS),enable,disable)-dtls \ --$(if $(CONFIG_WOLFSSL_HAS_ECC25519),enable,disable)-curve25519 \ --$(if $(CONFIG_WOLFSSL_HAS_AFALG),enable,disable)-afalg \ + --$(if $(CONFIG_WOLFSSL_HAS_OPENVPN),enable,disable)-openvpn \ --enable-devcrypto=$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC),cbc\ ,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES),aes\ ,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL),yes,no))) diff --git a/package/libs/wolfssl/patches/001-fix-detection-of-cut-tool-in-configure.ac.patch b/package/libs/wolfssl/patches/001-fix-detection-of-cut-tool-in-configure.ac.patch new file mode 100644 index 0000000000..0d0c8b5423 --- /dev/null +++ b/package/libs/wolfssl/patches/001-fix-detection-of-cut-tool-in-configure.ac.patch @@ -0,0 +1,25 @@ +From 41d248461bd9ad44193a4806ecb5361513e8944e Mon Sep 17 00:00:00 2001 +From: jordan +Date: Tue, 27 Jun 2023 13:18:25 -0500 +Subject: [PATCH] fix detection of cut tool in configure.ac + +--- + configure.ac | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -8723,10 +8723,11 @@ echo "extern \"C\" {" >> $OPTION_FILE + echo "#endif" >> $OPTION_FILE + echo "" >> $OPTION_FILE + +-# check for supported command to trim option with ++# Check for supported command to trim option with. ++# note: cut requires an argument to exit with success. + if colrm >/dev/null 2>&1 /dev/null 2>&1 /dev/null 2>&1 256) { + fprintf(stderr, "error: CN is too long: %s\n", val); + return 1; + } + + newCert.altNames[0] = 0x30; //Sequence with one element + newCert.altNames[1] = strlen(val) + 2; // Length of entire sequence + newCert.altNames[2] = 0x82; //8 - String, 2 - DNS Name + newCert.altNames[3] = strlen(val); //DNS Name length + memcpy(newCert.altNames + 4, val, strlen(val)); //DNS Name + newCert.altNamesSz = strlen(val) + 4; +#endif + } else if (!strcmp(key, "EMAIL")) strncpy(newCert.subject.email, val, CTC_NAME_SIZE); else @@ -216,6 +231,9 @@ int selfsigned(WC_RNG *rng, char **arg) { } newCert.daysValid = days; + newCert.keyUsage = KEYUSE_DIGITAL_SIG | KEYUSE_CONTENT_COMMIT | KEYUSE_KEY_ENCIPHER; + newCert.extKeyUsage = EXTKEYUSE_SERVER_AUTH; + gen_key(rng, &ecKey, &rsaKey, type, keySz, exp, curve); write_key(&ecKey, &rsaKey, type, keySz, keypath, pem); @@ -232,8 +250,10 @@ int selfsigned(WC_RNG *rng, char **arg) { subject, fstr, tstr); if (type == EC_KEY_TYPE) { + newCert.sigType = CTC_SHA256wECDSA; ret = wc_MakeCert(&newCert, derBuf, sizeof(derBuf), NULL, &ecKey, rng); } else { + newCert.sigType = CTC_SHA256wRSA; ret = wc_MakeCert(&newCert, derBuf, sizeof(derBuf), &rsaKey, NULL, rng); } if (ret <= 0) { @@ -242,11 +262,9 @@ int selfsigned(WC_RNG *rng, char **arg) { } if (type == EC_KEY_TYPE) { - newCert.sigType = CTC_SHA256wECDSA; ret = wc_SignCert(newCert.bodySz, newCert.sigType, derBuf, sizeof(derBuf), NULL, &ecKey, rng); } else { - newCert.sigType = CTC_SHA256wRSA; ret = wc_SignCert(newCert.bodySz, newCert.sigType, derBuf, sizeof(derBuf), &rsaKey, NULL, rng); }