This commit is contained in:
Guillaume Ayoub 2016-08-29 12:07:30 +02:00
parent a25374000b
commit fd1742fcea
2 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ class HTTPSServer(HTTPServer):
certificate = None
key = None
protocol = None
cyphers = None
ciphers = None
def __init__(self, address, handler):
"""Create server by wrapping HTTP socket in an SSL socket."""
@ -110,7 +110,7 @@ class HTTPSServer(HTTPServer):
self.socket = ssl.wrap_socket(
self.socket, self.key, self.certificate, server_side=True,
ssl_version=self.protocol, cyphers=self.cyphers)
ssl_version=self.protocol, ciphers=self.ciphers)
self.server_bind()
self.server_activate()

View File

@ -162,7 +162,7 @@ def serve(configuration, logger):
server_class = ThreadedHTTPSServer
server_class.certificate = configuration.get("server", "certificate")
server_class.key = configuration.get("server", "key")
server_class.cyphers = configuration.get("server", "cyphers")
server_class.ciphers = configuration.get("server", "ciphers")
server_class.certificate = getattr(
ssl, configuration.get("server", "protocol"), ssl.PROTOCOL_SSLv23)
# Test if the SSL files can be read