我在我的 web.py 中实现 SSL 连接,但是服务器未能通过安全扫描并卡在 TLS Renegotiation DoS 漏洞上。
这是我的代码片段:
import web
from web.wsgiserver import CherryPyWSGIServer
CherryPyWSGIServer.ssl_certificate = "path/to/ssl_certificate"
CherryPyWSGIServer.ssl_private_key = "path/to/ssl_private_key"
urls = ("/.*", "hello")
app = web.application(urls, globals())
class hello:
def GET(self):
return 'Hello, world!'
if __name__ == "__main__":
app.run()
有没有办法在 web.py 中禁用 TLS 重新协商?谢谢!