plugin download, aesgcm: disable TLS check if check_certificate setting is disabled
This commit is contained in:
parent
d0df1d8aeb
commit
1883dbd3ab
1 changed files with 33 additions and 6 deletions
|
|
@ -45,7 +45,7 @@ class NoCheckConnectionCreator(object):
|
|||
|
||||
|
||||
@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 @@ class NoCheckContextFactory(ssl.ClientContextFactory):
|
|||
|
||||
#: 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()))
|
||||
|
|
|
|||
Loading…
Reference in a new issue