Files
deb-python-pyvmomi/pyVim
tianhao he a010a38196 Do not verify SSL certificates for local connections
1) modifies several pyVim.connect methods to silently disable
SSL verification when connecting to localhost, and
2) adds a small patch to site.py to make it easier to test
this configuration by not throwing away the one good SSL
configuration. I use this patch below to test my change.

Testing Done:
$ python
>>> import ssl
>>> ssl._create_default_https_context = ssl._create_verified_context
>>> from pyVim.connect import SmartConnect
>>> s = SmartConnect() # default host='localhost', no error
>>> s = SmartConnect(host='localhost') # no error
>>> s = SmartConnect(host='127.0.0.1') # no error
>>> s = SmartConnect(host='kevinc-esx.eng.vmware.com')
Traceback (most recent call last):
...
ssl.CertificateError: hostname 'kevinc-esx.eng.vmware.com' doesn't match 'localhost.localdomain'
2016-04-19 10:56:52 -07:00
..
2013-12-14 13:36:09 -05:00
2016-04-19 10:34:26 -07:00