SSL with pserve + CherryPy 3.2 + Python 3 does not work #718

mabeyj opened this Issue Nov 9, 2012 · 1 comment


None yet
2 participants

mabeyj commented Nov 9, 2012

I'm using the following configuration with pserve to use CherryPy's WSGI server:

use = egg:pyramid#cherrypy
host =
port = 443
ssl_pem = host.pem

This works, but it uses HTTP instead of HTTPS. I've found a problem with this line in cherrypy_server_runner():

server.ssl_certificate = server.ssl_private_key = ssl_pem

I'm using Python 3.3 and CherryPy 3.2.2. According to, Python 3 support was introduced in CherryPy 3.2 and it uses a different way to configure SSL. Changing the above line to the following works and requests are served over HTTPS:

if ssl_pem is not None:
    server.ssl_adapter = wsgiserver.ssl_builtin.BuiltinSSLAdapter(ssl_pem, ssl_pem)

Looks like the ssl_certificate and ssl_private_key attributes are now deprecated.

tomster was assigned Aug 15, 2013


tomster commented Aug 16, 2013

This has been fized in #1086

tomster closed this Aug 16, 2013

@mcdonc mcdonc added a commit that referenced this issue Aug 30, 2013

@tomster @mcdonc tomster + mcdonc backport for #718 to 1.4-branch 6aabdd5

@ztane ztane pushed a commit to ztane/pyramid that referenced this issue Nov 15, 2013

@tomster tomster Make ``pserve.cherrypy_server_runner`` Python 3 compatible.
Closes Pylons#718
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment