java - SSL issue with HttpGet probably because server is requesting client authentication -
we using following versions of diff libraries
apache-httpcomponents-httpcore = 4.1; apache-httpcomponents-httpclient = 4.1.1; jdk = 1.6_64;
and started facing sslpeerunverifiedexception (http failing https javax.net.ssl.sslpeerunverifiedexception details).
i tried different things don't know why unable connect https://www.google.com after accepting certificates (though explained in comment, cause man in middle attack).
could case google started expecting certificate client? if yes, should do?
thanks,
could case google started expecting certificate client? if yes, should do?
if understand right , google need certificates, should use cryptoprovider , make signatures stunnel.
maybe smth wrong code ? settings works me
public httpclient getnewhttpclient() { try { keystore truststore = keystore.getinstance(keystore.getdefaulttype()); truststore.load(null, null); sslsocketfactory sf = new mysslsocketfactory(truststore); sf.sethostnameverifier(sslsocketfactory.allow_all_hostname_verifier); httpparams params = new basichttpparams(); httpprotocolparams.setversion(params, httpversion.http_1_1); httpprotocolparams.setcontentcharset(params, http.utf_8); schemeregistry registry = new schemeregistry(); registry.register(new scheme("http", plainsocketfactory.getsocketfactory(), 80)); registry.register(new scheme("https", sf, 443)); clientconnectionmanager ccm = new threadsafeclientconnmanager(params, registry); return new defaulthttpclient(ccm, params); } catch (exception e) { return new defaulthttpclient(); } }
Comments
Post a Comment