Skip to content

Commit 3ec8364

Browse files
committed
Release of version 1.4.4
1 parent 875fe1a commit 3ec8364

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

AWSIoTPythonSDK/MQTTLib.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ def connect(self, keepAliveIntervalSecond=600):
473473
474474
**Parameters**
475475
476-
*keepAliveIntervalSecond* - Time in seconds for interval of sending MQTT ping request.
476+
*keepAliveIntervalSecond* - Time in seconds for interval of sending MQTT ping request.
477+
A shorter keep-alive interval allows the client to detect disconnects more quickly.
477478
Default set to 600 seconds.
478479
479480
**Returns**

AWSIoTPythonSDK/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = "1.4.3"
1+
__version__ = "1.4.4"
22

33

AWSIoTPythonSDK/core/greengrass/discovery/providers.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,20 @@ def _create_tcp_connection(self):
245245

246246
def _create_ssl_connection(self, sock):
247247
self._logger.debug("Creating ssl connection...")
248+
249+
ssl_protocol_version = ssl.PROTOCOL_SSLv23
250+
251+
if self._port == 443:
252+
ssl.set_alpn_protocols(['x-amzn-http-ca'])
253+
#note: ALPN is a TLS 1.2 and later feature
254+
248255
ssl_sock = ssl.wrap_socket(sock,
249256
certfile=self._cert_path,
250257
keyfile=self._key_path,
251258
ca_certs=self._ca_path,
252259
cert_reqs=ssl.CERT_REQUIRED,
253-
ssl_version=ssl.PROTOCOL_SSLv23)
260+
ssl_version=ssl_protocol_version)
261+
254262
self._logger.debug("Matching host name...")
255263
if sys.version_info[0] < 3 or (sys.version_info[0] == 3 and sys.version_info[1] < 2):
256264
self._tls_match_hostname(ssl_sock)

0 commit comments

Comments
 (0)