|
@@ -1509,6 +1509,7 @@ class CherryPyWSGIServer(object):
|
|
|
ssl_certificate = None
|
|
ssl_certificate = None
|
|
|
ssl_private_key = None
|
|
ssl_private_key = None
|
|
|
ssl_cipher_list = "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2"
|
|
ssl_cipher_list = "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2"
|
|
|
|
|
+ ssl_password_cb = None
|
|
|
|
|
|
|
|
def __init__(self, bind_addr, wsgi_app, numthreads=10, server_name=None,
|
|
def __init__(self, bind_addr, wsgi_app, numthreads=10, server_name=None,
|
|
|
max=-1, request_queue_size=5, timeout=10, shutdown_timeout=5):
|
|
max=-1, request_queue_size=5, timeout=10, shutdown_timeout=5):
|
|
@@ -1664,6 +1665,10 @@ class CherryPyWSGIServer(object):
|
|
|
|
|
|
|
|
# See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442473
|
|
# See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442473
|
|
|
ctx = SSL.Context(SSL.SSLv23_METHOD)
|
|
ctx = SSL.Context(SSL.SSLv23_METHOD)
|
|
|
|
|
+
|
|
|
|
|
+ if self.ssl_password_cb is not None:
|
|
|
|
|
+ ctx.set_passwd_cb(self.ssl_password_cb)
|
|
|
|
|
+
|
|
|
ctx.set_cipher_list(self.ssl_cipher_list)
|
|
ctx.set_cipher_list(self.ssl_cipher_list)
|
|
|
ctx.use_privatekey_file(self.ssl_private_key)
|
|
ctx.use_privatekey_file(self.ssl_private_key)
|
|
|
ctx.use_certificate_file(self.ssl_certificate)
|
|
ctx.use_certificate_file(self.ssl_certificate)
|