summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_time.c
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2017-08-25 16:34:56 -0400
committerRich Salz <rsalz@openssl.org>2017-08-30 11:24:02 -0400
commite44d37618018eb5dc8ba2d776b215abdaca6090a (patch)
tree53da2f3aabe6b93365bb60c2d6e00fc70c5c966f /crypto/asn1/a_time.c
parent54cf3b981afcbbd3754c8ba1114ab6a658d86c08 (diff)
Fix return value of ASN1_TIME_compare
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4264)
Diffstat (limited to 'crypto/asn1/a_time.c')
-rw-r--r--crypto/asn1/a_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c
index cb19e8024a..1babb96360 100644
--- a/crypto/asn1/a_time.c
+++ b/crypto/asn1/a_time.c
@@ -543,7 +543,7 @@ int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b)
{
int day, sec;
- if (!ASN1_TIME_diff(&day, &sec, a, b))
+ if (!ASN1_TIME_diff(&day, &sec, b, a))
return -2;
if (day > 0 || sec > 0)
return 1;