webdav-client-python icon indicating copy to clipboard operation
webdav-client-python copied to clipboard

Being able to disable SSL verification or to specify a CA file

Open jcea opened this issue 9 years ago • 5 comments

I need to be able to specify a local CA file when connecting to a HTTPS webdav server because we use a local Certification Authority. I don't know how to do that with this webdav library. Is it ever possible?.

I don't want to disable TLS verification but would be nice to have the choice too.

Thanks.

jcea avatar Nov 28 '16 00:11 jcea

I am interested in such a feature as well!

wochinge avatar Dec 07 '16 16:12 wochinge

@jcea, @wochinge. Thank you for your attention. In the new version of the program will be added this feature.

while at the moment: https://github.com/designerror/webdav-client-python/tree/disable-ssl-verification

for install:

$ wget https://github.com/designerror/webdav-client-python/archive/disable-ssl-verification.zip
$ unzip disable-ssl-verification.zip 
$ cd webdav-client-python-disable-ssl-verification
$ python setup.py install

designerror avatar Dec 08 '16 06:12 designerror

I forked the project, as I probably need a whole bunch of of new features for an uni project (e.g. pipeling http requests, enhanced lists). Doing this, I enhanced the disable-ssl-verification branch, so that you can use the option params to turn these parameters on and off: https://github.com/wochinge/webdav-client-python/tree/disable-ssl-verification/

wochinge avatar Dec 08 '16 20:12 wochinge

I got around this by setting pycurl options directly:

client = wc.Client(options)
client.webdav.is_valid()
client.default_options['CAINFO'] = "cacert.pem"
client.default_options['SSL_VERIFYPEER'] = 1 
client.default_options['SSL_VERIFYHOST'] = 2 
client.list()

doctormo avatar May 14 '17 01:05 doctormo

in me:

client = wc.Client(options)
client.default_options['SSL_VERIFYHOST'] = 0
client.default_options['SSL_VERIFYPEER'] = 0
client.list()

zaytsev-ser-v avatar Aug 20 '19 16:08 zaytsev-ser-v