-
Notifications
You must be signed in to change notification settings - Fork 230
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
Pub on Windows uses SecurityContext.defaultContext which doesn't work with self signed certificates #1882
Comments
The default certificate store Dart uses is up to the Dart SDK, not to pub. |
The linked issue has this, but I'll comment here as well I think you should be able to work around this with |
Hi Natebosch, can you please explain how to use DART_VM_OPTIONS=--root-certs-file=some_file pub get ....Im new to Flutter.... |
replace
|
and where do we have this pub get ? Sorry but could you please explain step by step, i am naive to flutter |
@MilindDivre |
can anyone tell me how i can get certificate file ? |
Who could help me guys? i have an issue with this one, I have not any idea how to solve it, please any solution way.... |
Who could help me guys? i have an issue with this one, I have not any idea how to solve it, please any solution way.... |
@maks1981 I'm assuming you're literally running |
any solution for windows? this command dont seems to work. in the verbose mode i notice this datail in the error.
Cant be the SSL by pass?? |
@nehuenKC then you need to convert the .cert file to .pem file with command i will assume that you are using windows, and after that, you need to add an user environment variables, name is finally, you should open a new cmd window to make sure the changes are reflected, then this works for me. |
Hi, Thanks for the step by step guide on how to resolve the issue. HTTP error: Any idea how this can be resolved or what might be causing it? |
when i check my reply, i found that i made a mistake. the value of the DART_VM_OPTIONS environment variable shoule be you may try it again. |
Hi, Thanks for the reply. I had noticed the error and kept the value of the variable as you have mentioned. Unfortunately, I still get the aforementioned error. It has something to do with the company proxy/firewall I guess. Did you do any firewall rule modification? |
i am in the company proxy, and i also encountered this self-signed certificate problem, but now i can run fluuter with the steps mentioned above. so, maybe it's not the same problem as mine. |
Hi, I followed the steps again and it worked, I was giving the certificate path incorrectly. Thanks a lot for the help. |
This may be semi-related to #1826
When trying to install Flutter on a Windows machine that has a self-signed SSL certificate, I just get an endless loop like this:
On macOS with the same self signed cert, this works fine because Dart looks to the machine's Cert store - but on Windows and Linux it uses the Mozilla list (https://api.dartlang.org/dev/2.0.0-dev.50.0/dart-io/SecurityContext/defaultContext.html). I haven't checked a Linux environment and don't currently have easy access to one, but I imagine Linux users with self signed CAs would face a similar issue.
Could we get an option/environment variable/setting to allow or specify self signed certificates that are acceptable (basically using a custom SecurityContext)? I'm not 100% sure if the issue should be on pub or be on dart-sdk, but my main issue right now is with pub. I think the best solution would be to have the Dart SDK recognize self signed trusted certs in the machine store, but I'm not clear on a timeline for that and it seems like it might be easier to get pub to recognize this short term.
https://github.com/dart-lang/pub/blob/master/lib/src/source/hosted.dart#L133
The text was updated successfully, but these errors were encountered: