if !defined(unix) && !defined(__unix) && !defined(__unix__) && \
!defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
!defined(__HAIKU__) && !defined(__midipix__)
error
"Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in mbedtls_config.h"
nuttx/libs/libxx/libcxx/include/__config
nuttx/libs/libxx/libcxx/include/limits.h:40,
apps/crypto/mbedtls/mbedtls/include/mbedtls/check_config.h:31,
apps/crypto/mbedtls/mbedtls/include/mbedtls/build_info.h:151,
apps/crypto/mbedtls/mbedtls/library/common.h:26,
apps/crypto/mbedtls/mbedtls/library/entropy_poll.c:25
if defined(__NuttX__)
undef __linux__
undef __APPLE__
undef __FreeBSD__
undef __GLIBC__
undef __NetBSD__
undef _WIN32
undef __sun__
undef _AIX
/ For the current use of the __unix__ macro in this library,
/ NuttX is not __unix__.
/ This might need to be revisited in future.
undef __unix__
endif
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
mbedtls/library/alignment.h:98:5: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=]
98 | memcpy(p, &x, sizeof(x));
| ^~~~~~~~~~~~~~~~~~~~~~~~
mbedtls/library/cmac.c: In function 'mbedtls_cipher_cmac_finish':
mbedtls/library/cmac.c:288:19: note: at offset 20 into destination object 'M_last' of size 16
288 | unsigned char M_last[MBEDTLS_CIPHER_BLKSIZE_MAX];
| ^~~~~~
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
The configuration of Kconfig used by the nuttx before is not consistent with the mbedtls default configuration. This patch update configuration is consistent with the default configuration.
Signed-off-by: makejian <makejian@xiaomi.com>
Build break on Assemble compiler if -fno-omit-frame-pointer and -O3 enabled at same time
{standard input}: Assembler messages:
{standard input}:2560: Error: branch out of range
make[2]: *** [apps/Application.mk:170: mbedtls/library/sha256.o] Error 1
Signed-off-by: chao an <anchao@xiaomi.com>
application may use micro-ecc for some ecc operation, which may be
faster than tinycrypt, due to assamble code, but both of them have
same function defination, cause build error on there case.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Update the test cases' source code to solve the conflict of test function name,like below:"/home/yangjiao/Vela_Project/vela_TinyCrypt/apps/crypto/tinycrypt/tinycrypt/tests/test_sha256.c:149: multiple definition of `test_5'; /home/yangjiao/Vela_Project/vela_TinyCrypt/nuttx/staging/libapps.a(test_hmac_prng.c.home.yangjiao.Vela_Project.vela_TinyCrypt.apps.crypto.tinycrypt.o):/home/yangjiao/Vela_Project/vela_TinyCrypt/apps/crypto/tinycrypt/tinycrypt/tests/test_hmac_prng.c:316: first defined here".
Signed-off-by: yangjiao <yangjiao@xiaomi.com>
(1)add dev_alt to manage /dev/crypto
(2)add sha_alt to alternate sha1 algorithm
(3)use new mbedtls_config.h to admin configs of mbedtls
Signed-off-by: makejian <makejian@xiaomi.com>
avoid git untracked
Untracked files:
(use "git add <file>..." to include in what will be committed)
crypto/tinycrypt/tinycrypt/
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>