diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2004-12-05 18:26:19 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2004-12-05 18:26:19 +0000 |
commit | a37e22d866294c25747b7546e6390bfe792fc3c5 (patch) | |
tree | 0b98fc06e79221426328b964ce2ac32341925f5b /apps | |
parent | 41c70d47d72ac6e11fcc1eb899a1f2d7ebdb08b1 (diff) | |
download | openssl-new-a37e22d866294c25747b7546e6390bfe792fc3c5.tar.gz |
Use X509_cmp_time() in -checkend option, to support GeneralizedTime.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/x509.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |