uencrypt: add support for mbedtls

This commit includes some additional changes:
 - better handling of iv and keys in openssl/wolfssl variants
 - fix compiler warnings and whitespace
 - build all 3 variants as separate packages
 - adjust the new package name in targets' DEVICE_PACKAGES
 - remove PKG_FLAGS:=nonshared

[Beeline SmartBox Flash - OK]
Tested-by: Mikhail Zhilkin <csharper2005@gmail.com>
[after test: replaced a hardcoded IV size of 16 by cipher_info->iv_size]
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
Eneas U de Queiroz
2023-02-17 08:12:40 -03:00
parent 6ac6f2402d
commit 4662adef2a
6 changed files with 314 additions and 57 deletions

View File

@@ -379,7 +379,7 @@ define Device/beeline_smartbox-flash
IMAGES += factory.trx
IMAGE/factory.trx := append-kernel | append-ubi | check-size
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware uencrypt
DEVICE_PACKAGES := kmod-usb3 kmod-mt7615-firmware uencrypt-mbedtls
endef
TARGET_DEVICES += beeline_smartbox-flash
@@ -1587,7 +1587,7 @@ define Device/mts_wg430223
IMAGES += factory.trx
IMAGE/factory.trx := append-kernel | append-ubi | check-size
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_PACKAGES := kmod-mt7615-firmware uencrypt
DEVICE_PACKAGES := kmod-mt7615-firmware uencrypt-mbedtls
endef
TARGET_DEVICES += mts_wg430223