今天提示SSL过期,用自动续签续签了证书,然后还是过期。仔细看了一下,发现是acme_v2的脚本问题。

|-共需要续签 1 张证书
|-正在续签第 1 张,域名: ['www.sakurabakiyoka.com']..
|-正在创建订单..
|-正在获取验证信息..
|-正在验证域名..
|-正在发送CSR..
|-正在下载证书..
Traceback (most recent call last):
File "/www/server/panel/class/acme_v2.py", line 692, in save_cert
self.sub_all_cert(key_file, pem_file)
File "/www/server/panel/class/acme_v2.py", line 714, in sub_all_cert
if to_cert_init['issuer'] != cert_init['issuer'] and to_cert_init['issuer'].find("Let's Encrypt") == -1:
AttributeError: 'NoneType' object has no attribute 'find'

|-续签成功!

实际上根本就没有成功。

于是定位到/www/server/panel/class/acme_v2.py 714行,

if to_cert_init['issuer'] != cert_init['issuer'] and to_cert_init['issuer'].find("Let's Encrypt") == -1:

这条语句出现了问题,应该改成

if to_cert_init['issuer'] != cert_init['issuer'] and str(to_cert_init['issuer']).find("Let's Encrypt") == -1:

即可正常续签。


你是否也像清风拂过花儿一样与我相遇呢?