diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-03-12 23:10:57 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-03-12 23:10:57 (GMT) |
commit | 8546e226bd0b6332ea5af551b9bbd74c2707a3ea (patch) | |
tree | 74ee5831cec0f8259cee94adc05b89b61d852ede /Lib | |
parent | 67266d1993b96867f85dc90d89fbe1019f0471f4 (diff) | |
parent | d0fc83d5ebf860664ab2156549d3eb98a50212cd (diff) | |
download | cpython-8546e226bd0b6332ea5af551b9bbd74c2707a3ea.zip cpython-8546e226bd0b6332ea5af551b9bbd74c2707a3ea.tar.gz cpython-8546e226bd0b6332ea5af551b9bbd74c2707a3ea.tar.bz2 |
merge 3.3 (#20896)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_ssl.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 0dc04c0..1a2a9f0 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1351,12 +1351,15 @@ 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)) + pem = ssl.get_server_certificate((host, port), + ssl.PROTOCOL_SSLv23) if not pem: self.fail("No server certificate on %s:%s!" % (host, port)) try: - pem = ssl.get_server_certificate((host, port), ca_certs=CERTFILE) + pem = ssl.get_server_certificate((host, port), + ssl.PROTOCOL_SSLv23, + ca_certs=CERTFILE) except ssl.SSLError as x: #should fail if support.verbose: @@ -1364,7 +1367,9 @@ class NetworkedTests(unittest.TestCase): else: self.fail("Got server certificate %s for %s:%s!" % (pem, host, port)) - pem = ssl.get_server_certificate((host, port), ca_certs=cert) + 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)) if support.verbose: |