Sun, 15 May 2016 11:38:38 -0700 sslutil: convert socket validation from a class to a function (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 15 May 2016 11:38:38 -0700] rev 29227
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.
Sun, 15 May 2016 11:32:11 -0700 sslutil: store and use hostname and ui in socket instance
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 15 May 2016 11:32:11 -0700] rev 29226
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.
Sun, 15 May 2016 11:25:07 -0700 sslutil: use a dict for hanging hg state off the wrapped socket
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 15 May 2016 11:25:07 -0700] rev 29225
sslutil: use a dict for hanging hg state off the wrapped socket I plan on introducing more state on the socket instance. Instead of using multiple variables, let's just use one to minimize risk of name collision.
Thu, 05 May 2016 19:10:18 -0700 sslutil: require serverhostname argument (API)
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 May 2016 19:10:18 -0700] rev 29224
sslutil: require serverhostname argument (API) All callers now specify it. So we can require it. Requiring the argument means SNI will always work if supported by Python. The main reason for this change is to store state on the socket instance to make the validation function generic. This will be evident in subsequent commits.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -4 +4 +10 +30 +100 +300 +1000 +3000 +10000 tip