Split HAVE_TIME into HAVE_TIME + HAVE_TIME_DATE

First one means we have time() but it may not return the actual wall clock
time, second means it does.
This commit is contained in:
Manuel Pégourié-Gonnard 2015-06-18 20:52:58 +02:00
parent 6195767554
commit 60c793bdc9
4 changed files with 24 additions and 8 deletions

View file

@ -44,6 +44,10 @@
#error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang"
#endif
#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_HAVE_TIME)
#error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense"
#endif
#if defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_HAVE_ASM)
#error "MBEDTLS_AESNI_C defined, but not all prerequisites"
#endif

View file

@ -67,12 +67,26 @@
/**
* \def MBEDTLS_HAVE_TIME
*
* System has time.h and time() / localtime() / gettimeofday().
* System has time.h and time().
* The time does not need to be correct, only time differences are used,
* by contrast with MBEDTLS_HAVE_TIME_DATE
*
* Comment if your system does not support time functions
*/
#define MBEDTLS_HAVE_TIME
/**
* \def MBEDTLS_HAVE_TIME_DATE
*
* System has time.h and time(), gmtime() and the clock is correct.
* The time needs to be correct (not necesarily very accurate, but at least
* the date should be correct). This is used to verify the validity period of
* X.509 certificates.
*
* Comment if your system does not have a correct clock.
*/
#define MBEDTLS_HAVE_TIME_DATE
/**
* \def MBEDTLS_PLATFORM_MEMORY
*