Sarthak Solanki
Sarthak Solanki

Reputation: 498

Url launcher giving ssl certificate error

I'm launching a Url (Can not share it here) and flutter is giving me error:- [ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -202,

The code is launch(url,forceWebView: true); If i remove "forceWebView:true" It gets open in the browser and works fine but URL is exposed and I can't do that.

Upvotes: 3

Views: 3406

Answers (1)

MαπμQμαπkγVπ.0
MαπμQμαπkγVπ.0

Reputation: 6729

The error encountered here means that the url you are trying to launch is not trusted as mentioned here:

The server responded with a certificate that is signed by an authority we don't trust. The could mean:

  1. An attacker has substituted the real certificate for a cert that contains their public key and is signed by their cousin.

  2. The server operator has a legitimate certificate from a CA we don't know about, but should trust.

  3. The server is presenting a self-signed certificate, providing no defense against active attackers (but foiling passive attackers).

As mentioned in the comment, a workaround here is to do a certificate pinning.

Get the SHA-256:

The MD5, SHA-1 and SHA-256 fingerprints of the upload and app signing certificates can be found on the app signing page of the Play Console. Other fingerprints can also be computed by downloading the original certificate (.der) from the same page.

Upvotes: 0

Related Questions