Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SSL error #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix SSL error #78

wants to merge 1 commit into from

Conversation

shelltdf
Copy link

No description provided.

@Kos
Copy link

Kos commented Sep 13, 2022

This just disables signature verification completely, why do you need to do it? What error are you experiencing?

@microdee
Copy link

microdee commented Feb 28, 2023

I can confirm. Before this "fix" urllib2 complains about expired SSL certificates (at least on an up to date Windows 10), and imo compiling with headers from "unverified sources" is still better than not compiling at all.

@pierre-dejoue
Copy link

pierre-dejoue commented Aug 15, 2023

I ran into a similar issue yesterday. For context, I'm using Git bash on Windows. I got the following error while running the script: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired

The way I solved it was to use a different SSL context:

import certifi
import ssl

...

certifi_context = ssl.create_default_context(cafile=certifi.where())
web = urllib2.urlopen(urllib2.Request(url, headers={'User-Agent': 'Mozilla/5.0'}), context=certifi_context)

(That requires pip install certifi)

I'm writing here only to share the information. I have no opinion regarding if, and how, the main project should handle the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants