解决宝塔面板7.5.1证书签发错误

|-正在发送CSR..
|-正在下载证书..
Traceback (most recent call last):
File "class/acme_v2.py", line 753, in save_cert
self.sub_all_cert(key_file, pem_file)
File "class/acme_v2.py", line 775, 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'

|-申请成功,正在部署到站点..

对域名签发证书的提示如上,google了一圈,找到了类似解决办法

看似成功实际上根本就没有成功。 于是定位到 /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:

但是还是无法正常签发,错误依旧。

https://www.quchao.net/BT-SSL.html/comment-page-1

但是还是无法解决,包括重装BT,reboot服务器,最后按照文章后面的方式进行测试

先执行cd /www/server/panel/class
再执行python acme_v2.py 会发现

root# python acme_v2.py
Traceback (most recent call last):
File "acme_v2.py", line 36, in <module>
import OpenSSL
File "/usr/lib64/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/usr/lib64/python2.7/site-packages/OpenSSL/crypto.py", line 7, in <module>
from six import (
ImportError: No module named six

 

然后就简单了,输入下面的命令先卸载,再重新安装相关模块,问题解决

pip uninstall six
pip install six

版权声明:
作者:Jays
链接:https://ijays.com/2021/01/bt-panel-7-5-1-ssl-erro.html
来源:颓废的美
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>