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


