@@ -1793,34 +1793,6 @@ def test_get_server_certificate_ipv6(self):
1793
1793
_test_get_server_certificate (self , 'ipv6.google.com' , 443 )
1794
1794
_test_get_server_certificate_fail (self , 'ipv6.google.com' , 443 )
1795
1795
1796
- def test_algorithms (self ):
1797
- # Issue #8484: all algorithms should be available when verifying a
1798
- # certificate.
1799
- # SHA256 was added in OpenSSL 0.9.8
1800
- if ssl .OPENSSL_VERSION_INFO < (0 , 9 , 8 , 0 , 15 ):
1801
- self .skipTest ("SHA256 not available on %r" % ssl .OPENSSL_VERSION )
1802
- # sha256.tbs-internet.com needs SNI to use the correct certificate
1803
- if not ssl .HAS_SNI :
1804
- self .skipTest ("SNI needed for this test" )
1805
- # https://sha2.hboeck.de/ was used until 2011-01-08 (no route to host)
1806
- remote = ("sha256.tbs-internet.com" , 443 )
1807
- sha256_cert = os .path .join (os .path .dirname (__file__ ), "sha256.pem" )
1808
- with support .transient_internet ("sha256.tbs-internet.com" ):
1809
- ctx = ssl .SSLContext (ssl .PROTOCOL_TLSv1 )
1810
- ctx .verify_mode = ssl .CERT_REQUIRED
1811
- ctx .load_verify_locations (sha256_cert )
1812
- s = ctx .wrap_socket (socket .socket (socket .AF_INET ),
1813
- server_hostname = "sha256.tbs-internet.com" )
1814
- try :
1815
- s .connect (remote )
1816
- if support .verbose :
1817
- sys .stdout .write ("\n Cipher with %r is %r\n " %
1818
- (remote , s .cipher ()))
1819
- sys .stdout .write ("Certificate is:\n %s\n " %
1820
- pprint .pformat (s .getpeercert ()))
1821
- finally :
1822
- s .close ()
1823
-
1824
1796
1825
1797
def _test_get_server_certificate (test , host , port , cert = None ):
1826
1798
pem = ssl .get_server_certificate ((host , port ))
0 commit comments