You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far i am aware there is no mechanism provided for this by the libraries i am using (mainly WebSocketChannel). But if this is for local development only you could try to provide a override for bad certificates like this:
class MyHttpOverrides extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext? context) {
return super.createHttpClient(context)
..badCertificateCallback =
(X509Certificate cert, String host, int port) => true; // add your localhost detection logic here if you want
}
}
void main() {
HttpOverrides.global = MyHttpOverrides();
runApp(MaterialApp(home: MyApp()));
}
Is it possible to use library with self signed? Or how I can pass a certificate in StompClient like http client
flutter: HandshakeException: Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:393))
The text was updated successfully, but these errors were encountered: