X0R0X / cli-torrent-dl

CLI utility to search and download torrents from major torrent sites
Other
118 stars 10 forks source link

SSL: Certificate Verify Failed. #31

Closed abaj8494 closed 2 years ago

abaj8494 commented 2 years ago

I have tried numerous times to fix this and don't understand how to do so. Any advice is welcome.

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'nyaa.si'. (_ssl.c:997)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/alarm/software/cli-torrent-dl/tordl/core.py", line 105, in search
    response = await self._get_url(
  File "/home/alarm/software/cli-torrent-dl/tordl/core.py", line 124, in _get_url
    async with sess.get(
  File "/home/alarm/software/cli-torrent-dl/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 1117, in __aenter__
    self._resp = await self._coro
  File "/home/alarm/software/cli-torrent-dl/.venv/lib/python3.10/site-packages/aiohttp/client.py", line 520, in _request
    conn = await self._connector.connect(
  File "/home/alarm/software/cli-torrent-dl/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 535, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/home/alarm/software/cli-torrent-dl/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 892, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/home/alarm/software/cli-torrent-dl/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection
    raise last_exc
  File "/home/alarm/software/cli-torrent-dl/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/home/alarm/software/cli-torrent-dl/.venv/lib/python3.10/site-packages/aiohttp/connector.py", line 971, in _wrap_create_connection
    raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host nyaa.si:443 ssl:True [SSLCertVerificationError: (1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'nyaa.si'. (_ssl.c:997)")]
Mr-ROPer commented 2 years ago

Hi.

What is your OS? I am able to receive results from nyaa, so it is likely something to do with your installaion.

abaj8494 commented 2 years ago

Hi.

What is your OS? I am able to receive results from nyaa, so it is likely something to do with your installaion.

Thanks for the reply mate. It seems that this error occurs when I am using tordl via my eth0 card. It works perfectly on wlan0. How curious!

Mr-ROPer commented 2 years ago

How strange. Well, glad it's working for you somehow.