mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
account for case where XTIME returns an unsigned type
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user