mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Replace deprecated ssl.wrap_socket method
This commit is contained in:
@@ -4,8 +4,9 @@ import ssl
|
|||||||
|
|
||||||
httpd = HTTPServer(('localhost', 4443), SimpleHTTPRequestHandler)
|
httpd = HTTPServer(('localhost', 4443), SimpleHTTPRequestHandler)
|
||||||
|
|
||||||
httpd.socket = ssl.wrap_socket (httpd.socket,
|
sslctx = ssl.SSLContext()
|
||||||
keyfile="../key.pem",
|
sslctx.load_cert_chain(certfile="../cert.pem", keyfile="../key.pem")
|
||||||
certfile="../cert.pem", server_side=True)
|
|
||||||
|
httpd.socket = sslctx.wrap_socket (httpd.socket, server_side=True)
|
||||||
|
|
||||||
httpd.serve_forever()
|
httpd.serve_forever()
|
||||||
|
|||||||
Reference in New Issue
Block a user