Mercurial > public > mercurial-scm > hg
comparison mercurial/httpconnection.py @ 29227:dffe78d80a6c
sslutil: convert socket validation from a class to a function (API)
Now that the socket validator doesn't have any instance state,
we can make it a generic function.
The "validator" class has been converted into the "validatesocket"
function and all consumers have been updated.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 15 May 2016 11:38:38 -0700 |
parents | 032c4c2f802a |
children | e6de6ef3e426 |
comparison
equal
deleted
inserted
replaced
29226:33006bd6a1d7 | 29227:dffe78d80a6c |
---|---|
282 | 282 |
283 kwargs.update(sslutil.sslkwargs(self.ui, host)) | 283 kwargs.update(sslutil.sslkwargs(self.ui, host)) |
284 | 284 |
285 con = HTTPConnection(host, port, use_ssl=True, | 285 con = HTTPConnection(host, port, use_ssl=True, |
286 ssl_wrap_socket=sslutil.wrapsocket, | 286 ssl_wrap_socket=sslutil.wrapsocket, |
287 ssl_validator=sslutil.validator(self.ui, host), | 287 ssl_validator=sslutil.validatesocket, |
288 **kwargs) | 288 **kwargs) |
289 return con | 289 return con |