-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSLCertVerificationError: certificate has expired #4159
Comments
A root certificate expired today on the Windows chain. Chances are there'll be an update soon to fix it on Windows. |
Windows:
|
Please don't recommend for users to manually add certs not issued with the intention of being used as a root CA as a trustable entity to the trusted root CA store. This will appear to fix the connection issue but has massive security implications beyond that. The trusted root authorities should not be modified in this way. |
I generally agree with the above, however I'd like to point out that Sectigo, the root Certificate Authority in this case, released 4 "modern" certificates that should be installed. You can find more information in their release about this expiration here: https://support.sectigo.com/articles/Knowledge/Sectigo-AddTrust-External-CA-Root-Expiring-May-30-2020 In my case only 3 of the modern certs were installed and I was missing the COMODO ECC Certification Authority root cert. This just so happens to be the root of the cert issued by Cloudflare for Discord.com this morning. Per that link from Sectigo, I was able to obtain the certificate by going to https://crt.sh/?id=2835394. There is a small link on the left side of the page that says "Download Certificate: PEM". This is a site operated by Sectigo. My guess is that either MS or Sectigo screwed up here and somehow this 1 of 4 certs did not get included into some kind of update. After installing this certificate I'm back up and running just fine. |
Has Windows released the update yet? |
Per Microsoft this root certificate should be included in Win10. Here's a page about the Microsoft Root Certificate Program: https://docs.microsoft.com/en-us/security/trusted-root/program-requirements And here's a list of current participants (as of June 4th 2020): https://ccadb-public.secure.force.com/microsoft/IncludedCACertificateReportForMSFT Note the inclusion of the certificate I was missing above with a Ctrl-F of "COMODO ECC Certification Authority". I'm not sure if this was just added or has been in Win10 for a while. I was certainly missing it. EDIT: Per the release notes from 03/06/2019 here: https://docs.microsoft.com/en-us/security/trusted-root/mar2019 So these certs have been around a while. I'm not sure why my machine was missing them as I'm running Win10 Enterprise Build 19041.264 and I ran a Windows update prior to researching any of this. |
Hello, I've got the same issue, i tried everything but nothing has worked. I finally solved it; I've removed old certificates and reloaded the bot. https://www.thesslstore.com/blog/how-to-remove-a-root-certificate/. If it can help someone... |
Where do I save the certs? |
I also found the old certificate that I'm pretty sure is causing the problem. "AddTrust External CA Root" What do I do with it? |
The method that has had success in the help channels is the following: Download the required certificate manually: https://crt.sh/?id=2835394 Once it has downloaded, double click it to install it. I believe installing it to the local computer and not the running user is the correct way to proceed, correct me if I am wrong there. |
So, is it safe to apply this? |
The certificate above comes from Sectigo themselves. You can run your own analysis of it if you like prior to installing. I can confirm this has fixed the issue for many users and afaik Windows has still not released an update to update their trust store. |
The security implications I mentioned were for just adding all the certs showing on a page as someone before me had suggested. There are still other security implications to adding the cert, but these are implications of trust. There is a potential break in a chain of trust here, use at your own risk as an informed decision. I can say that the cert as I saw on my machine was fine, but it is possible for a compromise to happen in delivering that, so verify. The other reason which I would not endorse one of these methods publicly on an issue like this is that most of the people with the issue will not verify, and just run something to fix it. |
@mikeshardmind So what do you suggest we do? I'd rather not introduce this kind of potential security breach, but I'd also like to get my bot up ASAP. |
I can suggest you to remove all your old certificates (especially the one that discordapp.com uses [https://crt.sh/?id=1]) and try again... However i don't know if it makes security breach... |
There is no security implications if you use the specific certificate I linked earlier in this thread. Some common sense applies that you should not install anything you don't need / won't use, meaning just that one certificate should suffice. As for the status on the pending update Windows still has to issue: no sign of it yet. |
Hi, If that's the case, how do we alter the script so that our code connects to discord.com? I apologize if my question is stupid as I'm a student learning this on my own free time. Thank you! |
The problem isn't this; it is because the certificate has expired... Did you try downloading the new certificate or removing the old one and going on discordapp.com on internet explorer? |
Did you _install_ the certificate to 'local computer' after downloading it?
I believe there's a link further up with the 'why it happened'.
…On Thu, 18 Jun 2020, 08:51 metiuu, ***@***.***> wrote:
Hi,
I'm also having this issue. I tried to fix it by following the
instructions here, but no luck so far. This is a wild guess, but is it
possibly because Discord recently moved domains from discordapp.com to
discord.com?
If that's the case, how do we alter the script so that our code connects
to discord.com? I apologize if my question is stupid as I'm a student
learning this on my own. Thank you!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4159 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2J7ZHTBWYYW7NR5G6LN3DRXHBPHANCNFSM4NOZMZIA>
.
|
Hi, it was my error. I installed the cert manually on the user and not the local machine. The issue is solved now and I can continue working on my self-study project. Sorry for the inconveniencec and stupid question. |
Uh, i've also been experiencing this problem, but the links provided don't seem to load and Internet Explorer doesn't work on my computer. If I try and run it, it's just all white and then crashes. |
I believe the core issue is based off of OpenSSL versions being distributed with Python which is why only a minority of people have this issue. If OpenSSL is above 1.1.0 then this should not be happening. However I'm unsure how OpenSSL versions are bundled on Windows distributions to cause such discrepancies. For now, I'll close this issue since there are numerous workarounds provided. |
I am having a similar problem, it is not the #423 one, but this one. I don't see a fix for Mac and all the advice so far is for windows. Any help? Thanks in advance. |
If you're on macOS you'll want to go into the python 3.x folder in your Applications and double click |
It still didn't work, does anyone know why? |
After working on it for a few hours, here's what i came up with:
This fixed it for me, hope it will help everyone still looking for a solution :) |
I am pretty sure this all is due to misconfiguration of the infrastructure on discord side (intermediate certificate not always present in the chain or something like that), because even the discord app itself is throwing certificate errors every day which are resolved after restarting discord. |
Hi, |
If you're using macOS go to Macintosh HD > Applications > Python3.X folder (X = whatever version of python you're using) > double click on "Install Certificates.command" and the issue went away! |
Im using ubuntu and im getting this exact error this install script that everyone keeps mentioning doesnt work at all for me any help would be massively appreciated. |
Here is a solution which doesn't compromise the security of the entire system, but is of course a TOTAL HACK and I hereby inform you that you alone bear the full responsibility for any damage that occurs from using it. It basically tells your bot to not use the certificates known to your OS but instead others which you download manually.
before each of the source lines: https://github.com/Rapptz/discord.py/blob/master/discord/http.py#L132
|
https://stackoverflow.com/a/62104752/13396193 this method solved my problem |
The certificate problems appeared only temporary to me and should be resolved by a long time. |
is there a macos version also the Install certificate.command has no impact on the system |
how does this work on Mac? |
Please stop necrobumping this issue. If your issue is the same as the one outlined above: Windows: #4159 (comment) |
|
sorry i meant INstall certificate gives me an error |
It doesn't make sense having to download a public key/cert that is already in every keystore. When the certificate is expired, Discord officials need to renew or get rid of the outdated cert. I am unsubscribing from this thread as there are no new questions or answers other than from people with badly configured computers. |
Today suddenly my bot can't be launched from Windows. As I see this problem is not in my code completely so I messaging here and to Discord Support.
Checklist
System Information
About
Problem with certification probably on Discord side, but discord.py still tries to access discordapp, so maybe it can be problem. Also I am looking for solution.
Also it is not only my issue. here is stackoverflow question about it.
The text was updated successfully, but these errors were encountered: