Closed morfeus77 closed 2 years ago
can you provide a code where i can test it?
i've added SSL support. I've tested https with requests module (included in new release). Check it and close if fixed.
Seems to work fine with import requests.
I was using urllib in my code (because requests wasn't yet available in a previous version).
Using urllib I still get an error example code:
import urllib.request as request
import urllib
REPO_URL = "https://api.github.com/repos/atrac17/MiSTer_Integer_Modelines/git/trees/main?recursive=1"
res=request.urlopen(REPO_URL)
Resulting in:
Traceback (most recent call last):
File "/usr/lib/python3.9/urllib/request.py", line 1346, in do_open
File "/usr/lib/python3.9/http/client.py", line 1257, in request
File "/usr/lib/python3.9/http/client.py", line 1303, in _send_request
File "/usr/lib/python3.9/http/client.py", line 1252, in endheaders
File "/usr/lib/python3.9/http/client.py", line 1012, in _send_output
File "/usr/lib/python3.9/http/client.py", line 952, in send
File "/usr/lib/python3.9/http/client.py", line 1426, in connect
File "/usr/lib/python3.9/ssl.py", line 500, in wrap_socket
File "/usr/lib/python3.9/ssl.py", line 1040, in _create
File "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)
To me this isn't a big deal, I'm happy to work without urllib (requests is better imho).
it seems error now is different. It doesn't like certificate. I will see if i can fix that for next release, just to keep it clean. There is also urllib3 available - not sure if it's useful.
to fix the error above you need to do this:
ln -s /etc/ssl/certs/cacert.pem /etc/ssl/cert.pem
i will add it in next release
urllib.error.URLError:
Most likely caused by SSL missing
"HTTPS support is only available if the socket module was compiled with SSL support."
Is it possible openssl was missing from the compile?