Fix --inseure switch, reverse the param logic
By default, we do want to verify the SSL certificates and because of that default value of disable_ssl_certificate_validation=False. When user pass --insecure switch we need to revers the value of disable_ssl_certificate_validation variable, otherwise we end up with SSL CERTIFICATE_VERIFY_FAILED exception. Story: 2011014 Task: 49439 Change-Id: Idc2be63f5a88829c2f4ca691cabe57fa688d3768
This commit is contained in:
parent
77977988cd
commit
6ce6dc67f8
|
@ -59,9 +59,7 @@ class Credentials(object):
|
|||
self.ca_certs = self.verify
|
||||
self._conf.set('identity', 'ca_certificates_file', self.ca_certs)
|
||||
else:
|
||||
self.disable_ssl_certificate_validation = self._conf.get_defaulted(
|
||||
'identity', 'disable_ssl_certificate_validation'
|
||||
)
|
||||
self.disable_ssl_certificate_validation = not self.verify
|
||||
self.ca_certs = self._conf.get_defaulted('identity',
|
||||
'ca_certificates_file')
|
||||
self._conf.set('identity', 'disable_ssl_certificate_validation',
|
||||
|
|
Loading…
Reference in New Issue