From dfb14b51a2e327368c167978e7833ce01a6585d0 Mon Sep 17 00:00:00 2001 From: RISCi_ATOM Date: Thu, 31 Dec 2020 09:46:19 -0500 Subject: [PATCH] hostapd: add wpad-basic-wolfssl variant Add package which provides size optimized wpad with support for just WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w. --- package/network/services/hostapd/Config.in | 3 + package/network/services/hostapd/Makefile | 105 +++++++++++++-------- 2 files changed, 67 insertions(+), 41 deletions(-) diff --git a/package/network/services/hostapd/Config.in b/package/network/services/hostapd/Config.in index 9dfa44e313..db73295a9f 100644 --- a/package/network/services/hostapd/Config.in +++ b/package/network/services/hostapd/Config.in @@ -13,6 +13,7 @@ config WPA_RFKILL_SUPPORT PACKAGE_wpad-openssl || \ PACKAGE_wpad-wolfssl || \ PACKAGE_wpad-basic || \ + PACKAGE_wpad-basic-wolfssl || \ PACKAGE_wpad-mini || \ PACKAGE_wpad-mesh-openssl || \ PACKAGE_wpad-mesh-wolfssl @@ -32,6 +33,7 @@ config WPA_MSG_MIN_PRIORITY PACKAGE_wpad-openssl || \ PACKAGE_wpad-wolfssl || \ PACKAGE_wpad-basic || \ + PACKAGE_wpad-basic-wolfssl || \ PACKAGE_wpad-mini || \ PACKAGE_wpad-mesh-openssl || \ PACKAGE_wpad-mesh-wolfssl @@ -49,6 +51,7 @@ config WPA_WOLFSSL bool default PACKAGE_wpa-supplicant-wolfssl ||\ PACKAGE_wpad-wolfssl ||\ + PACKAGE_wpad-basic-wolfssl || \ PACKAGE_wpad-mesh-wolfssl ||\ PACKAGE_eapol-test-wolfssl select WOLFSSL_HAS_AES_CCM diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 35ce85b3be..8e4effb492 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -90,29 +90,31 @@ ifneq ($(LOCAL_VARIANT),mini) DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT) endif -ifeq ($(LOCAL_VARIANT),full) - ifeq ($(SSL_VARIANT),openssl) - DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y - TARGET_LDFLAGS += -lcrypto -lssl +ifeq ($(SSL_VARIANT),openssl) + DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y + TARGET_LDFLAGS += -lcrypto -lssl + + ifeq ($(LOCAL_VARIANT),mesh) + DRIVER_MAKEOPTS += CONFIG_AP=y CONFIG_MESH=y endif - ifeq ($(SSL_VARIANT),wolfssl) - DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_WPS_NFC=1 CONFIG_SAE=y CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y - TARGET_LDFLAGS += -lwolfssl + ifeq ($(LOCAL_VARIANT),full) + DRIVER_MAKEOPTS += CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y endif endif -ifneq ($(LOCAL_TYPE),hostapd) +ifeq ($(SSL_VARIANT),wolfssl) + DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_SAE=y + TARGET_LDFLAGS += -lwolfssl + ifeq ($(LOCAL_VARIANT),mesh) - ifeq ($(SSL_VARIANT),openssl) - DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_AP=y CONFIG_SAE=y CONFIG_MESH=y - TARGET_LDFLAGS += -lcrypto -lssl - endif - ifeq ($(SSL_VARIANT),wolfssl) - DRIVER_MAKEOPTS += CONFIG_TLS=wolfssl CONFIG_WPS_NFC=1 CONFIG_AP=y CONFIG_SAE=y CONFIG_MESH=y - TARGET_LDFLAGS += -lwolfssl - endif + DRIVER_MAKEOPTS += CONFIG_AP=y CONFIG_MESH=y CONFIG_WPS_NFC=1 endif + ifeq ($(LOCAL_VARIANT),full) + DRIVER_MAKEOPTS += CONFIG_OWE=y CONFIG_SUITEB192=y CONFIG_AP=y CONFIG_MESH=y CONFIG_WPS_NFC=1 + endif +endif +ifneq ($(LOCAL_TYPE),hostapd) ifdef CONFIG_WPA_RFKILL_SUPPORT DRIVER_MAKEOPTS += NEED_RFKILL=y endif @@ -139,7 +141,7 @@ endef define Package/hostapd $(call Package/hostapd/Default,$(1)) - TITLE+= (full) + TITLE+= (built-in full) VARIANT:=full-internal endef @@ -150,7 +152,7 @@ endef define Package/hostapd-openssl $(call Package/hostapd/Default,$(1)) - TITLE+= (full) + TITLE+= (OpenSSL full) VARIANT:=full-openssl DEPENDS+=+libopenssl endef @@ -159,7 +161,7 @@ Package/hostapd-openssl/description = $(Package/hostapd/description) define Package/hostapd-wolfssl $(call Package/hostapd/Default,$(1)) - TITLE+= (full) + TITLE+= (wolfSSL full) VARIANT:=full-wolfssl DEPENDS+=+libwolfssl endef @@ -168,7 +170,7 @@ Package/hostapd-wolfssl/description = $(Package/hostapd/description) define Package/hostapd-basic $(call Package/hostapd/Default,$(1)) - TITLE+= (WPA-PSK, 11r and 11w) + TITLE+= (WPA-PSK, 11r, 11w) VARIANT:=basic endef @@ -190,7 +192,7 @@ endef define Package/wpad/Default SECTION:=net CATEGORY:=Network - TITLE:=IEEE 802.1x Authenticator/Supplicant + TITLE:=IEEE 802.1x Auth/Supplicant DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus URL:=http://hostap.epitest.fi/ PROVIDES:=hostapd wpa-supplicant @@ -201,7 +203,7 @@ endef define Package/wpad $(call Package/wpad/Default,$(1)) - TITLE+= (full) + TITLE+= (built-in full) VARIANT:=wpad-full-internal endef @@ -212,7 +214,7 @@ endef define Package/wpad-openssl $(call Package/wpad/Default,$(1)) - TITLE+= (full) + TITLE+= (OpenSSL full) VARIANT:=wpad-full-openssl DEPENDS+=+libopenssl endef @@ -221,7 +223,7 @@ Package/wpad-openssl/description = $(Package/wpad/description) define Package/wpad-wolfssl $(call Package/wpad/Default,$(1)) - TITLE+= (full) + TITLE+= (wolfSSL full) VARIANT:=wpad-full-wolfssl DEPENDS+=+libwolfssl endef @@ -230,7 +232,7 @@ Package/wpad-wolfssl/description = $(Package/wpad/description) define Package/wpad-basic $(call Package/wpad/Default,$(1)) - TITLE+= (WPA-PSK, 11r and 11w) + TITLE+= (WPA-PSK, 11r, 11w) VARIANT:=wpad-basic endef @@ -238,6 +240,17 @@ define Package/wpad-basic/description This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, 802.11r and 802.11w support. endef +define Package/wpad-basic-wolfssl +$(call Package/wpad/Default,$(1)) + TITLE+= (wolfSSL, 11r, 11w) + VARIANT:=wpad-basic-wolfssl + DEPENDS+=+libwolfssl +endef + +define Package/wpad-basic-wolfssl/description + This package contains a basic IEEE 802.1x/WPA Authenticator and Supplicant with WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w support. +endef + define Package/wpad-mini $(call Package/wpad/Default,$(1)) TITLE+= (WPA-PSK only) @@ -250,7 +263,6 @@ endef define Package/wpad-mesh $(call Package/wpad/Default,$(1)) - TITLE+= (with 802.11s mesh and SAE support) DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) PROVIDES+=wpa-supplicant-mesh wpad-mesh endef @@ -261,6 +273,7 @@ endef define Package/wpad-mesh-openssl $(call Package/wpad-mesh,$(1)) + TITLE+= (OpenSSL, 11s, SAE) DEPENDS+=+libopenssl VARIANT:=wpad-mesh-openssl endef @@ -269,6 +282,7 @@ Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description) define Package/wpad-mesh-wolfssl $(call Package/wpad-mesh,$(1)) + TITLE+= (wolfSSL, 11s, SAE) DEPENDS+=+libwolfssl VARIANT:=wpad-mesh-wolfssl endef @@ -289,17 +303,20 @@ endef define Package/wpa-supplicant $(call Package/wpa-supplicant/Default,$(1)) + TITLE+= (built-in full) VARIANT:=supplicant-full-internal endef define Package/wpa-supplicant-openssl $(call Package/wpa-supplicant/Default,$(1)) + TITLE+= (OpenSSL full) VARIANT:=supplicant-full-openssl DEPENDS+=+libopenssl endef define Package/wpa-supplicant-wolfssl $(call Package/wpa-supplicant/Default,$(1)) + TITLE+= (wolfSSL full) VARIANT:=supplicant-full-wolfssl DEPENDS+=+libwolfssl endef @@ -310,39 +327,40 @@ endef define Package/wpa-supplicant-p2p $(call Package/wpa-supplicant/Default,$(1)) - TITLE+= (with Wi-Fi P2P support) + TITLE+= (Wi-Fi P2P support) DEPENDS+=@PACKAGE_kmod-cfg80211 VARIANT:=supplicant-p2p-internal endef define Package/wpa-supplicant-mesh/Default $(call Package/wpa-supplicant/Default,$(1)) - TITLE+= (with 802.11s and SAE) DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) PROVIDES+=wpa-supplicant-mesh endef define Package/wpa-supplicant-mesh-openssl $(call Package/wpa-supplicant-mesh/Default,$(1)) + TITLE+= (OpenSSL, 11s, SAE) VARIANT:=supplicant-mesh-openssl DEPENDS+=+libopenssl endef define Package/wpa-supplicant-mesh-wolfssl $(call Package/wpa-supplicant-mesh/Default,$(1)) + TITLE+= (wolfSSL, 11s, SAE) VARIANT:=supplicant-mesh-wolfssl DEPENDS+=+libwolfssl endef define Package/wpa-supplicant-basic $(call Package/wpa-supplicant/Default,$(1)) - TITLE+= (with 11r and 11w) + TITLE+= (11r, 11w) VARIANT:=supplicant-basic endef define Package/wpa-supplicant-mini $(call Package/wpa-supplicant/Default,$(1)) - TITLE+= (minimal version) + TITLE+= (minimal) VARIANT:=supplicant-mini endef @@ -373,31 +391,34 @@ define Package/wpa-cli TITLE:=WPA Supplicant command line control utility endef -define Package/eapol-test - TITLE:=802.1x authentication test utility +define Package/eapol-test/Default + TITLE:=802.1x auth test utility SECTION:=net CATEGORY:=Network - VARIANT:=supplicant-full-internal DEPENDS:=$(DRV_DEPENDS) +libubus endef +define Package/eapol-test + $(call Package/eapol-test/Default,$(1)) + TITLE+= (built-in full) + VARIANT:=supplicant-full-internal +endef + define Package/eapol-test-openssl - TITLE:=802.1x authentication test utility - SECTION:=net - CATEGORY:=Network + $(call Package/eapol-test/Default,$(1)) + TITLE+= (OpenSSL full) VARIANT:=supplicant-full-openssl CONFLICTS:=$(filter-out eapol-test-openssl ,$(EAPOL_TEST_PROVIDERS)) - DEPENDS:=$(DRV_DEPENDS) +libubus +libopenssl + DEPENDS+=+libopenssl PROVIDES:=eapol-test endef define Package/eapol-test-wolfssl - TITLE:=802.1x authentication test utility - SECTION:=net - CATEGORY:=Network + $(call Package/eapol-test/Default,$(1)) + TITLE+= (wolfSSL full) VARIANT:=supplicant-full-wolfssl CONFLICTS:=$(filter-out eapol-test-openssl ,$(filter-out eapol-test-wolfssl ,$(EAPOL_TEST_PROVIDERS))) - DEPENDS:=$(DRV_DEPENDS) +libubus +libwolfssl + DEPENDS+=+libwolfssl PROVIDES:=eapol-test endef @@ -545,6 +566,7 @@ define Package/wpad/install $(LN) wpad $(1)/usr/sbin/wpa_supplicant endef Package/wpad-basic/install = $(Package/wpad/install) +Package/wpad-basic-wolfssl/install = $(Package/wpad/install) Package/wpad-mini/install = $(Package/wpad/install) Package/wpad-openssl/install = $(Package/wpad/install) Package/wpad-wolfssl/install = $(Package/wpad/install) @@ -600,6 +622,7 @@ $(eval $(call BuildPackage,wpad)) $(eval $(call BuildPackage,wpad-mesh-openssl)) $(eval $(call BuildPackage,wpad-mesh-wolfssl)) $(eval $(call BuildPackage,wpad-basic)) +$(eval $(call BuildPackage,wpad-basic-wolfssl)) $(eval $(call BuildPackage,wpad-mini)) $(eval $(call BuildPackage,wpad-openssl)) $(eval $(call BuildPackage,wpad-wolfssl)) -- 2.25.1