skaslev / gl3w

Simple OpenGL core profile loading
http://github.com/skaslev/gl3w
The Unlicense
705 stars 157 forks source link

fix SSL error #78

Open shelltdf opened 2 years ago

Kos commented 2 years ago

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

microdee commented 1 year ago

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 commented 1 year ago

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.