Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upcertifi-2015.9.6.1 and 2015.9.6.2 fail verification #26
Comments
This comment has been minimized.
This comment has been minimized.
|
I suspect that Amazon is passing you a cross-signed certificate. Per this blog post I wrote in April, cross-signed roots represent a problem for older versions of OpenSSL because versions of OpenSSL prior to 1.0.2 are not able to trust non-self-signed root certificates. Also per that blog post, the most recent version of certifi primarily contains a bundle that does not include the cross-signed roots. If you try replacing your call to However, please note that at some time in the next few months |
This comment has been minimized.
This comment has been minimized.
To be fair, I don't think any of these companies will stop supplying such a certificate any time soon. I'm also not entirely convinced that everyone can upgrade to OpenSSL 1.0.2 easily. Perhaps we should schedule the removal of |
This comment has been minimized.
This comment has been minimized.
|
@sigmavirus24 That would be entirely reasonable. I already delayed the timeline from that blog post (the switch I claimed I'd make in May I instead made on Sunday), so I'm happy to further delay the removal of the cross-signed roots. |
This comment has been minimized.
This comment has been minimized.
j0hnsmith
commented
Sep 7, 2015
|
I've just encountered this issue, with
Gives me After I uninstall certifi the above code runs without any errors. I'm using Ubuntu 14.04 and if I try to update openssl via apt-get I get
|
Lukasa
changed the title
certifi-2015.9.6.1 excludes amazon's CA?
certifi-2015.9.6.1 and 2015.9.6.2 fail verification
Sep 7, 2015
This comment has been minimized.
This comment has been minimized.
|
Yup, requests by default uses the most recent trust bundle it can find, and cannot fall back to the old bundle. If you want to keep certifi installed, set |
This comment has been minimized.
This comment has been minimized.
ndparker
commented
Sep 7, 2015
|
This is not really a feasable solution, given a code base scattered with requests calls all over the place :/ |
This comment has been minimized.
This comment has been minimized.
|
@ndparker And I take it upgrading to OpenSSL 1.0.2 is also unfeasible? |
This comment has been minimized.
This comment has been minimized.
moser
commented
Sep 7, 2015
|
In your blog post you state that "By default, the more secure bundle will be used...". This might well be true, but I am afraid that not many people will go through the pain of getting OpenSSL 1.0.2 on their production systems (I'd assume that A LOT of people deploy to Ubuntu LTS or Debian Stable). |
This comment has been minimized.
This comment has been minimized.
ndparker
commented
Sep 7, 2015
|
Yes. ubuntu 14.04 is running here as well. And it's unlikely to upgrade. |
This comment has been minimized.
This comment has been minimized.
|
@ndparker In that case, I recommend running @moser Right now I've begun a planned deprecation with a time period of at least three months, and I have not yet committed to any specific date to remove the However, a user who is using certifi presumably is hoping for somewhat regular updates for security purposes. It defeats those security purposes to keep old, weak certificates in the bundle. The 1024-bit roots were removed for a reason. Given that I have to provide both, it seems to me to be totally defensible to go secure-by-default: I would much rather say that I handed you an unloaded gun and a bullet and you loaded it, pointed it at your foot, and shot yourself, than say that I handed you a loaded gun pointed at your foot and said "don't forget to take the bullet out!". There are many ways to resolve this problem, as detailed in this issue. I am open to committing to providing the weak bundle until Ubuntu 16.04 is released, which will presumably carry OpenSSL 1.0.2. I am also open to providing tooling to allow people to deliberately weaken a cert bundle provided by If you don't want to get OpenSSL 1.0.2 on your system, that's fine. However, by default I'd like to make it easy to do the right thing and harder to do the wrong thing, and in this case the right thing is to remove the 1024 bit roots. Mozilla removed them one year ago this month: it's about time we caught up. |
This comment has been minimized.
This comment has been minimized.
|
So, on the whole I agree with @Lukasa. I'm interested in understanding why people who are apparently installing requests from PyPI in production on LTS releases of Ubuntu/Debian are also installing certifi and yet expecting an insecure default. Ubuntu 14.04 ships with requests 2.2.1 by default in its archives and will correctly link you to your system certificate bundle (which, by the way will soon also exclude these certificates, if they haven't already removed them in their latest non-LTS releases). I'd like to understand the reasoning personally because I'd like to help find a good solution if one exists. |
This comment has been minimized.
This comment has been minimized.
ndparker
commented
Sep 7, 2015
|
For my part that's easy. We use virtualenv-installs using a simple dependency on requests. And requests (or maybe some other dependency, I didn't really check) pulls in certifi (apparently). Today I actually found out that this package exists at all :-) |
This comment has been minimized.
This comment has been minimized.
ndparker
commented
Sep 7, 2015
|
@Lukasa right now I've pinned certifi to the old version in order to stop our production environment from working at all. I still need to finally explore the alternatives. |
This comment has been minimized.
This comment has been minimized.
|
@ndparker requests does not pull in certifi. Something else must be doing that for you. |
This comment has been minimized.
This comment has been minimized.
ndparker
commented
Sep 7, 2015
|
Ok, I digged a bit. We have two packages requiring certifi here: tornado and ... setuptools (optional, but duh!). |
This comment has been minimized.
This comment has been minimized.
moser
commented
Sep 8, 2015
|
I also thought that certifi was a dependency of requests, a short look at the web pages misleads you there. Thus my argumentation. Given this new info I agree with your point. btw. thanks for being far responsive to the issue :-) |
This comment has been minimized.
This comment has been minimized.
|
@moser No problem: it's really important for us to be responsive here because this issue will cause people problems. I'm not happy about it (I don't want to make anyone's life hard if I can possibly avoid it), but given the ever-increasing importance of TLS I think it's important that we do the best we can to keep it secure. Just so everyone knows, it's my intention to leave this issue open for the time being to center discussion here. For that reason it might get noisy: if you are satisfied you no longer have any problems, I highly recommend you unsubscribe! |
This comment has been minimized.
This comment has been minimized.
kalekseev
commented
Sep 8, 2015
|
paypal.com same problem, so libs like django-paypal stop working.
|
This comment has been minimized.
This comment has been minimized.
|
@kalekseev As discussed above, this is intentional: please use one of the mitigation strategies I mentioned in the previous posts. |
This comment has been minimized.
This comment has been minimized.
ipartola
commented
Sep 8, 2015
|
@Lukasa: Just was bit by this issue. Unfortunately, I am running Ubuntu Trusty (14.04) which is the latest LTS release and OpenSSL is pinned to 1.0.1f, so that upgrade won't work. Would it be possible to make any such future changes start out as opt-in first? |
This comment has been minimized.
This comment has been minimized.
jdanbrown
commented
Sep 8, 2015
|
We were also bit by this over the weekend. It broke some daily pipeline jobs that launch new nodes on each run which |
This comment has been minimized.
This comment has been minimized.
Yes, in principle, but it's hard to do. For example, when do we switch over to opt-out? When the next Ubuntu LTS comes out? What makes Ubuntu so special, RHEL and Debian have LTS releases. When no LTS release has an old OpenSSL? That would mean waiting 20 years (thanks RHEL). If we ignore RHEL, that still means up to 3 years if Debian and Ubuntu end up out of sync. The reality is that there is no option here that pleases everyone. Someone's code is broken, either explicitly (verification errors) or implicitly (they are operating insecurely and don't know it). IMO, explicit failures are better: at least they get dealt with. Implicit failures never get fixed and lead to CVEs and screwed users. I am sorry that this issue hurt you, but mostly because we don't have a good communications channel to warn about this stuff. That's what I intend to look into: I want to make sure users can see this stuff coming. |
This comment has been minimized.
This comment has been minimized.
|
@jdanbrown 12.04 will never upgrade to OpenSSL 1.0.2. Use the environment variable proposed above. |
This comment has been minimized.
This comment has been minimized.
|
Also, 12.04 is more than 3 years old. I strongly advise upgrading, you are being left behind by the rest of the web. |
This comment has been minimized.
This comment has been minimized.
ipartola
commented
Sep 8, 2015
|
@Lukasa: 12.04 is an LTS release just like 14.04 and 16.04 will be. Ubuntu supports LTS releases for at least 5 years, providing security and package updates. 12.04 is still a fine choice and is not EOL for another year and a half. Regarding opt-in, I am not sure what time interval makes sense. I honestly don't know enough about the subject matter to say what is reasonable, since I am not a security researcher. That's why I use certifi: because I can't put together an equivalent thing on my own (and I appreciate the work that gets put into it). However, when a breaking change is released that brings production sites to a halt it is difficult justifying trusting it. You mention that explicit failures get fixed faster. In this case that won't happen. Since the next LTS Ubuntu release is not due for another 7 months, the solution we went with was simply to pin certifi to the pervious version. It will likely stay this way until we are able to get openssl 1.0.2, some time in 2016. I suspect most people are doing this right now, or are using certifi.old_where(), both of which effectively negate the increased security the new version provides. Pinning the certifi version also will prevent any future updates going out which will mean that lots of codebases will become less secure, not more. It just feels like there should be a better solution than dropping a huge breaking change over the weekend. Distros and browsers manage to stay on top managing root certs without suddenly breaking sites like amazon.com, paypal.com, ups.com, etc. Is there some type of process that they follow that allows them to provide such safety that certifi could mirror? |
This comment has been minimized.
This comment has been minimized.
ipartola
commented
Sep 8, 2015
|
Thinking about this, is there a way to check whether openssl 1.0.2 is available and if it is use the new bundle? Otherwise use the old bundle and issue a warning? |
This comment has been minimized.
This comment has been minimized.
jdanbrown
commented
Sep 8, 2015
|
@Lukasa No ungratefulness implied. I just wanted to voice our experience as one of your many consumers, and also our solution for the sake of others in the same boat. Thanks for the heads up about the env var; we'll check that out too. |
This comment has been minimized.
This comment has been minimized.
ipartola
commented
Sep 8, 2015
|
One last thing: perhaps putting the workaround instructions into a warning would be great. Maybe even a link to this issue. Otherwise, I expect it will take other users quite some time to figure out what exactly is going on. |
kumar303
referenced this issue
Jun 23, 2016
Merged
Downgrade certifi; fixes connecting to paypal.com #2989
This comment has been minimized.
This comment has been minimized.
amolbarewar
commented
Sep 2, 2016
|
I am getting the same error: |
This comment has been minimized.
This comment has been minimized.
|
@amolbarewar Please read this thread: we have discussed several solutions for your problem already. Please also update your certifi: we have shipped several new releases since the one you're using. |
Lukasa
closed this
Sep 2, 2016
This comment has been minimized.
This comment has been minimized.
amolbarewar
commented
Sep 2, 2016
|
opps actually after downgrading certifi to 2015.04.28 I was still getting the issue thats why I asked again. |
This comment has been minimized.
This comment has been minimized.
reallistic
commented
Sep 2, 2016
|
I just ran into this yesterday, and wanted to point out the steps to build a static wheel has been merged. Please check it out here: |
jeanregisser
referenced this issue
Sep 13, 2016
Closed
Docker container missing certifi python module required for Telegram #2554
Lukasa
referenced this issue
Sep 28, 2016
Closed
Google Internet Authority G2 and Equifax Secure Certificate Authority not included? #47
This comment has been minimized.
This comment has been minimized.
mlissner
commented
Dec 23, 2016
•
|
I just ran into this issue on Travis-CI, where the installed version of OpenSSL is 1.0.1 (according to their docker image). I just want to mention this because it's an example of the kinds of issues we'll run into if we remove I also want to echo other folks that have suggested that Thanks for all the detailed responses and workarounds in this thread. What a mess! |
rmculpepper
referenced this issue
Feb 1, 2017
Open
SSL certificate verification fails for Google on Mac OS #1606
added a commit
to andylolz/yournextrepresentative
that referenced
this issue
May 10, 2017
added a commit
to robertpeteuil/multi-cloud-control
that referenced
this issue
Jul 2, 2017
added a commit
to trojsten/web
that referenced
this issue
Jul 3, 2017
armab
referenced this issue
Jul 24, 2017
Open
Upgrade requests and certifi to the latest version #3603
This comment has been minimized.
This comment has been minimized.
brondsem
commented
Aug 2, 2017
|
I've installed
However,
Thanks |
This comment has been minimized.
This comment has been minimized.
|
Do you have all the other dependencies from |
This comment has been minimized.
This comment has been minimized.
brondsem
commented
Aug 2, 2017
|
That was it, thanks! Ran |
pymarco
referenced this issue
Aug 10, 2017
Closed
Fails during request.post to Google's siteverify, how to capture logging info? #14
This comment has been minimized.
This comment has been minimized.
pmesgari
commented
May 22, 2018
|
Hi @Lukasa, this problem is happening again now with google api. All libraries are upgraded, the system clock is fine, the code is:
The output of pip freeze is:
|
ndparker commentedSep 7, 2015
Hi,
accessing https://amazon.com/ or amazon webservices gives
SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Any reason to not trust verisign as CA here? anything wrong with amazon's certs?
Thanks for any insights!