diff mercurial/url.py @ 25415:21b536f01eda

ssl: prompt passphrase of client key file via ui.getpass() (issue4648) This is necessary to communicate with third-party tools through command-server channel. This requires SSLContext backported to Python 2.7.9+. It doesn't look nice to pass ui by sslkwargs, but I think it is the only way to do without touching various client codes including httpclient (aka http2). ui is mandatory if certfile is specified, so it has no default value. BTW, test-check-commit-hg.t complains that ssl_wrap_socket() has foo_bar naming. Should I bulk-replace it to sslwrapsocket() ?
author Yuya Nishihara <yuya@tcha.org>
date Thu, 07 May 2015 17:15:24 +0900
parents f7ccbc2776b7
children 9d1c61715939
line wrap: on
line diff
--- a/mercurial/url.py	Thu May 07 17:02:20 2015 +0900
+++ b/mercurial/url.py	Thu May 07 17:15:24 2015 +0900
@@ -175,7 +175,7 @@
             self.sock.connect((self.host, self.port))
             if _generic_proxytunnel(self):
                 # we do not support client X.509 certificates
-                self.sock = sslutil.ssl_wrap_socket(self.sock, None, None,
+                self.sock = sslutil.ssl_wrap_socket(self.sock, None, None, None,
                                                     serverhostname=self.host)
         else:
             keepalive.HTTPConnection.connect(self)