跳到主要内容
ecdsa.com
Chrome, Edge and other Chromium browsers浏览器

错误信息

net::ERR_CERT_DATE_INVALID

警告页显示“NET::ERR_CERT_DATE_INVALID”;自动化工具打印的是“net::ERR_CERT_DATE_INVALID”。如果 Chrome 判断是设备时钟本身有误,就会显示专门的“Your clock is ahead/behind”页面,而不是通常的警告。

Chrome, Edge and other Chromium browsers — the certificate is expired or not yet valid

含义

按照设备时钟,该网站的证书(或其证书链中的某张证书)不在有效期内:已过期或尚未生效。Chrome 会用“Your connection is not private”拦截页面。如果只有一个网站出现这个错误,说明该网站的证书已过期;如果所有网站都出现,说明电脑的日期不对。

原因

修复方法

  1. 1.

    网站所有者:检查实际发送的证书日期

    将 notAfter 与今天的日期比较;从外部、通过访客使用的同一路径进行检查。

    bash
    echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null \
      | openssl x509 -noout -startdate -enddate
  2. 2.

    网站所有者:续期并实现自动化

    续期证书,重新加载负责 TLS 终止的服务,并确认自动续期任务确实存在且在运行。

    bash
    sudo certbot renew && sudo systemctl reload nginx
    systemctl list-timers | grep -i certbot      # is automatic renewal scheduled?
  3. 3.

    用户:校正设备时钟

    启用自动设置时间;不要绕过警告,因为过期的证书已经不能再用来可靠地确认网站身份。

    text
    Users: if many sites show this error at once, fix the device clock first
    (Windows: Settings → Time & language → Set time automatically; macOS: Date & Time → Set automatically).

相关错误

浏览完整的签名错误库