Let's Encrypt 证书 wget 报错

最近发现一个奇怪的问题,网站使用 let's encrypt 的免费证书,浏览器访问时正常,但是wget的时候报错。报错信息如下:

wget https://www.example.com

--2021-11-16 13:00:42-- https://www.example.com/ Resolving www.example.com (www.example.com)... 47.91.21.201 Connecting to www.example.com (www.example.com)|47.21.17.201|:443... connected. ERROR: cannot verify www.example.com's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’: Issued certificate has expired. To connect to www.example.com insecurely, use `--no-check-certificate'.

网上搜索了一波,没发现什么有效的解决办法,亲测两种办法有效。

1、安装软件

yum install -y ca-certificates

2、更换签发机构

因为我使用的是acme.sh 签发的证书,签发证书的时候默认使用的是zerossl server,而我特别指定了 let's encrypt directory server,所以此处直接去掉指定的server即可。使用zereossl作为签发机构。

原文地址:https://www.cnblogs.com/cptao/p/15560527.html