comparison mercurial/sslutil.py @ 35369:c8ecd96cc357

py3: handle keyword arguments correctly in sslutil.py Differential Revision: https://phab.mercurial-scm.org/D1642
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 10 Dec 2017 04:48:59 +0530
parents 17919e9006b9
children 72b91f905065
comparison
equal deleted inserted replaced
35368:93c4958d987c 35369:c8ecd96cc357
94 # server_hostname is unique to SSLContext.wrap_socket and is used 94 # server_hostname is unique to SSLContext.wrap_socket and is used
95 # for SNI in that context. So there's nothing for us to do with it 95 # for SNI in that context. So there's nothing for us to do with it
96 # in this legacy code since we don't support SNI. 96 # in this legacy code since we don't support SNI.
97 97
98 args = { 98 args = {
99 'keyfile': self._keyfile, 99 r'keyfile': self._keyfile,
100 'certfile': self._certfile, 100 r'certfile': self._certfile,
101 'server_side': server_side, 101 r'server_side': server_side,
102 'cert_reqs': self.verify_mode, 102 r'cert_reqs': self.verify_mode,
103 'ssl_version': self.protocol, 103 r'ssl_version': self.protocol,
104 'ca_certs': self._cacerts, 104 r'ca_certs': self._cacerts,
105 'ciphers': self._ciphers, 105 r'ciphers': self._ciphers,
106 } 106 }
107 107
108 return ssl.wrap_socket(socket, **args) 108 return ssl.wrap_socket(socket, **args)
109 109
110 def _hostsettings(ui, hostname): 110 def _hostsettings(ui, hostname):