aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/uencrypt/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/uencrypt/Makefile')
-rw-r--r--package/utils/uencrypt/Makefile77
1 files changed, 51 insertions, 26 deletions
diff --git a/package/utils/uencrypt/Makefile b/package/utils/uencrypt/Makefile
index a9779e2825..21d2d96f4d 100644
--- a/package/utils/uencrypt/Makefile
+++ b/package/utils/uencrypt/Makefile
@@ -4,55 +4,80 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uencrypt
-PKG_RELEASE:=3
+PKG_RELEASE:=4
-PKG_FLAGS:=nonshared
PKG_LICENSE:=GPL-2.0-or-later
PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
-PKG_CONFIG_DEPENDS:=\
- CONFIG_UENCRYPT_OPENSSL \
- CONFIG_UENCRYPT_WOLFSSL
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_INSTALL:=1
-CMAKE_OPTIONS+=$(if $(CONFIG_UENCRYPT_WOLFSSL),-DUSE_WOLFSSL=1)
+ifeq ($(BUILD_VARIANT),mbedtls)
+ CMAKE_OPTIONS+=-DUSE_MBEDTLS=1
+else ifeq ($(BUILD_VARIANT),wolfssl)
+ CMAKE_OPTIONS+=-DUSE_WOLFSSL=1
+endif
-define Package/uencrypt
+define Package/uencrypt/default
SECTION:=utils
CATEGORY:=Base system
- TITLE:=Decryption utility for Arcadyan WG4xx223 and TP-Link Deco S4
- DEPENDS:=+UENCRYPT_WOLFSSL:libwolfssl +UENCRYPT_OPENSSL:libopenssl
+ TITLE:=Small Decryption utility
endef
-define Package/uencrypt/description
+define Package/uencrypt/default/description
This is a small encrypton/decryption program. It defaults
to AES-128-CBC, but supports any encryption provided by
- the available openssl/wolfssl library. Even though it can
- be used for regular encryption and decryption operations,
+ the crypto library. Even though it can be used for
+ non-critical* regular encryption and decryption operations,
it is included here to unencrypt the configuration from mtd
- on Arcadyan WG430223/WG443223 and TP-Link Deco S4 routers
+ on some devices.
+
+ * Key and IV are exposed on cmdline
+
+ This variant uses $(1) as crypto provider
endef
-define Package/uencrypt/config
- if PACKAGE_uencrypt
- choice
- prompt "Crypto provider"
- default UENCRYPT_WOLFSSL
+define Package/uencrypt-mbedtls
+ $(Package/uencrypt/default)
+ VARIANT:=mbedtls
+ TITLE+= using mbedTLS
+ DEPENDS:=+libmbedtls
+ CONFLICTS:=uencrypt-openssl uencrypt-wolfssl
+endef
- config UENCRYPT_OPENSSL
- bool "OpenSSL"
+Package/uencrypt-mbedtls/description= \
+ $(call Package/uencrypt/default/description,mbedTLS)
- config UENCRYPT_WOLFSSL
- bool "wolfSSL"
- endchoice
- endif
+define Package/uencrypt-openssl
+ $(Package/uencrypt/default)
+ VARIANT:=openssl
+ TITLE+= using OpenSSL
+ DEPENDS:=+libopenssl
+ CONFLICTS:=uencrypt-wolfssl
endef
-define Package/uencrypt/install
+Package/uencrypt-openssl/description= \
+ $(call Package/uencrypt/default/description,OpenSSL)
+
+define Package/uencrypt-wolfssl
+ $(Package/uencrypt/default)
+ VARIANT:=wolfssl
+ TITLE+= using wolfSSL
+ DEPENDS:=+libwolfssl
+endef
+
+Package/uencrypt-wolfssl/description= \
+ $(call Package/uencrypt/default/description,wolfSSL)
+
+define Package/uencrypt/default/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uencrypt $(1)/usr/bin
endef
+Package/uencrypt-openssl/install = $(Package/uencrypt/default/install)
+Package/uencrypt-wolfssl/install = $(Package/uencrypt/default/install)
+Package/uencrypt-mbedtls/install = $(Package/uencrypt/default/install)
-$(eval $(call BuildPackage,uencrypt))
+$(eval $(call BuildPackage,uencrypt-mbedtls))
+$(eval $(call BuildPackage,uencrypt-openssl))
+$(eval $(call BuildPackage,uencrypt-wolfssl))