Skip to content

Commit

Permalink
os_stub: mbedtlslib: allow skipping time checks
Browse files Browse the repository at this point in the history
This allows the user to compile libspdm with
-DCMAKE_C_FLAGS="-DMBEDTLS_SKIP_TIME_CHECK" for a target that does not
support the time()/gmtime() functions in time.h.

Signed-off-by: Wilfred Mallawa <[email protected]>
  • Loading branch information
twilfredo authored and jyao1 committed Jan 26, 2024
1 parent 9c8062b commit 214608a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions os_stub/mbedtlslib/include/mbedtls/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
*
* Comment if your system does not support time functions
*/
#ifndef MBEDTLS_SKIP_TIME_CHECK
#define MBEDTLS_HAVE_TIME
#endif

/**
* \def MBEDTLS_HAVE_TIME_DATE
Expand All @@ -161,7 +163,9 @@
* mbedtls_platform_gmtime_r() at compile-time by using the macro
* MBEDTLS_PLATFORM_GMTIME_R_ALT.
*/
#ifndef MBEDTLS_SKIP_TIME_CHECK
#define MBEDTLS_HAVE_TIME_DATE
#endif

/**
* \def MBEDTLS_PLATFORM_MEMORY
Expand Down

0 comments on commit 214608a

Please sign in to comment.