Answers for "DioError [DioErrorType.DEFAULT]: HandshakeException: Handshake error in client (OS Error: I/flutter (28831): CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:354))\"

0

DioError [DioErrorType.DEFAULT]: HandshakeException: Handshake error in client (OS Error: I/flutter (28831): CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:354))\

class MyHttpOverrides extends HttpOverrides{
  @override
  HttpClient createHttpClient(SecurityContext context){
    return super.createHttpClient(context)
      ..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
  }
}
Posted by: Guest on June-03-2021

Code answers related to "DioError [DioErrorType.DEFAULT]: HandshakeException: Handshake error in client (OS Error: I/flutter (28831): CERTIFICATE_VERIFY_FAILED: self signed certificate(handshake.cc:354))\"

Browse Popular Code Answers by Language