api: Warn when SSL/TLS validation is disabled.

This commit is contained in:
Yago González 2018-05-13 20:30:31 +02:00 committed by Tim Abbott
parent d85792524e
commit e9a518e93e

View file

@ -392,6 +392,9 @@ class Client(object):
self.client_name = client
if insecure:
logger.warning('Insecure mode enabled. The server\'s SSL/TLS '
'certificate will not be validated, making the '
'HTTPS connection potentially insecure')
self.tls_verification = False # type: Union[bool, str]
elif cert_bundle is not None:
if not os.path.isfile(cert_bundle):