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 @@ -195,20 +195,25 @@ def test_non_blocking_handshake(self):
195
195
196
196
def test_get_server_certificate (self ):
197
197
with support .transient_internet ("svn.python.org" ):
198
- pem = ssl .get_server_certificate (("svn.python.org" , 443 ))
198
+ pem = ssl .get_server_certificate (("svn.python.org" , 443 ),
199
+ ssl .PROTOCOL_SSLv23 )
199
200
if not pem :
200
201
self .fail ("No server certificate on svn.python.org:443!" )
201
202
202
203
try :
203
- pem = ssl .get_server_certificate (("svn.python.org" , 443 ), ca_certs = CERTFILE )
204
+ pem = ssl .get_server_certificate (("svn.python.org" , 443 ),
205
+ ssl .PROTOCOL_SSLv23 ,
206
+ ca_certs = CERTFILE )
204
207
except ssl .SSLError as x :
205
208
#should fail
206
209
if support .verbose :
207
210
sys .stdout .write ("%s\n " % x )
208
211
else :
209
212
self .fail ("Got server certificate %s for svn.python.org!" % pem )
210
213
211
- pem = ssl .get_server_certificate (("svn.python.org" , 443 ), ca_certs = SVN_PYTHON_ORG_ROOT_CERT )
214
+ pem = ssl .get_server_certificate (("svn.python.org" , 443 ),
215
+ ssl .PROTOCOL_SSLv23 ,
216
+ ca_certs = SVN_PYTHON_ORG_ROOT_CERT )
212
217
if not pem :
213
218
self .fail ("No server certificate on svn.python.org:443!" )
214
219
if support .verbose :
You can’t perform that action at this time.
0 commit comments