sslutil: restore old behavior not requiring a hostname argument (issue5210) stable
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 30 Apr 2016 09:26:47 -0700
branchstable
changeset 29042 693b856a4d45
parent 29041 b962ae0a0a05
child 29043 cf7de4aeb86b
sslutil: restore old behavior not requiring a hostname argument (issue5210) This effectively backs out changeset 1fde84d42f9c. The http library behind ui.http2=true isn't specifying the hostname. It is the day before the expected 3.8 release and we don't want to ship a regression. I'll try to restore this requirement in the 3.9 release cycle as part of planned improvements to Mercurial's SSL/TLS interactions.
mercurial/sslutil.py
--- a/mercurial/sslutil.py	Thu Apr 28 16:38:15 2016 -0500
+++ b/mercurial/sslutil.py	Sat Apr 30 09:26:47 2016 -0700
@@ -120,9 +120,6 @@
       server (and client) support SNI, this tells the server which certificate
       to use.
     """
-    if not serverhostname:
-        raise error.Abort('serverhostname argument required')
-
     # Despite its name, PROTOCOL_SSLv23 selects the highest protocol
     # that both ends support, including TLS protocols. On legacy stacks,
     # the highest it likely goes in TLS 1.0. On modern stacks, it can