diff options
author | Eneas U de Queiroz <cotequeiroz@gmail.com> | 2022-07-08 11:08:21 -0300 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2022-07-19 14:53:29 +0200 |
commit | bc43ad88ed18722c0621fd6dfef0ff68268f4e14 (patch) | |
tree | 2a6111c0a49c83f4eb30ba1c8144dff1012fc406 /package/utils/uencrypt/Makefile | |
parent | 0f068e7c4a83bcbf20c4e52a5f8a3f1fe2af2246 (diff) | |
download | upstream-bc43ad88ed18722c0621fd6dfef0ff68268f4e14.tar.gz upstream-bc43ad88ed18722c0621fd6dfef0ff68268f4e14.tar.bz2 upstream-bc43ad88ed18722c0621fd6dfef0ff68268f4e14.zip |
uencrypt: add package to decrypt WG4хх223 config
This adds a simple AES-128-CBC encryption/decryption program using
either wolfSSL or OpenSSL as backend to decrypt Arcadyan WG4xx223
configuration partitions. The ipk size is 3,355 bytes.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Diffstat (limited to 'package/utils/uencrypt/Makefile')
-rw-r--r-- | package/utils/uencrypt/Makefile | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/package/utils/uencrypt/Makefile b/package/utils/uencrypt/Makefile new file mode 100644 index 0000000000..77fdf64e0e --- /dev/null +++ b/package/utils/uencrypt/Makefile @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2022 Eneas Ulir de Queiroz + +include $(TOPDIR)/rules.mk + +PKG_NAME:=uencrypt +PKG_RELEASE:=1 + +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) + +define Package/uencrypt + SECTION:=utils + CATEGORY:=Base system + TITLE:=Decryption utility for Arcadyan WG4xx223 + DEPENDS:=@TARGET_ramips_mt7621 +UENCRYPT_WOLFSSL:libwolfssl +UENCRYPT_OPENSSL:libopenssl +endef + +define Package/uencrypt/description + This is a small AES-128-CBC encrypton/decryption program. + Even though it can be used for regular encryption and + decryption operations using AES-128-CBC, it is included + here to unencrypt the configuration from mtd on Arcadyan + WG430223 and WG443223 routers. +endef + +define Package/uencrypt/config + if PACKAGE_uencrypt + choice + prompt "Crypto provider" + default UENCRYPT_WOLFSSL + + config UENCRYPT_OPENSSL + bool "OpenSSL" + + config UENCRYPT_WOLFSSL + bool "wolfSSL" + endchoice + endif +endef + +define Package/uencrypt/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uencrypt $(1)/usr/bin +endef + +$(eval $(call BuildPackage,uencrypt)) |