Mercurial > libervia-backend
diff sat/tools/web.py @ 3205:2c0628f3927e
plugin download, aesgcm: disable TLS check if `check_certificate` setting is disabled
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 06 Mar 2020 18:19:03 +0100 |
parents | 9d0df638c8b4 |
children | be6d91572633 |
line wrap: on
line diff
--- a/sat/tools/web.py Fri Mar 06 18:19:03 2020 +0100 +++ b/sat/tools/web.py Fri Mar 06 18:19:03 2020 +0100 @@ -45,7 +45,7 @@ @implementer(iweb.IPolicyForHTTPS) -class NoCheckContextFactory(ssl.ClientContextFactory): +class NoCheckContextFactory: """Context factory which doesn't do TLS certificate check /!\\ it's obvisously a security flaw to use this class, @@ -64,4 +64,4 @@ #: following treq doesn't check TLS, obviously it is unsecure and should not be used #: without explicit warning -treq_no_ssl = HTTPClient(http_client.Agent(reactor, NoCheckContextFactory)) +treq_client_no_ssl = HTTPClient(http_client.Agent(reactor, NoCheckContextFactory()))