diff --git a/src/ssl.c b/src/ssl.c index 00a0148fc..60971a356 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -27486,7 +27486,7 @@ int wolfSSL_ASN1_TIME_to_tm(const WOLFSSL_ASN1_TIME* asnTime, struct tm* tm) } currentTime = XTIME(0); - if (currentTime < 0) { + if (currentTime <= 0) { WOLFSSL_MSG("Failed to get current time."); return WOLFSSL_FAILURE; } @@ -30242,7 +30242,7 @@ int wolfSSL_ASN1_TIME_diff(int *days, int *secs, const WOLFSSL_ASN1_TIME *from, } fromSecs = XMKTIME(fromTm); - if (fromSecs < 0) { + if (fromSecs <= 0) { WOLFSSL_MSG("XMKTIME for from time failed."); return WOLFSSL_FAILURE; } @@ -30261,7 +30261,7 @@ int wolfSSL_ASN1_TIME_diff(int *days, int *secs, const WOLFSSL_ASN1_TIME *from, } toSecs = XMKTIME(toTm); - if (toSecs < 0) { + if (toSecs <= 0) { WOLFSSL_MSG("XMKTIME for to time failed."); return WOLFSSL_FAILURE; }