File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -690,20 +690,25 @@ def test_non_blocking_handshake(self):
690
690
691
691
def test_get_server_certificate (self ):
692
692
with support .transient_internet ("svn.python.org" ):
693
- pem = ssl .get_server_certificate (("svn.python.org" , 443 ))
693
+ pem = ssl .get_server_certificate (("svn.python.org" , 443 ),
694
+ ssl .PROTOCOL_SSLv23 )
694
695
if not pem :
695
696
self .fail ("No server certificate on svn.python.org:443!" )
696
697
697
698
try :
698
- pem = ssl .get_server_certificate (("svn.python.org" , 443 ), ca_certs = CERTFILE )
699
+ pem = ssl .get_server_certificate (("svn.python.org" , 443 ),
700
+ ssl .PROTOCOL_SSLv23 ,
701
+ ca_certs = CERTFILE )
699
702
except ssl .SSLError as x :
700
703
#should fail
701
704
if support .verbose :
702
705
sys .stdout .write ("%s\n " % x )
703
706
else :
704
707
self .fail ("Got server certificate %s for svn.python.org!" % pem )
705
708
706
- pem = ssl .get_server_certificate (("svn.python.org" , 443 ), ca_certs = SVN_PYTHON_ORG_ROOT_CERT )
709
+ pem <
5538
span class=pl-c1>= ssl .get_server_certificate (("svn.python.org" , 443 ),
710
+ ssl .PROTOCOL_SSLv23 ,
711
+ ca_certs = SVN_PYTHON_ORG_ROOT_CERT )
707
712
if not pem :
708
713
self .fail ("No server certificate on svn.python.org:443!" )
709
714
if support .verbose :
You can’t perform that action at this time.
0 commit comments