Skip to content
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

Flutter self signed certificate #25692

Closed
1AlexFix1 opened this issue Dec 22, 2018 · 11 comments
Closed

Flutter self signed certificate #25692

1AlexFix1 opened this issue Dec 22, 2018 · 11 comments
Labels
engine flutter/engine repository. See also e: labels. framework flutter/packages/flutter repository. See also f: labels.

Comments

@1AlexFix1
Copy link

1AlexFix1 commented Dec 22, 2018

Hi, tremulous team, you're just handsome, after flutter development on native platforms seems outdated. Flutter it's wonderful. In this regard, we want to transfer the current application to the flutter. We encountered a problem in the form of CERTIFICATE_VERIFY_FAILED when I connected to our servers (web_socket_channel) , I read similar problems, and the solution is to add a certificate to the application, but we have many servers and we can add new ones at any time, with new certificate. Therefore, the solution DART_VM_OPTIONS = - root-certs-file = some_file pub get does not suit us.
At the moment, as a solution, I see the entry kotlin / swift (channels) and sends answers from the server in the application, but it looks like a crutch. Even if it helps now, it turns out that in the future our application will not be able to work in Fuchsia?
Please tell me how you can solve this problem in other ways?
P.S.sorry for my bad english

@zoechi zoechi added the engine flutter/engine repository. See also e: labels. label Dec 22, 2018
@zoechi zoechi added this to the Goals milestone Dec 22, 2018
@zoechi zoechi added the framework flutter/packages/flutter repository. See also f: labels. label Dec 22, 2018
@zoechi
Copy link
Contributor

zoechi commented Dec 22, 2018

Is tis about the development environment, the mobile app, or both?

@1AlexFix1
Copy link
Author

1AlexFix1 commented Dec 22, 2018

Is tis about the development environment, the mobile app, or both?

At the moment, only for mobile devices, but as soon as a stable version appears under the PC, then a PC will need some kind of solution.

@zoechi
Copy link
Contributor

zoechi commented Dec 22, 2018

but as soon as a stable version appears under the PC

You mean a desktop version when Fuchsia is released. So it's only about the application you are developing, not the development environment (flutter upgrade, flutter packages get, ...)

@1AlexFix1
Copy link
Author

1AlexFix1 commented Dec 22, 2018

but as soon as a stable version appears under the PC

You mean a desktop version when Fuchsia is released. So it's only about the application you are developing, not the development environment (flutter upgrade, flutter packages get, ...)

Probably we did not understand each other, i mean i do that on mobile
IOWebSocketChannel ws = IOWebSocketChannel.connect('wss://myserver.com'); ws.stream.listen((data) { print('data = $data'); });
and get an error

ERROR:flutter/shell/common/shell.cc(186)] Dart Error: Unhandled exception:
E/flutter (24337): WebSocketChannelException: WebSocketChannelException: HandshakeException: Handshake error in client (OS Error:
E/flutter (24337): CERTIFICATE_VERIFY_FAILED: Hostname mismatch(handshake.cc:363))

The solution that is offered here #24586 does not help, since we have a lot of servers, and each has its own self-signed certificate.

@1AlexFix1
Copy link
Author

1AlexFix1 commented Dec 22, 2018

Oh, sorry it's my fail!!! Very very sorry, all work

@zoechi
Copy link
Contributor

zoechi commented Dec 22, 2018

That's because that's for the development tools, not for the created app.

I guess this is a duplicate of dart-lang/sdk#34284
perhaps also dart-lang/sdk#16300

@g-balas
Copy link

g-balas commented Jan 24, 2019

How did you fix that CERTIFICATE_VERIFY_FAILED with IOWebSocketChannel @1AlexFix1 ?

@1AlexFix1
Copy link
Author

Как вы исправили это CERTIFICATE_VERIFY_FAILED с IOWebSocketChannel @ 1AlexFix1 ?

As a result, it was my mistake, I didn’t correctly indicate the address of the server, we had a complex redirection so it seemed that the problem was on the client, but in fact it’s most likely on the server, I don’t know about IO, I use WebSocket since it’s connected returns the future, using this you can determine the status of onConnected (conditionally)

@winter91
Copy link

winter91 commented Jul 1, 2019

How did you fix that CERTIFICATE_VERIFY_FAILED with IOWebSocketChannel @1AlexFix1 ?
I want to know yet

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
engine flutter/engine repository. See also e: labels. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

4 participants