I am able to successfully set up play application with SSL when I use my
own system generated certificate + Key files.
openssl genrsa 1024 > host.key
openssl req -new -x509 -nodes -sha1 -days 365 -key host.key > host.cert
However, when I use the production key + cert (filename.pfx + filename.pem)
it does not work. I rename the files to host.key and host.cert according to
the documentation but still not working. I get an error in the browser
stating:
=======================
SSL connection errorUnable to make a secure connection to the server. This
may be a problem with the server, or it may be requiring a clientauthentication
certificate that you don't have.Error 107 (net::ERR_SSL_PROTOCOL_ERROR):
SSL protocol error.
=======================
The server throws a ClassCastException on the CLI
java.lang.ClassCastException: org.bouncycastle.asn1.cms.ContentInfo cannot
be cast to java.security.KeyPair
at
play.server.ssl.SslHttpServerContextFactory$PEMKeyManager.<init>(SslHttpSer verContextFactory.java:94)
at
play.server.ssl.SslHttpServerContextFactory$PEMKeyManager.<clinit>(SslHttpS erverContextFactory.java:79)
at
play.server.ssl.SslHttpServerContextFactory.<clinit>(SslHttpServerContextFa ctory.java:47)
at
play.server.ssl.SslHttpServerPipelineFactory.getPipeline(SslHttpServerPipel ineFactory.java:29)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.registe rAcceptedChannel(NioServerSocketPipelineSink.java:274)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink$Boss.run(Nio ServerSocketPipelineSink.java:239)
at
org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java :102)
at
org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker .java:42)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.j ava:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java: 908)
at java.lang.Thread.run(Thread.java:662)
----------------
Any ideas on how I should proceed?