SSL keystore problem

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

SSL keystore problem

Postby Steph » Tue Nov 04, 2008 12:59 pm

Hi!

I try to connect to a server with HTTPS connection.

I have a wrong version key store IOexception.

Does anybody know, How to fix it?

my source :

KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
FileInputStream in = new FileInputStream(new File("data/data/com.alu.myic.android/my.trustore"));
try {

trustStore.load(in, "coucou".toCharArray());
/* Enumeration enumKey = trustStore.aliases();
for(;enumKey.hasMoreElements();)
{
String alias = (String)enumKey.nextElement();
boolean isPrivateKey = trustStore.isKeyEntry(alias);
boolean isTrustedCertificate = trustStore.isCertificateEntry(alias);
Log.v("Alias: " + alias + "-key: " + isPrivateKey + "-trusted: " + isTrustedCertificate, "" );
}*/
} finally {
in.close();
}

SSLSocketFactory socketFactory = new SSLSocketFactory(trustStore);

Scheme sch = new Scheme("https", socketFactory, 443);
httpClient.getConnectionManager().getSchemeRegistry().register(sch);



regards,

Steph
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:11 pm

PLease, i'm in work placement, and i can't continu the project without this information ....
Steph
Experienced Developer
Experienced Developer
 
Posts: 90
Joined: Mon Oct 20, 2008 1:48 pm
Location: France

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Exabot [Bot] and 8 guests