Add missing import for implementer

Also remove TLSv1.1 and TLSv1.2 method: these are available only
from pyOpenSSL 0.14
https://github.com/pyca/pyopenssl/releases/tag/v0.14a1
This commit is contained in:
Paul Tremberth 2016-02-19 02:56:26 +01:00
parent 45f972cb3f
commit 406b9a06fe
1 changed files with 2 additions and 8 deletions

View File

@ -5,6 +5,8 @@ from scrapy import twisted_version
if twisted_version >= (14, 0, 0):
from zope.interface.declarations import implementer
from twisted.internet.ssl import optionsForClientTLS
from twisted.web.client import BrowserLikePolicyForHTTPS
from twisted.web.iweb import IPolicyForHTTPS
@ -65,11 +67,3 @@ class SSLv3ContextFactory(OpenSSLMethodContextFactory):
class TLSv1ContextFactory(OpenSSLMethodContextFactory):
openssl_method = SSL.TLSv1_METHOD
class TLSv11ContextFactory(OpenSSLMethodContextFactory):
openssl_method = SSL.TLSv1_1_METHOD
class TLSv12ContextFactory(OpenSSLMethodContextFactory):
openssl_method = SSL.TLSv1_2_METHOD