Wow! Great link - I'll have to check out some of the other recipes after I
get this one working.
- ssl_and_plain_servers.py
- single_ssl_server.py
both exited prematurely with the same error:
"File "c:\python27\lib\site-packages\cherrypy\wsgiserver\ssl_pyopenssl.py",
line 173, in __init__
raise ImportError("You must install pyOpenSSL to use HTTPS.")
ImportError: You must install pyOpenSSL to use HTTPS."
(This is very similar to the error that I get when tried various examples
on the web..)
The last one (wsgi_ssl_server.py) does work but it looks like something's
not right; I didn't get any logging information (like the others) and when
I sent the quit command it displayed:
"File "c:\python27\lib\site-packages\cherrypy\wsgiserver\wsgiserver2.py",
line 1887, in tick
s, addr = self.socket.accept()
KeyboardInterrupt"
..and didn't return me to the command prompt (it looks like the window hung
as it had to be forcibly closed)
I'll try to merge wsgi_ssl_server.py and ssl_and_plain_servers.py but it
looks like they are accomplishing the same task very differently.
Question - why does Cherrypy default to pyOpenSSL (which people may not
have installed) instead of the ssl module in the python standard library
(which they almost certainly have installed)? Is the native ssl module
lacking something that pyOpenSSL has? (Is it not a best practice to use the
native ssl module?)
Thanks again for the link! I will try to get it working in the meantime.