激活https时出现错误CERTIFICATE_VERIFY_FAILED

时间:2018-09-06 10:23:55

标签: python windows ssl https certificate

我使用以下命令在Python(Windows)上激活了https:

app.run(ssl_context=('cert/cert.pem', 'cert/key.pem'),debug=True,threaded=True,host='my_server_name', port=8888)

在我的.py文件上,它可以正常工作,除了浏览器(实际上是Chrome)通过消息CERTIFICATE_VERIFY_FAILED提醒我:

This server could not prove that it is my_server_name; 
its security certificate is from *.example.com. 
This may be caused by a misconfiguration or an attacker intercepting your connection.

我的服务器通过主机名进行响应,例如

ping my_server_name

但它不会像这样的hostname.domain响应

ping my_server_name.example.com

我该怎么办?

  • 也许我应该在Python文件上配置更多内容?
  • 也许我应该配置更好的Windows服务器?

0 个答案:

没有答案