-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
SecurityContext is not handling Handshake properly: Unhandled Exception: HandshakeException: Handshake error in client #47420
Comments
I just figured that I need to remove the expired certificate from the list. So is it possible to remove a certificate from |
Could it be related to this issue? |
I understand that this change should solve the mentioned issue . so I need to clone the repo and build the dart sdk on my machine to test it then I will report back. |
You can download builds of the dev branch from: https://dart.dev/get-dart/archive#dev-channel which should have the change you linked to. |
I can confirm that the last dev build is working without any problems on my machine
Thank you for your help. |
@DiaaEddin I am not working on the Dart project so I can only speculate. But I do wonder why this fix was not a candidate for the 2.14 branch since I have seen at least one other person with this exact problem on Windows (some guy I helped over Discord). If nothing is done, the change comes with the 2.15 release but I can really only guess when that becomes stable. But since 2.14 was released rather recent I would not expect 2.15 the next few months (maybe a late December? I don't really know 🦆). |
@aam Might it make sense to cherry-pick https://dart-review.googlesource.com/c/sdk/+/211160 as a stable 2.14 patch release? |
Yeah, we could file a cherry-pick request for this to be considered for 2.14 hotfix patch. |
Yes, CP was filed, also this can be closed as duplicate of #46370 |
As of September 2021 my https request to my api which has a valid certificate from letsecnrypt ca is not working anymore from dart
HttpClient
throwing the following errorit is only happening on some windows builds and Android 6 / 4 . I tried the program on other windows machines and it is working perfectly .
After A little digging I found this solution witch basically adds
isrgrootx1.pem
toSecurityContext.default
I tried that but then I got this error message
it seems that isrgrootx1.pem is already in the trusted root certificates list.
so what is the problem then?!
Finally I tried to create
SecurityContext(withTrustedRoots: false)
then addisrgrootx1.pem
to it and then I passed it to HttpClient. And it worked. but the trusted root certificates list for the client does not include other trusted issuers certificates. so this client will only work for isrgrootx1 signed certificates which is not ideal solution.I could not find the cause of this problem.
this is my code to reproduce
the output on my machine
The text was updated successfully, but these errors were encountered: