Use X509_cmp_time() in -checkend option, to support GeneralizedTime.

This commit is contained in:
Dr. Stephen Henson
2004-12-05 18:26:48 +00:00
parent ec46cd8bb8
commit b0ab906524

View File

@@ -974,9 +974,9 @@ bad:
if (checkend)
{
time_t tnow=time(NULL);
time_t tcheck=time(NULL) + checkoffset;
if (ASN1_UTCTIME_cmp_time_t(X509_get_notAfter(x), tnow+checkoffset) == -1)
if (X509_cmp_time(X509_get_notAfter(x), &tcheck) < 0)
{
BIO_printf(out,"Certificate will expire\n");
ret=1;