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
If you use HTTPS and receive this error, you must make your HTTP client trust the server you wish to send requests.
To do this:
You need to download the web certificate and put it in the assets folder
Read the web certificate and set it as a trusted certificate
Inject it into your HTTP client
Example Code:
// Load from assetsfinalByteData certificateData =await rootBundle.load('assets/my_certificate.cer');
// Make the SecurityContext.defaultContext trust your certificateSecurityContext.defaultContext.setTrustedCertificatesBytes(certificateData.buffer.asUint8List());
// Inject SecurityContext.defaultContext into your HTTP clientfinal http.Client client = http.Client();
finalHttpClient httpClient =HttpClient(context:SecurityContext.defaultContext);
final http.Client clientWithHttpClient = http.Client(
httpClient: httpClient,
);
Note that I don't use this http client (I'm using Dio package for this).
So I don't know whether the last part of the code works or not.
I hope it works for you!
I have a flutter app which works well for many users Android and iOS
A single user receives this exception while sending a post request
Handshake Exception Handshake error in client (OS Error: Certificate Verify Failed Application Verification Failure Handshake.cc:393)
his device is iPad 6, iOS 14.8.1
what could be the problem?
The text was updated successfully, but these errors were encountered: