Merge pull request #6050 from JacobBarthelmeh/time

fix warning if ltime is unsigned
This commit is contained in:
David Garske 2023-02-03 11:06:17 -08:00 committed by GitHub
commit c6018b837d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13777,7 +13777,7 @@ int wc_ValidateDate(const byte* date, byte format, int dateType)
(void)tmpTime;
ltime = wc_Time(0);
if (ltime < 0){
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. */
WOLFSSL_MSG("wc_Time failed to return a valid value");