Fixes for Zephyr OS

time is not available.
Must include clock module
kdf.c missing from file list
pull/4514/head
Sean Parkinson 2021-10-28 15:57:46 +10:00
parent 7baffd9cf1
commit 623a84ed7b
7 changed files with 10 additions and 15 deletions

View File

@ -1358,15 +1358,10 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
#include <sys/time.h>
#endif
typedef signed int time_t;
time_t z_time(time_t *timer);
#define XTIME(tl) z_time((tl))
#define XGMTIME(c, t) gmtime((c))
#define WOLFSSL_GMTIME
#define USE_WOLF_TM
#elif defined(WOLFSSL_TELIT_M2MB)
typedef long time_t;

View File

@ -58,6 +58,7 @@ if(CONFIG_WOLFSSL)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/hmac.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/idea.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/integer.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/kdf.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/logging.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/md2.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/md4.c)

View File

@ -2,6 +2,9 @@
CONFIG_MAIN_STACK_SIZE=32768
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=16384
# Clock for time()
CONFIG_POSIX_CLOCK=y
# TLS configuration
CONFIG_WOLFSSL=y
CONFIG_WOLFSSL_BUILTIN=y

View File

@ -7,6 +7,9 @@ CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=8192
# General config
CONFIG_NEWLIB_LIBC=y
# Clock for time()
CONFIG_POSIX_CLOCK=y
# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y

View File

@ -4,6 +4,9 @@ CONFIG_ENTROPY_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=8192
# Clock for time()
CONFIG_POSIX_CLOCK=y
# Networking
CONFIG_NETWORKING=y
CONFIG_NET_TEST=y

View File

@ -129,11 +129,6 @@ extern "C" {
#undef NO_DES3
#define NO_DES3
#if 1
#undef NO_ASN_TIME
#define NO_ASN_TIME
#endif
#undef WOLFSSL_STATIC_MEMORY
#define WOLFSSL_STATIC_MEMORY

View File

@ -134,11 +134,6 @@ extern "C" {
#undef NO_DES3
#define NO_DES3
#if 1
#undef NO_ASN_TIME
#define NO_ASN_TIME
#endif
#undef WOLFSSL_STATIC_MEMORY
#define WOLFSSL_STATIC_MEMORY