Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
mabeyj opened this Issue · 1 comment

2 participants

@mabeyj

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

[server:ssl]
use = egg:pyramid#cherrypy
host = 127.0.0.1
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 https://bitbucket.org/cherrypy/cherrypy/wiki/WhatsNewIn32, 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.

@enmand enmand referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@enmand enmand referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@tomster tomster was assigned
@tomster

This has been fized in #1086

@tomster tomster closed this
@mcdonc mcdonc referenced this issue from a commit
@tomster tomster backport for #718 to 1.4-branch 6aabdd5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.