Hi!
I'm building my own openWrt 22.03 firmware.
Currently testing on gl.inet s1300.
I'm having problems with libarchive, a dependency of a custom software for file compression using encryption "zip:encrypt=aes256". I'm building libarchive as default
CONFIG_PACKAGE_libarchive=y
# CONFIG_PACKAGE_libarchive-noopenssl is not set
But when I want to create encryped zipFile with the following code:
if (ARCHIVE_OK != archive_write_set_options(a, "zip:encryption=aes256"))
{
fprintf(stderr,"Error Creating zipfile: %s\r\n", archive_error_string(a));
archive_write_free(a);
return Z_ERRNO;
}
I'm getting the following response on CLI:
Error Creating zipfile: encryption not supported
Even if I try to use bsdtar to create a encrypted zip file, I'm getting the same results:
# bsdtar --options zip:encryption=aes256 -acf encrypted.zip a_file
bsdtar: encryption not supported
I know it's not a CPU missing feature, because I use AES256 for encryption/decryption in other pieces of code, anyway, the CPU does not support AES:
# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 67.03
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 67.03
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 2
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 67.03
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 3
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 67.03
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : Generic DT based system
Revision : 0000
Serial : 0000000000000000
My software is built linking against openssl, crypto & libarchive
${_COMPILER} ../utils/demo.c \
-I$INC_PATH \
${ENDIANESS} \
-DWITH_SHA256 \
${MULTI} \
${DEBUG} \
${LICENSE} \
-DSYNC \
-L$LIB_PATH \
-Wl,-rpath-link=$LIB_PATH -Os -fdata-sections -ffunction-sections \
-lcurl -lssl -lcrypto -lz -larchive -ljson-c -lpthread -ldl -lm -o output/${_DST_DIR}/demo
So where's the missing thing?
Should I enable some kernel module to enable encryption?
Should I build libarchive with some extra parameter?
Am I missing something from linking my program?
Thanks for your help!