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
Enable self-signed certificates or third-party CA's in IOWebSocketChannel #134
Comments
I agree with that. It's important |
Not sure if this helps but I have found a workaround (obviously use with extreme care) in your app main.dart add the following
The HttpOverride.global allows the connection of a self signed wss connection, or at least it does for me running in a simulator on iOS connecting to a proxied NGINX server running on a RPi. To turn off the override just comment out the |
thank , I generally understand the risks he brings, but he solves my problems . |
@magnatronus, thanks a lot for your comment. I have never heard about HttpOverrides before. This is indeed a global hook to provide your own implementation of an HttpClient. |
It works for me! |
What about for flutter web ? |
Class IOWebSocketChannel has only a very simple constructor.
By browsing a little bit through the code I saw internally the HttpClient class is used.
Are there any plans to expose the SecurityContext by an optional constructor parameter or another convenience constructor in IOWebSocketChannel, thus making self-signed certificates available? I think the solution would be to pass such a SecurityContext down to the HttpClient.
Please take a look at the following link:
https://dart-lang.github.io/server/tls-ssl.html#trusting-additional-cas
The text was updated successfully, but these errors were encountered: