Hi,
I am changing the library/restlet to use the internal Jetty server instead
of war deployment. Mainly to better tailor for "spring boot"-style of
generation in Polygene Generator.
Now, the library/http looks on paper to support HTTPS, but I am having
problem getting it working. Does anyone know if it can be made to work at
all? Any hints?
I am getting
javax.net.ssl.SSLHandshakeException: no cipher suites in common
at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1478)
at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:535)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:813)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConnection.java:520)
when trying to connect.
I am creating empty JCEKS store and point both the truststore and keystore
to the same.
private void createKeyStore( String path, String type, String password )
throws AssemblyException
{
File keyFile = new File( path ).getAbsoluteFile();
if( keyFile.exists() )
{
return;
}
if( !keyFile.getParentFile().exists() )
{
keyFile.getParentFile().mkdirs();
}
try( FileOutputStream fos = new FileOutputStream( keyFile ) )
{
KeyStore ks = KeyStore.getInstance( type );
char[] pwd = password.toCharArray();
ks.load( null, pwd );
ks.store( fos, pwd );
}
catch( Exception e )
{
throw new AssemblyException( "Unable to create keystore.", e );
}
}
Or is the problem simply that I also need to populate some keys?
FTR, I think the current Polygene Generator is broken.
Cheers
--
Niclas Hedhman, Software Developer
http://polygene.apache.org - New Energy for Java