Skip to content

Commit 839c7de

Browse files
committed
set to no cert verification on client init (#71)
1 parent 13d197d commit 839c7de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pywis_pubsub/mqtt.py

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from copy import deepcopy
2323
import logging
2424
import random
25+
import ssl
2526
from typing import Any, Callable
2627
from urllib.parse import urlparse
2728

@@ -91,6 +92,10 @@ def __init__(self, broker: str, options: dict = {}) -> None:
9192
tls_settings = {
9293
'tls_version': 2
9394
}
95+
96+
if not options.get('verify_certs'):
97+
tls_settings['cert_reqs'] = ssl.CERT_NONE
98+
9499
LOGGER.debug(f'TLS settings: {tls_settings}')
95100
if options.get('certfile') is not None:
96101
LOGGER.debug('Setting TLS certfile')

0 commit comments

Comments
 (0)