From a37e22d866294c25747b7546e6390bfe792fc3c5 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sun, 5 Dec 2004 18:26:19 +0000 Subject: Use X509_cmp_time() in -checkend option, to support GeneralizedTime. --- apps/x509.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/x509.c') diff --git a/apps/x509.c b/apps/x509.c index b2288b69c2..294fc69573 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -999,9 +999,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; -- cgit v1.2.3