Android Tutorial Connecting to HTTPS (secured) urls

New tutorial: [B4X] OkHttpUtils2 / iHttpUtils2 and accept all option
The HTTP library and the underlying Apache HTTP component takes care of secured web pages automatically. The certificate will be checked and if trusted a connection will be made.
However sometimes you need to connect to a secure page which is self signed. Trying to connect to such a page will fail because the certificate is not trusted. You can bypass this check by calling Http.InitializeAcceptAll instead of Http.Initialize (this method is available in HTTP v1.02)

This method should only be used in local secured networks.
 
Last edited:

moster67

Expert
Licensed User
Longtime User
Erel,

Finally I had a chance to test "Http.InitializeAccept" for not trusted certificates and it works just perfect! :sign0060:

Thank you Erel.
 

boharp

New Member
Licensed User
Longtime User
HTTPS problem

Hello!

I have an aspx site, that handle the http post from the Android device. When I use this with simple http, everything is OK, but when I want to use https, I got connect time out error.
The server has self-signed certificate, and I use HttpClient.InitializeAcceptAll on the device.

Have you any idea about this?

Thanks!
 
Top