Closed Manishearth closed 7 years ago
This likely because you're using python <2.7.9, which doesn't have native SNI support[1]: http://docs.python-requests.org/en/master/community/faq/#what-are-hostname-doesn-t-match-errors
Try installing these: http://stackoverflow.com/a/18579484
Yeah, I'd seen that error and was looking into upgrading python on our servers. I was surprised that the older certificate was still showing, though, and thought that it was a fault with this script -- turns out it's because there are multiple domains on the same IP, and that's normal.
We're getting errors with https://joshmatthews.net/ (which was set up with this script) when trying to fetch it via python
urllib2
orrequests
on a server. (The server is an up-to-date Ubuntu 14.04, so it probably lacks some certificates)The same error happens with https://letsencrypt.daylightpirates.org/, the example site.
With urllib2, we get an HTTP 403 error. With
requests
, we get a clearer error message:Looking at https://www.ssllabs.com/ssltest/analyze.html?d=letsencrypt.daylightpirates.org (or https://www.ssllabs.com/ssltest/analyze.html?d=joshmatthews.net), it seems that there is a second certificate (see certificate #2), which is invalid. I'm not sure what's going on here, perhaps these steps don't wipe the older certificate? Something seems missing.