Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

requests declines certificate

I can access https://siscourses.ethz.ch/python_dbiol/data/logistic_data.txt with curl or within google chrome without any complaints about the certificate.

If I run

import requests
request.get("https://siscourses.ethz.ch/python_dbiol/data/logistic_data.txt")

I get

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)

What is going wrong here ? I could disable certificate validation, but would prefer to understand the underlying problem.

like image 437
rocksportrocker Avatar asked Dec 06 '25 01:12

rocksportrocker


1 Answers

"siscourses.ethz.ch" use SSL certificate from Let’s Encrypt, but isn't configurated to send complete certificate chain, intermediates certificate missed. It will work for chrome (on your computer) because you have successfully visited other websites using Let’s Encrypt, chrome cached the missing intermediates.

you could check this with ssllabs, or:

openssl s_client -showcerts -connect siscourses.ethz.ch:443
like image 185
georgexsh Avatar answered Dec 07 '25 13:12

georgexsh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!