-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
SSLError(58, '[ASN1] nested asn1 error (_ssl.c:4174)') and SSLError(0, 'not enough data: cadata does not contain a certificate (_ssl.c:4159)') #104135
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Blender recently introduced online extensions repositories and we have multiple reports from MS-Windows users that the Currently it's not clear:
For reference: |
You can't expect users on Windows to do that. For example, I have a root CA which is malformed according to the code that throws the error, but it was issued by our ministry of internal affairs and it is used as a root of trust for e-document signing and verification of our national ID cards. So even though I can remove it I won't do it, because I need it for e-government sutff. TL;DR — Python should just ignore what it can't use instead of blowing a gasket. |
@levicki thanks for the info.
Would you be able to expand on whats happening here? The comment doesn't seem to match the check. |
The workaround is not mine so please don't attribute it to me — it was proposed in a pull request by @pukkandan which @tiran was supposed to review but apparently never got to it, and which was since then closed by @serhiy-storchaka saying he can't reproduce (I think he never even tried to understand what the issue is). I suggest you take it up with them for further clarifications. |
As a matter of fact I am going to close this issue because I hate it when developers ignore bug reports for a whole year without as much as acknowledging them even if said acknowledgement means "won't fix". |
There are too few core devs to give every issue the timely response we wish we could give. |
@terryjreedy Could this report be re-opened? Otherwise it's likely I'll have to create a new report as Blender users are currently hitting this bug, although it's something I'd need to investigate further so I could (setup an MS-Windows VM with a reproducible test case). @levicki are you aware of steps to reproduce this bug? (a way to install a certificate that causes Python to fail with SSH connections). |
This isn't "every issue", it's a very specific issue with a PR and if you do a casual Google search you will see that it's affecting quite a number of people using Python.
Installing a not well-formed root certificate (one with a nested ASN.1 element which shouldn't be nested) in the Windows certificate store should be enough. You can try with MUPCA Root from this page, it has been reported as problematic: |
I have reopened the original issue #79846. This issue is a duplicate of it. |
cpython/Lib/ssl.py
Line 515 in 0fc58c6
This code is causing many Python programs to fail when downloading dependencies.
It is loading all root certs from the Windows certificate store at once, and it fails if it encounters a single malformed certificate instead of ignoring it and not adding it to its own trust store.
Proposed workaround is:
It is very likely this is not enough to fix it properly so if anyone has a better idea on how to solve this issue please advise.
Before you do, I'd like you to have in mind the following things:
The text was updated successfully, but these errors were encountered: