Self-signed SSL acceptance on Android -


how accept self-signed certificate in java on android?

a code sample perfect.

i've looked everywhere on internet , while people claim have found solution, either not work or there no sample code up.

i have functionality in exchangeit, connects microsoft exchange via webdav. here's code create httpclient connect self signed cert's via ssl:

schemeregistry schemeregistry = new schemeregistry(); // http scheme schemeregistry.register(new scheme("http", plainsocketfactory.getsocketfactory(), 80)); // https scheme schemeregistry.register(new scheme("https", new easysslsocketfactory(), 443));  httpparams params = new basichttpparams(); params.setparameter(connmanagerpnames.max_total_connections, 30); params.setparameter(connmanagerpnames.max_connections_per_route, new connperroutebean(30)); params.setparameter(httpprotocolparams.use_expect_continue, false); httpprotocolparams.setversion(params, httpversion.http_1_1);  clientconnectionmanager cm = new threadsafeclientconnmanager(params, schemeregistry); 

the easysslsocketfactory here, , easyx509trustmanager here.

the code exchangeit open source, , hosted on googlecode here, if have issues. i'm not actively working on anymore, code should work.

note since android 2.2 process has changed bit, check this make code above work.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -