emericg / OpenSubtitlesDownload

Automatically find and download the right subtitles for your favorite videos!
https://emeric.io/OpenSubtitlesDownload
GNU General Public License v3.0
581 stars 63 forks source link

SSL cert validation fails on macos #49

Closed chka closed 4 years ago

chka commented 4 years ago

I'm on macos High Sierra and suddenly OSD stopped working giving me the ">> Unable to reach opensubtitles.org servers!" error. After a bit of debugging, I noticed that for some reason, it stopped accepting valid SSL certs, so I had to disable them globally by adding this:

import ssl

ssl._create_default_https_context = ssl._create_unverified_context

Obviously, this is an issue with my macos and the python installation and not with the script. I'm creating the task just in case, someone else has the same issues as me

emericg commented 4 years ago

Yes someone had this issue (#47) already. Looks like an issue with brew, the certificates should be packaged separately and updated automatically like linux distros are doing. Maybe to some extent they are, I don't know...

Apparently to get up to date certificates for your python installation, you can just do : brew reinstall openssl Or you can also just edit the osd_server address to use the non https version...

But honestly I don't know what's the best course of action here...

chka commented 4 years ago

Yes, that fixed it. Thank you