ssl hostname.bundle错误中的python脚本错误

发布于 2025-02-05 08:19:26 字数 1231 浏览 1 评论 0原文

我们在Centos网络面板机上运行了一个Python脚本,该机器旨在启动Git界面,

直到HostName SSL昨天到期,

我们替换了HostName.CERT.CERT.CERT.CERT.CERT.CERTNAME.KEY.KEY和HOSTNAME.bundle.Bundle。重新启动了所有服务,但要获得错误:

Traceback (most recent call last):
  File "/home/hosting/scripts/git-web-interface/server.py", line 12, in <module>
    certificate_chain = "/etc/pki/tls/certs/hostname.bundle"
  File "/usr/local/lib/python3.6/site-packages/cheroot/ssl/builtin.py", line 101, in __init__
    self.context.load_cert_chain(certificate, private_key)
FileNotFoundError: [Errno 2] No such file or directory

执行的文件是:

# Our stuff
import customGlobals
# Web.py
import web

if __name__ == "__main__":
    from cheroot.server import HTTPServer
    from cheroot.ssl.builtin import BuiltinSSLAdapter
    HTTPServer.ssl_adapter = BuiltinSSLAdapter(
        certificate = "/etc/pki/tls/certs/hostname.cert",
        private_key = "/etc/pki/tls/private/hostname.key",
        certificate_chain = "/etc/pki/tls/certs/hostname.bundle"
    )
    customGlobals.app.run()

我们已经检查了证书,钥匙和链路路径正确,并且文件存在与正确所有权有关,但说明了主机名。Bundle不正确,

任何人都知道发生了什么事这里?

hostName.bundle似乎只是证书文件的副本,所以我猜那是不对的,但我不知道如果不是吗?

谁能建议?

we have a python script running on a centos web panel machine designed to start up a Git interface

this was working fine till the hostname ssl expired yesterday

we replaced the hostname.cert and hostname.key and hostname.bundle with a new wildcard digicert ssl and restarted all services but get the error:

Traceback (most recent call last):
  File "/home/hosting/scripts/git-web-interface/server.py", line 12, in <module>
    certificate_chain = "/etc/pki/tls/certs/hostname.bundle"
  File "/usr/local/lib/python3.6/site-packages/cheroot/ssl/builtin.py", line 101, in __init__
    self.context.load_cert_chain(certificate, private_key)
FileNotFoundError: [Errno 2] No such file or directory

the file being executed is:

# Our stuff
import customGlobals
# Web.py
import web

if __name__ == "__main__":
    from cheroot.server import HTTPServer
    from cheroot.ssl.builtin import BuiltinSSLAdapter
    HTTPServer.ssl_adapter = BuiltinSSLAdapter(
        certificate = "/etc/pki/tls/certs/hostname.cert",
        private_key = "/etc/pki/tls/private/hostname.key",
        certificate_chain = "/etc/pki/tls/certs/hostname.bundle"
    )
    customGlobals.app.run()

we have triple checked that the cert, key and chain paths are correct and the files exist with the right ownership but its saying the hostname.bundle is incorrect

anyone know what's going on here?

the hostname.bundle appears to be just a copy of the cert file, so im guessing that's not right but i don't know what it should be if its not that?

can anyone advise?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文