Quantcast
Viewing all articles
Browse latest Browse all 1493

Flutter HTTPS Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: ok(handshake.cc:363))

A colleague has given me a Flutter project to try to build the app in iOS (I use a Mac, we both use Android Studio). Everything is ok except for this error:

Handshake error in client (OS Error: CERTIFICATE_VERIFY_FAILED: ok(handshake.cc:363))

If I use HTTP instead of HTTPS it works obviously. My colleague said he solved by adding this line of code:

client.badCertificateCallback = (X509Certificate cert, String host, int port) => true;

This line of code is also in my project because the source is the same. So why does it work on Android, but not on iOS?


Viewing all articles
Browse latest Browse all 1493

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>