请帮我创建 HTTPS 龙卷风服务器 我当前的代码 Python3 不起作用
import os, socket, ssl, pprint, tornado.ioloop, tornado.web, tornado.httpserver
from tornado.tcpserver import TCPServer
class getToken(tornado.web.RequestHandler):
def get(self):
self.write("hello")
application = tornado.web.Application([
(r'/', getToken),
])
# implementation for SSL
http_server = tornado.httpserver.HTTPServer(application)
TCPServer(ssl_options={
"certfile": os.path.join("/var/pyTest/keys/", "ca.csr"),
"keyfile": os.path.join("/var/pyTest/keys/", "ca.key"),
})
if __name__ == '__main__':
#http_server.listen(8888)
http_server = TCPServer()
http_server.listen(443)
tornado.ioloop.IOLoop.instance().start()
HTTPS对我来说很重要,请帮忙