diff --git a/wolfssl/wolfcrypt/wc_port.h b/wolfssl/wolfcrypt/wc_port.h index e8662d0cb..b371629dc 100644 --- a/wolfssl/wolfcrypt/wc_port.h +++ b/wolfssl/wolfcrypt/wc_port.h @@ -1358,15 +1358,10 @@ WOLFSSL_API int wolfCrypt_Cleanup(void); #include #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; diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index e84dfbe13..062c1fbb9 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -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) diff --git a/zephyr/samples/wolfssl_test/prj.conf b/zephyr/samples/wolfssl_test/prj.conf index 2b0980207..237e02e78 100644 --- a/zephyr/samples/wolfssl_test/prj.conf +++ b/zephyr/samples/wolfssl_test/prj.conf @@ -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 diff --git a/zephyr/samples/wolfssl_tls_sock/prj.conf b/zephyr/samples/wolfssl_tls_sock/prj.conf index ea7ded69d..f06afac26 100644 --- a/zephyr/samples/wolfssl_tls_sock/prj.conf +++ b/zephyr/samples/wolfssl_tls_sock/prj.conf @@ -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 diff --git a/zephyr/samples/wolfssl_tls_thread/prj.conf b/zephyr/samples/wolfssl_tls_thread/prj.conf index fe53d4867..d8fef5270 100644 --- a/zephyr/samples/wolfssl_tls_thread/prj.conf +++ b/zephyr/samples/wolfssl_tls_thread/prj.conf @@ -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 diff --git a/zephyr/user_settings-tls-generic.h b/zephyr/user_settings-tls-generic.h index 3ba179a2d..071970e23 100644 --- a/zephyr/user_settings-tls-generic.h +++ b/zephyr/user_settings-tls-generic.h @@ -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 diff --git a/zephyr/user_settings.h b/zephyr/user_settings.h index 2fe961bff..006f13ed1 100644 --- a/zephyr/user_settings.h +++ b/zephyr/user_settings.h @@ -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