Skip to content
Permalink
Browse files

ext: mbedtls: Enable easy integration with POSIX API

If CONFIG_POSIX_API is defined, automatically use time() function.
The alternative to that is to explicitly configure mbedTLS' timing
source via API, as required for "raw code", but if user enables
POSIX API, we as well might use existing mbedTLS integration.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
  • Loading branch information...
pfalcon authored and jukkar committed May 21, 2019
1 parent e4409d5 commit 1091b5b40d806882eaf60245a77cc222269e9a2a
Showing with 6 additions and 0 deletions.
  1. +6 −0 ext/lib/crypto/mbedtls/configs/config-tls-generic.h
@@ -23,6 +23,12 @@
#define MBEDTLS_HAVE_ASM
#endif

/* If we build with POSIX API, automatically use time(), etc. */
#if defined(CONFIG_POSIX_API)
#define MBEDTLS_HAVE_TIME
#define MBEDTLS_HAVE_TIME_DATE
#endif

#if defined(CONFIG_MBEDTLS_TEST)
#define MBEDTLS_SELF_TEST
#define MBEDTLS_DEBUG_C

0 comments on commit 1091b5b

Please sign in to comment.
You can’t perform that action at this time.