diff mercurial/byterange.py @ 29226:33006bd6a1d7

sslutil: store and use hostname and ui in socket instance Currently, we pass a hostname and ui to sslutil.wrap_socket() then create a separate sslutil.validator instance also from a hostname and ui. There is a 1:1 mapping between a wrapped socket and a validator instance. This commit lays the groundwork for making the validation function generic by storing the hostname and ui instance in the state dict attached to the socket instance and then using these variables in the validator function. Since the arguments to sslutil.validator.__init__ are no longer used, we make them optional and make __init__ a no-op.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 15 May 2016 11:32:11 -0700
parents 032c4c2f802a
children 0fa781320203
line wrap: on
line diff