Hi,
Are your settings (keystore,...) working with a complete James
installation? (just to be sure you start from a good base before
debugging your code)
Thx, Eric
On 19/11/2012 10:39, Jan Chaloupecky wrote:
Hi,
I'm trying to create a POP3 Serverwith SSL but the ssl handshake fails.
When I test the connection using openssl, I get a
"SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure"
I construct the NettyServer using :
new NettyServer(protocol, Encryption.createTls(sslContext));
and the sslContext is created using:
private SSLContext createSSLConfig(InputStream keyStoreIS, String
keystorePassword) throws Exception {
TrustManagerFactory tmFactory =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
KeyStore tmpKS = null;
tmFactory.init(tmpKS);
KeyStore ks = KeyStore.getInstance("JKS");
ks.load(keyStoreIS, keystorePassword.toCharArray());
// Set up key manager factory to use our key store
KeyManagerFactory kmf =
KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
kmf.init(ks, keystorePassword.toCharArray());
KeyManager[] km = kmf.getKeyManagers();
TrustManager[] tm = tmFactory.getTrustManagers();
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(km, tm, null);
return sslContext;
}
What am I doing wrong ?
cheers,
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]