X509_cmp_time: only return 1, 0, -1.
authorEmilia Kasper <emilia@openssl.org>
Mon, 18 Dec 2017 17:41:05 +0000 (18:41 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 19 Apr 2018 07:42:09 +0000 (09:42 +0200)
commit67567b221bd06aca1719c926fadc5ce1a0452e9a
treecde9579eb712b5d66f63242cb7f8953f693fd30c
parent82d8cec06ae8af5dbe68c8e4be38ad32ce9fa594
X509_cmp_time: only return 1, 0, -1.

The behaviour of X509_cmp_time used to be undocumented.

The new behaviour, documented in master, is to return only 0, 1, or -1.
Make the code in the other branches to adhere to this behaviour too,
to reduce confusion. There is nothing to be gained from returning
other values.

Fixes GH#4954

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4955)

(cherry picked from commit 48345917747a34feea3da2936994a265c7f2ca11)
crypto/x509/x509_vfy.c