diff --git a/kafka/conn.py b/kafka/conn.py index cac354875..bde01a819 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -463,6 +463,7 @@ def _wrap_ssl(self): if self._ssl_context is None: log.debug('%s: configuring default SSL Context', self) self._ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) # pylint: disable=no-member + self._ssl_context.minimum_version = ssl.TLSVersion.TLSv1_2 self._ssl_context.options |= ssl.OP_NO_SSLv2 # pylint: disable=no-member self._ssl_context.options |= ssl.OP_NO_SSLv3 # pylint: disable=no-member self._ssl_context.verify_mode = ssl.CERT_OPTIONAL