Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd85094

Browse filesBrowse files
authored
Merge pull request GoogleCloudPlatform#1365 from GoogleCloudPlatform/mqtt-tls12
Device samples changes
2 parents 7a96771 + 459522e commit cd85094
Copy full SHA for cd85094

File tree

Expand file treeCollapse file tree

3 files changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-3
lines changed

‎iot/api-client/http_example/cloudiot_http_example.py

Copy file name to clipboardExpand all lines: iot/api-client/http_example/cloudiot_http_example.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import jwt
3232
import requests
3333

34-
_BASE_URL = 'https://cloudiot-device.googleapis.com/v1beta1'
34+
_BASE_URL = 'https://cloudiotdevice.googleapis.com/v1'
3535
_BACKOFF_DURATION = 60
3636

3737

‎iot/api-client/http_example/cloudiot_http_example_test.py

Copy file name to clipboardExpand all lines: iot/api-client/http_example/cloudiot_http_example_test.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
pubsub_topic = 'projects/{}/topics/{}'.format(project_id, topic_id)
4040
registry_id = 'test-registry-{}'.format(int(time.time()))
4141

42-
_BASE_URL = 'https://cloudiot-device.googleapis.com/v1beta1'
42+
_BASE_URL = 'https://cloudiotdevice.googleapis.com/v1'
4343

4444

4545
@pytest.fixture(scope='module')

‎iot/api-client/mqtt_example/cloudiot_mqtt_example.py

Copy file name to clipboardExpand all lines: iot/api-client/mqtt_example/cloudiot_mqtt_example.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import datetime
2626
import os
2727
import random
28+
import ssl
2829
import time
2930

3031
import jwt
@@ -137,7 +138,7 @@ def get_client(
137138
project_id, private_key_file, algorithm))
138139

139140
# Enable SSL/TLS support.
140-
client.tls_set(ca_certs=ca_certs)
141+
client.tls_set(ca_certs=ca_certs, tls_version=ssl.PROTOCOL_TLSv1_2)
141142

142143
# Register message callbacks. https://eclipse.org/paho/clients/python/docs/
143144
# describes additional callbacks that Paho supports. In this example, the

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.