Infura IPFS SSL certificate verification fails
See original GitHub issueHello!
I just updated to ipfshttpclient
from py-ipfs-api
and now all Infura IPFS requests are failing.
Infura IPFS multiaddr:
self.base_uri = "/dns/ipfs.infura.io/tcp/5001/https"
(I’ve also tried with /dns4/
)
Connecting to Infura IPFS
self.client = ipfshttpclient.connect(self.base_uri)
Stack trace:
ethpm/backends/ipfs.py:60: in __init__
self.client = ipfshttpclient.connect(self.base_uri)
venv/lib/python3.6/site-packages/ipfshttpclient/client/__init__.py:102: in connect
assert_version(client.version()['Version'])
venv/lib/python3.6/site-packages/ipfshttpclient/client/base.py:15: in wrapper
result = func(*args, **kwargs)
venv/lib/python3.6/site-packages/ipfshttpclient/client/miscellaneous.py:204: in version
return self._client.request('/version', decoder='json', **kwargs)
venv/lib/python3.6/site-packages/ipfshttpclient/http.py:44: in wrapper
return func(self, *args, **merged)
venv/lib/python3.6/site-packages/ipfshttpclient/http.py:364: in request
files, headers, data, timeout=timeout)
venv/lib/python3.6/site-packages/ipfshttpclient/http.py:282: in _request
timeout=timeout)
venv/lib/python3.6/site-packages/ipfshttpclient/http.py:249: in _do_request
six.raise_from(exceptions.ConnectionError(error), error)
<string>:3: in raise_from
???
E ipfshttpclient.exceptions.ConnectionError: SSLError: HTTPSConnectionPool(host='ipfs.infura.io', port=5001): Max retries exceeded with url: /api/v0/version?stream-channels=true (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
I’m not sure what’s the cause for the SSL certificate verification failure. There doesn’t seem to be any problem with infura’s ssl certificates. It appears that the multiaddr is being correctly parsed, since the request is being made to https://ipfs.infura.io:5001/api/v0/version.
I’ve tried adding Infura’s CA to certifi
’s cacert.pem
without any luck.
I’ve also tried hard-coding requests.request
’s verify
parameter to False
just to see if it works, but no luck.
Any thoughts or ideas on get these requests working again would be great, cheers!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
I have pushed version 0.4.12 just now that should resolve this issue. Thanks for reporting this!
Fix is in the pipeline: #185