Android Tutorial Connecting to HTTPS (secured) urls

Erel

Administrator
Staff member
Licensed User
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.
 

moster67

Expert
Licensed User
Erel,

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

Thank you Erel.
 

Erel

Administrator
Staff member
Licensed User
The Http library can only be used with the full version.
Using Https is very similar to regular unsecured connections. There are several examples available here: Basic4android Search: http
 

boharp

New Member
Licensed 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