Initial commit
This commit is contained in:
76
package/libs/wolfssl/Config.in
Normal file
76
package/libs/wolfssl/Config.in
Normal file
@@ -0,0 +1,76 @@
|
||||
if PACKAGE_libwolfssl
|
||||
|
||||
config WOLFSSL_HAS_AES_CCM
|
||||
bool "Include AES-CCM support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_CHACHA_POLY
|
||||
bool "Include ChaCha20-Poly1305 cipher suite support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_DH
|
||||
bool "Include DH (Diffie-Hellman) support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_ARC4
|
||||
bool "Include ARC4 support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_TLSV10
|
||||
bool "Include TLS 1.0 support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_TLSV13
|
||||
bool "Include TLS 1.3 support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_SESSION_TICKET
|
||||
bool "Include session ticket support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_DTLS
|
||||
bool "Include DTLS support"
|
||||
default n
|
||||
|
||||
config WOLFSSL_HAS_OCSP
|
||||
bool "Include OSCP stapling support"
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_WPAS
|
||||
bool "Include wpa_supplicant support"
|
||||
select WOLFSSL_HAS_ARC4
|
||||
select WOLFSSL_HAS_OCSP
|
||||
select WOLFSSL_HAS_SESSION_TICKET
|
||||
default y
|
||||
|
||||
config WOLFSSL_HAS_ECC25519
|
||||
bool "Include ECC Curve 22519 support"
|
||||
default n
|
||||
|
||||
config WOLFSSL_HAS_DEVCRYPTO
|
||||
bool
|
||||
|
||||
choice
|
||||
prompt "Hardware Acceleration"
|
||||
default WOLFSSL_HAS_NO_HW
|
||||
|
||||
config WOLFSSL_HAS_NO_HW
|
||||
bool "None"
|
||||
|
||||
config WOLFSSL_HAS_AFALG
|
||||
bool "AF_ALG"
|
||||
|
||||
config WOLFSSL_HAS_DEVCRYPTO_CBC
|
||||
bool "/dev/crytpo - AES-CBC-only"
|
||||
select WOLFSSL_HAS_DEVCRYPTO
|
||||
|
||||
config WOLFSSL_HAS_DEVCRYPTO_AES
|
||||
bool "/dev/crypto - AES-only (all supported modes)"
|
||||
select WOLFSSL_HAS_DEVCRYPTO
|
||||
|
||||
config WOLFSSL_HAS_DEVCRYPTO_FULL
|
||||
bool "/dev/crypto - full"
|
||||
select WOLFSSL_HAS_DEVCRYPTO
|
||||
endchoice
|
||||
|
||||
endif
|
||||
111
package/libs/wolfssl/Makefile
Normal file
111
package/libs/wolfssl/Makefile
Normal file
@@ -0,0 +1,111 @@
|
||||
#
|
||||
# Copyright (C) 2006-2017 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wolfssl
|
||||
PKG_VERSION:=4.7.0-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:=b0e740b31d4d877d540ad50cc539a8873fc41af02bd3091c4357b403f7106e31
|
||||
|
||||
PKG_FIXUP:=libtool
|
||||
PKG_INSTALL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSING COPYING
|
||||
PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
|
||||
PKG_CPE_ID:=cpe:/a:wolfssl:wolfssl
|
||||
|
||||
PKG_CONFIG_DEPENDS:=\
|
||||
CONFIG_WOLFSSL_HAS_AES_CCM CONFIG_WOLFSSL_HAS_AFALG \
|
||||
CONFIG_WOLFSSL_HAS_ARC4 CONFIG_WOLFSSL_HAS_CHACHA_POLY \
|
||||
CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL \
|
||||
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
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libwolfssl
|
||||
SECTION:=libs
|
||||
SUBMENU:=SSL
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=wolfSSL library
|
||||
URL:=http://www.wolfssl.com/
|
||||
MENU:=1
|
||||
PROVIDES:=libcyassl
|
||||
DEPENDS:=+WOLFSSL_HAS_DEVCRYPTO:kmod-cryptodev +WOLFSSL_HAS_AFALG:kmod-crypto-user
|
||||
ABI_VERSION:=24
|
||||
endef
|
||||
|
||||
define Package/libwolfssl/description
|
||||
wolfSSL (formerly CyaSSL) is an SSL library optimized for small
|
||||
footprint, both on disk and for memory use.
|
||||
endef
|
||||
|
||||
define Package/libwolfssl/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += $(FPIC) -DFP_MAX_BITS=8192 -fomit-frame-pointer
|
||||
|
||||
# --enable-stunnel needed for OpenSSL API compatibility bits
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-opensslextra \
|
||||
--enable-sni \
|
||||
--enable-stunnel \
|
||||
--disable-examples \
|
||||
--disable-jobserver \
|
||||
--$(if $(CONFIG_IPV6),enable,disable)-ipv6 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_AES_CCM),enable,disable)-aesccm \
|
||||
--$(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 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_ARC4),enable,disable)-arc4 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_TLSV10),enable,disable)-tlsv10 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_TLSV13),enable,disable)-tls13 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_SESSION_TICKET),enable,disable)-session-ticket \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_DTLS),enable,disable)-dtls \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_ECC25519),enable,disable)-curve25519 \
|
||||
--$(if $(CONFIG_WOLFSSL_HAS_AFALG),enable,disable)-afalg \
|
||||
--enable-devcrypto=$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_CBC),cbc\
|
||||
,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_AES),aes\
|
||||
,$(if $(CONFIG_WOLFSSL_HAS_DEVCRYPTO_FULL),yes,no)))
|
||||
|
||||
ifeq ($(CONFIG_WOLFSSL_HAS_OCSP),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-ocsp --enable-ocspstapling --enable-ocspstapling2
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WOLFSSL_HAS_WPAS),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-wpas --enable-sha512 --enable-fortress --enable-fastmath
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.{so*,la} $(1)/usr/lib/
|
||||
ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
|
||||
ln -s libwolfssl.la $(1)/usr/lib/libcyassl.la
|
||||
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/libwolfssl/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libwolfssl))
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/wolfssl/wolfcrypt/settings.h
|
||||
+++ b/wolfssl/wolfcrypt/settings.h
|
||||
@@ -2255,7 +2255,7 @@ extern void uITRON4_free(void *p) ;
|
||||
#endif
|
||||
|
||||
/* warning for not using harden build options (default with ./configure) */
|
||||
-#ifndef WC_NO_HARDEN
|
||||
+#if 0
|
||||
#if (defined(USE_FAST_MATH) && !defined(TFM_TIMING_RESISTANT)) || \
|
||||
(defined(HAVE_ECC) && !defined(ECC_TIMING_RESISTANT)) || \
|
||||
(!defined(NO_RSA) && !defined(WC_RSA_BLINDING) && !defined(HAVE_FIPS) && \
|
||||
Reference in New Issue
Block a user