Hi!
I have a big problem.
Since one week, i try to success a HTTPS connection with a no trusted certificate and apache librairies.
To do that i try to load my certificate in my keystore.
Source:
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
FileInputStream in = new FileInputStream(new File("my.trustore"));
try {
trustStore.load(in, "coucou".toCharArray());
} finally {
in.close();
}
SSLSocketFactory socketFactory = new SSLSocketFactory(trustStore);
Scheme sch = new Scheme("https", socketFactory, 443);
httpClient.getConnectionManager().getSchemeRegistry().register(sch);
//default programm
//Create scheme registry
SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
//registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
//Create a http client using a threadsave connection manager
ThreadSafeClientConnManager connectionManager = new TreadSafeClientConnManager(parameters, registry);
httpClient = new DefaultHttpClient(connectionManager, parameters);
My file is in /data/data/mon_appli/my.trustore
What can i do to fix it?
Please that's very Urgent.
regards


