Skip to content

Commit d806387

Browse files
authored
Merge pull request #462 from SAIC-iSmart-API/fix/tls-insecure-requires-custom-ca
fix(tls): warn on hostname-check bypass regardless of custom CA cert
2 parents 923038a + c16515e commit d806387

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/publisher/mqtt_publisher.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ async def __run_loop(self) -> None:
7070
ssl_context.load_verify_locations(
7171
cafile=self.configuration.tls_server_cert_path
7272
)
73-
if not self.configuration.tls_server_cert_check_hostname:
74-
LOG.warning(
75-
f"Skipping hostname check for TLS connection to {self.host}"
76-
)
73+
if not self.configuration.tls_server_cert_check_hostname:
74+
LOG.warning(
75+
f"Skipping hostname check for TLS connection to {self.host}"
76+
)
7777

7878
client = aiomqtt.Client(
7979
hostname=self.host,

0 commit comments

Comments
 (0)