rocksportrocker
rocksportrocker

Reputation: 7429

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.

Upvotes: 3

Views: 495

Answers (1)

georgexsh
georgexsh

Reputation: 16634

"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

Upvotes: 4

Related Questions