diff options
author | Christian Heimes <christian@python.org> | 2017-09-04 20:54:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 20:54:47 (GMT) |
commit | 4bc8ef0eeed191f9398a90e748f732cfba67546d (patch) | |
tree | 0654fdb39b207437bf8a2d6f0e61f08ab1afc27a /Lib/test/test_ssl.py | |
parent | 6a116c2aa4e5f13e24f2ee792b5d7af5e8db1c88 (diff) | |
download | cpython-4bc8ef0eeed191f9398a90e748f732cfba67546d.zip cpython-4bc8ef0eeed191f9398a90e748f732cfba67546d.tar.gz cpython-4bc8ef0eeed191f9398a90e748f732cfba67546d.tar.bz2 |
[3.6] bpo-25674: remove sha256.tbs-internet.com ssl test (GH-3297) (#3300)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 002d64039b60c1a9289f981fe73a5cf91d082136)
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 3fdbba1..4c060ea 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1793,34 +1793,6 @@ class NetworkedTests(unittest.TestCase): _test_get_server_certificate(self, 'ipv6.google.com', 443) _test_get_server_certificate_fail(self, 'ipv6.google.com', 443) - def test_algorithms(self): - # Issue #8484: all algorithms should be available when verifying a - # certificate. - # SHA256 was added in OpenSSL 0.9.8 - if ssl.OPENSSL_VERSION_INFO < (0, 9, 8, 0, 15): - self.skipTest("SHA256 not available on %r" % ssl.OPENSSL_VERSION) - # sha256.tbs-internet.com needs SNI to use the correct certificate - if not ssl.HAS_SNI: - self.skipTest("SNI needed for this test") - # https://sha2.hboeck.de/ was used until 2011-01-08 (no route to host) - remote = ("sha256.tbs-internet.com", 443) - sha256_cert = os.path.join(os.path.dirname(__file__), "sha256.pem") - with support.transient_internet("sha256.tbs-internet.com"): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) - ctx.verify_mode = ssl.CERT_REQUIRED - ctx.load_verify_locations(sha256_cert) - s = ctx.wrap_socket(socket.socket(socket.AF_INET), - server_hostname="sha256.tbs-internet.com") - try: - s.connect(remote) - if support.verbose: - sys.stdout.write("\nCipher with %r is %r\n" % - (remote, s.cipher())) - sys.stdout.write("Certificate is:\n%s\n" % - pprint.pformat(s.getpeercert())) - finally: - s.close() - def _test_get_server_certificate(test, host, port, cert=None): pem = ssl.get_server_certificate((host, port)) |