SSL not working in CherryPy

怎甘沉沦 提交于 2019-12-02 13:08:54

问题


I've seemingly done everything according to docs but SSL just does not work.
Here's my CherryPy settings.conf:

[global]
request.show_tracebacks = False
server.socket_port = 443
server.thread_pool = 10
log.screen = True
log.error_file = '/root/website/Web.log'
log.access_file = '/root/website/Access.log'
cherrypy.server.ssl_module = 'pyopenssl'
cherrypy.server.ssl_certificate = "/etc/ssl/website/AddTrustExternalCARoot.crt"
cherrypy.server.ssl_private_key = "/etc/ssl/website/btcontract_com.key"
cherrypy.server.ssl_certificate_chain = "/etc/ssl/website/chain.crt"  

If I try to load site.com:443 in browser it works without using a certificate.
If I try https://site.com the browser says there's an SSL connect error.

CherryPy error and connection logs contain nothing at all as if it does not even getting these https requests. I'm not sure if my python has built in SSL support so I did installed pyOpenSSL. What's going on and how can I fix this?


回答1:


There was a change in version 3.2.5 that broke SSL support. This hasn't been fixed yet (as of version 3.6.0), but there is a patch suggested in issue 1298 if you need to use one of these versions.




回答2:


Problem solved by installing a lower version on CherryPy (namely 3.2.3). Apparently something is wrong with SSL in 3.6.0



来源:https://stackoverflow.com/questions/27018852/ssl-not-working-in-cherrypy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!