diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2013-02-24 15:36:15 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2013-02-24 15:36:15 +1300 |
commit | 97e11a219fb2a752d5b726b203874101d7ab651c (patch) | |
tree | c87ee6f48b83f211ea0b53ec38e23859e692d9fe /netlib/tcp.py | |
parent | c6f9a2d74dc0b2d9185743a02e4c1410983f0c3f (diff) | |
download | mitmproxy-97e11a219fb2a752d5b726b203874101d7ab651c.tar.gz mitmproxy-97e11a219fb2a752d5b726b203874101d7ab651c.tar.bz2 mitmproxy-97e11a219fb2a752d5b726b203874101d7ab651c.zip |
Housekeeping and cleanup, some minor argument name changes.
Diffstat (limited to 'netlib/tcp.py')
-rw-r--r-- | netlib/tcp.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py index 0a15d2ac..d909a5a4 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -179,17 +179,17 @@ class TCPClient: self.cert = None self.ssl_established = False - def convert_to_ssl(self, clientcert=None, sni=None, method=TLSv1_METHOD, options=None): + def convert_to_ssl(self, cert=None, sni=None, method=TLSv1_METHOD, options=None): """ - clientcert: Path to a file containing both client cert and private key. + cert: Path to a file containing both client cert and private key. """ context = SSL.Context(method) if options is not None: context.set_options(options) - if clientcert: + if cert: try: - context.use_privatekey_file(clientcert) - context.use_certificate_file(clientcert) + context.use_privatekey_file(cert) + context.use_certificate_file(cert) except SSL.Error, v: raise NetLibError("SSL client certificate error: %s"%str(v)) self.connection = SSL.Connection(context, self.connection) |