FileNotFound

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

FileNotFound

Postby Steph » Tue Nov 04, 2008 11:45 am

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
Steph
Experienced Developer
Experienced Developer
 
Posts: 90
Joined: Mon Oct 20, 2008 1:48 pm
Location: France

Top

Postby Steph » Thu Nov 06, 2008 1:47 pm

It's working with path : data/data/com.alu.myic.android/my.trustore

But i have problem with Key store version or anything like that :/

[edit] ^o) [edit]
Last edited by Steph on Thu Nov 06, 2008 2:16 pm, edited 2 times in total.
Steph
Experienced Developer
Experienced Developer
 
Posts: 90
Joined: Mon Oct 20, 2008 1:48 pm
Location: France

Postby MrSnowflake » Thu Nov 06, 2008 2:04 pm

[mod]This is NOT a tutorial!
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests