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