diff options
author | Ashley McKemie <ashley@datafiniti.net> | 2016-07-08 09:43:27 -0500 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2016-07-08 07:43:27 -0700 |
commit | 58991c5fa24076a644a9e682cb865b48b8a736ba (patch) | |
tree | 430baa3deddb345bc3eaa98d59a0adf24b0a2cf2 /kafka/conn.py | |
parent | 455001d3a88aed6bed981a804d7c68a299ba8d8a (diff) | |
download | kafka-python-58991c5fa24076a644a9e682cb865b48b8a736ba.tar.gz |
Add ssl_password to default_config dicts. Send ssl_password when loading cert chains (#750)
Diffstat (limited to 'kafka/conn.py')
-rw-r--r-- | kafka/conn.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kafka/conn.py b/kafka/conn.py index 25c1441..0418bc5 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -71,6 +71,7 @@ class BrokerConnection(object): 'ssl_certfile': None, 'ssl_keyfile': None, 'ssl_crlfile': None, + 'ssl_password': None, 'api_version': (0, 8, 2), # default to most restrictive 'state_change_callback': lambda conn: True, } @@ -228,7 +229,8 @@ class BrokerConnection(object): log.info('%s: Loading SSL Key from %s', str(self), self.config['ssl_keyfile']) self._ssl_context.load_cert_chain( certfile=self.config['ssl_certfile'], - keyfile=self.config['ssl_keyfile']) + keyfile=self.config['ssl_keyfile'], + password=self.config['ssl_password']) if self.config['ssl_crlfile']: if not hasattr(ssl, 'VERIFY_CRL_CHECK_LEAF'): log.error('%s: No CRL support with this version of Python.' |