diff 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
line wrap: on
line diff
--- a/mercurial/httpconnection.py	Sun May 15 11:32:11 2016 -0700
+++ b/mercurial/httpconnection.py	Sun May 15 11:38:38 2016 -0700
@@ -284,6 +284,6 @@
 
         con = HTTPConnection(host, port, use_ssl=True,
                              ssl_wrap_socket=sslutil.wrapsocket,
-                             ssl_validator=sslutil.validator(self.ui, host),
+                             ssl_validator=sslutil.validatesocket,
                              **kwargs)
         return con