In bzrlib/transport/http/_urllib2_wrappers.py there is a bit of unnecessary code which fails for SNI situations. The attached patch removes the bad check.
httplib.HTTPSConnection.__init__ already does the correct check. I have tested this against https://wrong.host.badssl.com/ with my patch applied, and things fail properly.
In bzrlib/ transport/ http/_urllib2_ wrappers. py there is a bit of unnecessary code which fails for SNI situations. The attached patch removes the bad check.
httplib. HTTPSConnection .__init_ _ already does the correct check. I have tested this against https:/ /wrong. host.badssl. com/ with my patch applied, and things fail properly.