mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-28 14:02:23 +01:00
Merge pull request #4959 from haydenroche5/asn1_time_diff_bug
Fix bug in wolfSSL_ASN1_TIME_diff.
This commit is contained in:
@@ -32069,7 +32069,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;
|
||||
}
|
||||
@@ -32088,7 +32088,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