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
--
Jan