Skip to content

Commit 4b771a9

Browse files
committed
Document new macro and rename to: NO_TIME_SIGNEDNESS_CHECK
1 parent 8b048bc commit 4b771a9

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

wolfcrypt/src/asn.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ ASN Options:
9999
* WOLFSSL_ALLOW_ENCODING_CA_FALSE: Allow encoding BasicConstraints CA:FALSE
100100
* which is discouraged by X.690 specification - default values shall not
101101
* be encoded.
102+
* NO_TIME_SIGNEDNESS_CHECK: Disabled the time_t signedness check.
102103
*/
103104

104105
#include <wolfssl/wolfcrypt/error-crypt.h>
@@ -14726,7 +14727,7 @@ int wc_ValidateDate(const byte* date, byte format, int dateType)
1472614727
(void)tmpTime;
1472714728

1472814729
ltime = wc_Time(0);
14729-
#ifndef NO_TIME_SIGNED_CHECK
14730+
#ifndef NO_TIME_SIGNEDNESS_CHECK
1473014731
if (sizeof(ltime) == sizeof(word32) && (int)ltime < 0){
1473114732
/* A negative response here could be due to a 32-bit time_t
1473214733
* where the year is 2038 or later. */

wolfssl/wolfcrypt/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ extern void uITRON4_free(void *p) ;
10261026
#if defined(__ti__) && !defined(USER_TIME)
10271027
/* TI internal time() offsets by 2208988800 (1990 -> 1970),
10281028
* which overflows signed 32-bit */
1029-
#define NO_TIME_SIGNED_CHECK
1029+
#define NO_TIME_SIGNEDNESS_CHECK
10301030
#endif
10311031
#endif
10321032

0 commit comments

Comments
 (0)