diff options
author | Christian Heimes <christian@python.org> | 2017-09-04 20:26:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 20:26:01 (GMT) |
commit | 002d64039b60c1a9289f981fe73a5cf91d082136 (patch) | |
tree | 193f5024355db86e96414c33a4634cc0dde47faa /Lib/test/test_ssl.py | |
parent | 0c7983e4adf9604d0ac93757a45d14be06c27696 (diff) | |
download | cpython-002d64039b60c1a9289f981fe73a5cf91d082136.zip cpython-002d64039b60c1a9289f981fe73a5cf91d082136.tar.gz cpython-002d64039b60c1a9289f981fe73a5cf91d082136.tar.bz2 |
bpo-25674: remove sha256.tbs-internet.com ssl test (#3297)
Signed-off-by: Christian Heimes <christian@python.org>
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 5e143f9..5916a2b 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1803,34 +1803,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)) |