summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-04-16 18:56:28 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2014-04-16 18:56:28 +0200
commit94a5b663bf39a130fcd8b437aded6e7a7c396cff (patch)
tree01b283bc5fdd84e1855aa20d6ac409197faf1173 /Lib/test
parent0fba0c3ebfc8f5feed517783231bdff1e4a3e1a7 (diff)
downloadcpython-git-94a5b663bf39a130fcd8b437aded6e7a7c396cff.tar.gz
Issue #20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not PROTOCOL_SSLv3, for maximum compatibility.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_ssl.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 2b3de1f477..9f5bd09b99 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -1371,14 +1371,12 @@ class NetworkedTests(unittest.TestCase):
def test_get_server_certificate(self):
def _test_get_server_certificate(host, port, cert=None):
with support.transient_internet(host):
- pem = ssl.get_server_certificate((host, port),
- ssl.PROTOCOL_SSLv23)
+ pem = ssl.get_server_certificate((host, port))
if not pem:
self.fail("No server certificate on %s:%s!" % (host, port))
try:
pem = ssl.get_server_certificate((host, port),
- ssl.PROTOCOL_SSLv23,
ca_certs=CERTFILE)
except ssl.SSLError as x:
#should fail
@@ -1388,7 +1386,6 @@ class NetworkedTests(unittest.TestCase):
self.fail("Got server certificate %s for %s:%s!" % (pem, host, port))
pem = ssl.get_server_certificate((host, port),
- ssl.PROTOCOL_SSLv23,
ca_certs=cert)
if not pem:
self.fail("No server certificate on %s:%s!" % (host, port))