5

In the app I'm working on, I have to make an HTTPS post to a web server. I was getting certificate not trusted errors when i do it directly(without webview).

But when i use android webview to load the HTTPS URL i can do

public void onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) {
handler.proceed() ;
}

to proceed with the connection when i get a SSL certificate not trusted error.

My doubt is

1)if i use the above method will Android Webview actually store the certificate in its keystore?

2)Also will the same Webview be able to use the certificate in its keystore to accept the further connections to the same HTTPS server?

3)Can we programatically put some certificate in the webview's keystore so that it accepts all connections to an HTTPS enabled server?

I am confused with lot of questions.

Please help.

Sreeram
  • 3,160
  • 6
  • 33
  • 44
  • http://stackoverflow.com/questions/5594189/javax-net-ssl-sslexception-not-trusted-server-certificate – Niranj Patel Sep 23 '11 at 09:38
  • Thanks CapDroid for the response.I have gone through lot of SO questions on HTTPS and Android.I want to know whether android webview has its own keystore and also can we access it programatically.I would be glad if anybody can point me to some code. – Sreeram Sep 23 '11 at 10:14
  • @Sreeram Did you get its solution. I am struggling with same issue. I have a certificate against which I have to open the page in WebView – Sagar Trehan Mar 28 '16 at 04:21

0 Answers0