Document new macro and rename to: `NO_TIME_SIGNEDNESS_CHECK`

pull/7018/head
David Garske 2023-12-14 13:58:29 -08:00
parent 8b048bc246
commit 4b771a9b28
2 changed files with 3 additions and 2 deletions

View File

@ -99,6 +99,7 @@ ASN Options:
* WOLFSSL_ALLOW_ENCODING_CA_FALSE: Allow encoding BasicConstraints CA:FALSE
* which is discouraged by X.690 specification - default values shall not
* be encoded.
* NO_TIME_SIGNEDNESS_CHECK: Disabled the time_t signedness check.
*/
#include <wolfssl/wolfcrypt/error-crypt.h>
@ -14726,7 +14727,7 @@ int wc_ValidateDate(const byte* date, byte format, int dateType)
(void)tmpTime;
ltime = wc_Time(0);
#ifndef NO_TIME_SIGNED_CHECK
#ifndef NO_TIME_SIGNEDNESS_CHECK
if (sizeof(ltime) == sizeof(word32) && (int)ltime < 0){
/* A negative response here could be due to a 32-bit time_t
* where the year is 2038 or later. */

View File

@ -1026,7 +1026,7 @@ extern void uITRON4_free(void *p) ;
#if defined(__ti__) && !defined(USER_TIME)
/* TI internal time() offsets by 2208988800 (1990 -> 1970),
* which overflows signed 32-bit */
#define NO_TIME_SIGNED_CHECK
#define NO_TIME_SIGNEDNESS_CHECK
#endif
#endif