diff options
author | Carl Jackson <carl@avtok.com> | 2015-01-31 02:22:47 -0800 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-03-15 19:46:24 +0000 |
commit | da27006df06853a33b132133699a7aa9d4277920 (patch) | |
tree | 7f2a21df9bf7b348db8eaaa5960f24fca09beea3 /crypto | |
parent | 556efe7961b300f0fd49c3c8aa47d652caf83c6f (diff) |
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 a refactor [0], resulting in the opposite
time comparison behavior.
[0]: 904348a4922333106b613754136305db229475ea
PR#3706
Reviewed-by: Stephen Henson <steve@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/a_utctm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c index 9b552849f0..e56cbbcb1e 100644 --- a/crypto/asn1/a_utctm.c +++ b/crypto/asn1/a_utctm.c @@ -249,7 +249,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) |