synesthesiam/homeassistant-satellite

Certificate issues with aiohttp

Opened this issue · 6 comments

Hey all,
I am using a selfsigned certificate on my homeassistant install.

After installing the satelite on a different Pi I still get
ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')]

(Something in the likes of what is described here https://raspberrypi.stackexchange.com/questions/76419/entrusted-certificates-installation)

To try to fix then I pretty much took my CA cert and did trust it using the systems ca-certificate config... but that did not change anything for aiohttp unfortunatly...

Any pointers ?

Interestingly after I started to use my actual hostname (the one used in the certificate) I can get it to give a different error:

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host homeserver.bachi:8123 ssl:default [Network is unreachable]

Also strange, as I can ping it fine using that hostname. Also I am using this server and its self signed cert fine on my IOS devices (with the root cert installed there)

Hm another option for a cert? Or one for skip verify?

Probably skip verification to start.

My temporary solution for this issue was by changing line 27 in /homeassistant-satellite/homeassistant_satellite/remote.py

from
async with aiohttp.ClientSession() as session:

to

async with aiohttp.ClientSession(connector=aiohttp.TCPConnector(verify_ssl=False)) as session:

Nice, I added a PR