提交 a37e22d8 编写于 作者: D Dr. Stephen Henson

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

上级 41c70d47
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册