summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ftplib.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2018-02-24 23:45:24 (GMT)
committerGitHub <noreply@github.com>2018-02-24 23:45:24 (GMT)
commitaab225840360719516eca55a7a69cfee45aee2af (patch)
tree3ddac4750f35272d110d4d5174e8e27c96ad93ab /Lib/test/test_ftplib.py
parent980790eee0c804061a49b8ad7373e4669b48f2ec (diff)
downloadcpython-aab225840360719516eca55a7a69cfee45aee2af.zip
cpython-aab225840360719516eca55a7a69cfee45aee2af.tar.gz
cpython-aab225840360719516eca55a7a69cfee45aee2af.tar.bz2
bpo-31518: Change TLS protocol for Debian (#3660)
Debian Unstable has disabled TLS 1.0 and 1.1 for SSLv23_METHOD(). Change TLS/SSL protocol of some tests to PROTOCOL_TLS or PROTOCOL_TLSv1_2 to make them pass on Debian. Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/test/test_ftplib.py')
-rw-r--r--Lib/test/test_ftplib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index b593313..44dd73a 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -908,11 +908,11 @@ class TestTLS_FTPClass(TestCase):
self.client.auth()
self.assertRaises(ValueError, self.client.auth)
finally:
- self.client.ssl_version = ssl.PROTOCOL_TLSv1
+ self.client.ssl_version = ssl.PROTOCOL_TLS
def test_context(self):
self.client.quit()
- ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ ctx = ssl.SSLContext(ssl.PROTOCOL_TLS)
self.assertRaises(ValueError, ftplib.FTP_TLS, keyfile=CERTFILE,
context=ctx)
self.assertRaises(ValueError, ftplib.FTP_TLS, certfile=CERTFILE,
@@ -941,7 +941,7 @@ class TestTLS_FTPClass(TestCase):
def test_check_hostname(self):
self.client.quit()
- ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ ctx = ssl.SSLContext(ssl.PROTOCOL_TLS)
ctx.verify_mode = ssl.CERT_REQUIRED
ctx.check_hostname = True
ctx.load_verify_locations(CAFILE)