Skip to content

Commit 57d963b

Browse files
authored
[2.7] bpo-25674: remove sha256.tbs-internet.com ssl test (GH-3297) (#3301)
* bpo-25674: remove sha256.tbs-internet.com ssl test (#3297) Signed-off-by: Christian Heimes <[email protected]> (cherry picked from commit 002d640) * [2.7] bpo-25674: remove sha256.tbs-internet.com ssl test (GH-3297) Signed-off-by: Christian Heimes <[email protected]>. (cherry picked from commit 002d640)
1 parent 05308c7 commit 57d963b

File tree

3 files changed

+1
-156
lines changed

3 files changed

+1
-156
lines changed

Lib/test/sha256.pem

Lines changed: 0 additions & 128 deletions
This file was deleted.

Lib/test/test_ssl.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,34 +1588,6 @@ def test_ciphers(self):
15881588
cert_reqs=ssl.CERT_NONE, ciphers="^$:,;?*'dorothyx")
15891589
s.connect(remote)
15901590

1591-
def test_algorithms(self):
1592-
# Issue #8484: all algorithms should be available when verifying a
1593-
# certificate.
1594-
# SHA256 was added in OpenSSL 0.9.8
1595-
if ssl.OPENSSL_VERSION_INFO < (0, 9, 8, 0, 15):
1596-
self.skipTest("SHA256 not available on %r" % ssl.OPENSSL_VERSION)
1597-
# sha256.tbs-internet.com needs SNI to use the correct certificate
1598-
if not ssl.HAS_SNI:
1599-
self.skipTest("SNI needed for this test")
1600-
# https://sha2.hboeck.de/ was used until 2011-01-08 (no route to host)
1601-
remote = ("sha256.tbs-internet.com", 443)
1602-
sha256_cert = os.path.join(os.path.dirname(__file__), "sha256.pem")
1603-
with support.transient_internet("sha256.tbs-internet.com"):
1604-
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
1605-
ctx.verify_mode = ssl.CERT_REQUIRED
1606-
ctx.load_verify_locations(sha256_cert)
1607-
s = ctx.wrap_socket(socket.socket(socket.AF_INET),
1608-
server_hostname="sha256.tbs-internet.com")
1609-
try:
1610-
s.connect(remote)
1611-
if support.verbose:
1612-
sys.stdout.write("\nCipher with %r is %r\n" %
1613-
(remote, s.cipher()))
1614-
sys.stdout.write("Certificate is:\n%s\n" %
1615-
pprint.pformat(s.getpeercert()))
1616-
finally:
1617-
s.close()
1618-
16191591
def test_get_ca_certs_capath(self):
16201592
# capath certs are loaded on request
16211593
with support.transient_internet(REMOTE_HOST):
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove sha256.tbs-internet.com ssl test

0 commit comments

Comments
 (0)