Skip to content

Commit ee774fc

Browse files
authored
Merge pull request #1395 from noerog/patch-2
Import ssl, set TLS v1.2
2 parents b56ac42 + 07659b2 commit ee774fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

iot/api-client/end_to_end_example/cloudiot_pubsub_example_mqtt_device.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import datetime
4646
import json
4747
import os
48+
import ssl
4849
import time
4950

5051
import jwt
@@ -208,7 +209,7 @@ def main():
208209
args.project_id,
209210
args.private_key_file,
210211
args.algorithm))
211-
client.tls_set(ca_certs=args.ca_certs)
212+
client.tls_set(ca_certs=args.ca_certs, tls_version=ssl.PROTOCOL_TLSv1_2)
212213

213214
device = Device()
214215

0 commit comments

Comments
 (0)