File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -52,17 +52,17 @@ async def connect(self) -> None:
5252 self .client .set_auth_credentials (username = self .configuration .mqtt_user )
5353
5454 if self .transport_protocol .with_tls :
55+ ssl_context = ssl .create_default_context ()
5556 cert_uri = self .configuration .tls_server_cert_path
5657 LOG .debug (
5758 f"Configuring network encryption and authentication options for MQTT using { cert_uri } "
5859 )
59- ssl_context = ssl .SSLContext ()
6060 if cert_uri :
6161 ssl_context .load_verify_locations (cafile = cert_uri )
6262 ssl_context .check_hostname = False
6363 else :
6464 LOG .debug (f"Custom certificate chain not provided, using default" )
65- ssl_context = True # Use default SSL context if no cert is provided
65+
6666 else :
6767 ssl_context = None
6868 await self .client .connect (
You can’t perform that action at this time.
0 commit comments