Fix regression in ASN1_UTCTIME_cmp_time_t
Previously, ASN1_UTCTIME_cmp_time_t would return 1 if s > t, -1 if s < t, and 0 if s == t. This behavior was broken in upstream's 904348a4922333106b613754136305db229475ea, resulting in the opposite time comparison behavior. PR#3706 (Imported from upstream's da27006df06853a33b132133699a7aa9d4277920.) Change-Id: I9c1c28ba21d82ff4b587e33b262f46be4e846ff9 Reviewed-on: https://boringssl-review.googlesource.com/4043 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
a5a3eeb9cc
commit
cdcecf546b
@ -287,7 +287,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
|
||||
if (!OPENSSL_gmtime(&t, &ttm))
|
||||
return -2;
|
||||
|
||||
if (!OPENSSL_gmtime_diff(&day, &sec, &stm, &ttm))
|
||||
if (!OPENSSL_gmtime_diff(&day, &sec, &ttm, &stm))
|
||||
return -2;
|
||||
|
||||
if (day > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user