Allow acceptance of invalid ssl certificates
Status: Beta
Brought to you by:
scaryclam
Currently an invalid SSL certificate causes an error within the httplib2 library. A variable can be set to disable certificate validation in the httplib2.http() class.
Obviously certificate checking should be enabled by default. I propose the following patches:
24a25
self.check_cert = settings['check_cert']28c29
< self.httpcon = httplib2.Http()
self.httpcon = httplib2.Http(disable_ssl_certificate_validation=self.check_cert)
17c17
< def init(self, webdav_server_uri, webdav_path='.', port=80, realm=''):
def __init__(self, webdav_server_uri, webdav_path='.', port=80, realm='',cert=True):27c27
< port=port, realm=realm)
port=port, realm=realm, check_cert=cert)
Hi,
The project is now maintained over on github (https://github.com/scaryclam/python-webdav) so I've duplicated the issue there.
I see no problem with allowing developers to turn off the certification checking so I'll accept the changes.
It's also worth noting that the library is now using requests instead of httplib2. I've created a branch on github for httplib2 with your proposed changes, just in case you still need to use httplib2 in your setup: https://github.com/scaryclam/python-webdav/tree/release/httplib2
Last edit: ScaryClam 2013-12-18