Wednesday 15 August 2012

web services - javax.net.ssl.SSLException: hostname in certificate didn't match in Android -



web services - javax.net.ssl.SSLException: hostname in certificate didn't match in Android -

i updating web service url of android application, using https protocol. see current https url working migrating new domain creating problem.

i have checked many threads on stackoverflow javax.net.ssl.sslexception: hostname in certificate didn't match android didn't find reply answering bypass security or allow all.

javax.net.ssl.sslexception: hostname in certificate didn't match:

//httpget getmethod = new httpget(string.format(httpurl)); httpget getmethod = new httpget(httpurl); defaulthttpclient client = new defaulthttpclient(); responsehandler<string> responsehandler = new basicresponsehandler(); httpparams params = client.getparams(); params.setparameter(coreconnectionpnames.connection_timeout, 60000); params.setparameter(coreconnectionpnames.so_timeout, 60000); client.setparams(params); responsebody = client.execute(getmethod, responsehandler); responsebody = responsebody.trim();

thanks in advance.

if works in browser not in app might problem missing sni support, see why android wrong ssl certificate? (two domains, 1 server).

android web-services ssl https

No comments:

Post a Comment