Skip to content

Commit

Permalink
feat: expose paho tls_insecure_set(bool)
Browse files Browse the repository at this point in the history
  • Loading branch information
steersbob committed Jul 24, 2023
1 parent 33a9d9a commit 36a8ce5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aiomqtt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ class Client:
automatically.
tls_context: The SSL/TLS context.
tls_params: The SSL/TLS configuration to use.
tls_insecure: Enable/disable server hostname verification when using SSL/TLS.
proxy: Configure a proxy for the connection.
protocol: The version of the MQTT protocol.
will: The will message to publish if the client disconnects unexpectedly.
Expand Down Expand Up @@ -339,6 +340,7 @@ def __init__( # noqa: C901, PLR0912, PLR0913, PLR0915
client_id: str | None = None,
tls_context: ssl.SSLContext | None = None,
tls_params: TLSParameters | None = None,
tls_insecure: bool | None = None,
proxy: ProxySettings | None = None,
protocol: ProtocolVersion | None = None,
will: Will | None = None,
Expand Down Expand Up @@ -442,6 +444,9 @@ def __init__( # noqa: C901, PLR0912, PLR0913, PLR0915
keyfile_password=tls_params.keyfile_password,
)

if tls_insecure is not None:
self._client.tls_insecure_set(tls_insecure)

if proxy is not None:
self._client.proxy_set(**proxy.proxy_args)

Expand Down

0 comments on commit 36a8ce5

Please sign in to comment.