summaryrefslogtreecommitdiffstats
path: root/testenv/server/http/http_server.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testenv/server/http/http_server.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/testenv/server/http/http_server.py b/testenv/server/http/http_server.py
index 2cc82fb..fd6121a 100644
--- a/testenv/server/http/http_server.py
+++ b/testenv/server/http/http_server.py
@@ -47,10 +47,10 @@ class HTTPSServer(StoppableHTTPServer):
os.getenv('srcdir', '.'),
'certs',
'server-key.pem'))
- self.socket = ssl.wrap_socket(
+ ctx = ssl.SSLContext(protocol=ssl.PROTOCOL_TLS_SERVER)
+ ctx.load_cert_chain(CERTFILE, KEYFILE)
+ self.socket = ctx.wrap_socket(
sock=socket.socket(self.address_family, self.socket_type),
- certfile=CERTFILE,
- keyfile=KEYFILE,
server_side=True
)
self.server_bind()