summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2004-12-05 18:26:48 +0000
committerDr. Stephen Henson <steve@openssl.org>2004-12-05 18:26:48 +0000
commitb0ab906524081a75283b5c7a5e75e5fb35b93dc8 (patch)
treeb9ad8ad2f8ed8e30f84d01484506ac875c5891b8 /apps
parentec46cd8bb8fec06e0b1b1e41b632d1c1a4886547 (diff)
Use X509_cmp_time() in -checkend option, to support GeneralizedTime.
Diffstat (limited to 'apps')
-rw-r--r--apps/x509.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 167b94f85f..7a998523c7 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -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;