linkedin / pyexchange

Python wrapper for Microsoft Exchange
Apache License 2.0
152 stars 98 forks source link

no content with SSL: CERTIFICATE_VERIFY_FAILED error #53

Open nlamirault opened 9 years ago

nlamirault commented 9 years ago

i try to list events. If i've got an error of type CERTIFICATE_VERIFY_FAILED, the library failed :

File "/venv/lib/python2.7/site-packages/pyexchange/connection.py", line 67, in send
    log.debug(err.response.content)
AttributeError: 'NoneType' object has no attribute 'content'

It works with : log.debug(err)

pyexchange.exceptions.FailedExchangeException: Unable to connect to Exchange: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
busilogic commented 8 years ago

I'm having similar issue. Any resolution on this?

mieubrisse commented 8 years ago

Relevant: #38 and #42

The quick and dirty fix is to change line 64 of connection.py to be:

response = self.session.post(self.url, data=body, headers=headers, verify=False)

joelbyrnes commented 7 years ago
connection = ExchangeNTLMAuthConnection(url=URL,
                                        username=USERNAME,
                                        password=PASSWORD)
connection.session = connection.build_session()
connection.session.verify = "keychain.int.pem"