mirror of
https://github.com/github/codeql.git
synced 2026-07-19 02:08:14 +02:00
This doesn't really matter since it's a dummy test server, but it's simpler to fix than to dismiss.
14 lines
404 B
Python
14 lines
404 B
Python
from http.server import HTTPServer, SimpleHTTPRequestHandler
|
|
import ssl
|
|
|
|
|
|
httpd = HTTPServer(('localhost', 4443), SimpleHTTPRequestHandler)
|
|
|
|
sslctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
|
sslctx.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1
|
|
sslctx.load_cert_chain(certfile="../cert.pem", keyfile="../key.pem")
|
|
|
|
httpd.socket = sslctx.wrap_socket (httpd.socket, server_side=True)
|
|
|
|
httpd.serve_forever()
|