Mercurial > hg
diff mercurial/url.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 |
line wrap: on
line diff
--- a/mercurial/url.py Sun May 15 11:32:11 2016 -0700 +++ b/mercurial/url.py Sun May 15 11:38:38 2016 -0700 @@ -356,7 +356,7 @@ self.sock = sslutil.wrapsocket( self.sock, self.key_file, self.cert_file, serverhostname=host, **sslutil.sslkwargs(self.ui, host)) - sslutil.validator(self.ui, host)(self.sock) + sslutil.validatesocket(self.sock) class httpshandler(keepalive.KeepAliveHandler, urlreq.httpshandler): def __init__(self, ui):