dancingcactus / python-omniture

A high-level Python wrapper for the Adobe Omniture API.
MIT License
89 stars 52 forks source link

SSL verification failure #80

Open bhdavis1978 opened 7 years ago

bhdavis1978 commented 7 years ago

Hi, I'm getting an SSLError, specifically

SSLError: HTTPSConnectionPool(host='api.omniture.com', port=443): Max retries exceeded with url: /admin/1.4/rest/?method=Company.GetReportSuites (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))

The problem is because I'm behind a firewall and I need to specify an alternate SSL certificate OR disable the SSL certificate checking altogether, but I don't know how to do it in this case. Can someone help me out?

Thanks, Brad

bhdavis1978 commented 7 years ago

I've found a partial solution to this problem. `import requests.api import warnings

def requestspatch(method, url, kwargs): kwargs['verify'] = False return _origcall(method, url, kwargs)

_origcall = requests.api.request requests.api.request = requestspatch warnings.warn('Pathched requests: SSL verification disabled!')`

This allows the code to run by ignoring the error, but it's not a perfect solution.

jorwoods commented 6 years ago

Are you running this from behind a corporate firewall? You may need to add your companies certificate to your local certifi.