What steps will reproduce the problem?
// Load the Keystore
KeyStore ks = KeyStore.getInstance(keystoreType);
ks.load(this.keyStoreStream, this.keyStorePass.toCharArray());
// Get a KeyManager and initialize it
KeyManagerFactory kmf = KeyManagerFactory.getInstance(ALGORITHM);
kmf.init(ks, this.keyStorePass.toCharArray());
// Get a TrustManagerFactory and init with KeyStore
TrustManager[] tms = new TrustManager[]{new X509TrustManager() {
public void checkClientTrusted(
java.security.cert.X509Certificate[] chain, String authType)
throws CertificateException {}
public void checkServerTrusted(
java.security.cert.X509Certificate[] chain, String authType)
throws CertificateException {}
public java.security.cert.X509Certificate[]
getAcceptedIssuers() {return null;}
}};
// Get the SSLContext to help create SSLSocketFactory
SSLContext sslc = SSLContext.getInstance(PROTOCOL);
sslc.init(kmf.getKeyManagers(), tms, null);
above code working propery
Original issue reported on code.google.com by joyun...@gmail.com on 25 Jan 2010 at 2:30
Original issue reported on code.google.com by
joyun...@gmail.com
on 25 Jan 2010 at 2:30