I'm using the spark framework, trying to add HTTPS. I have an SSL certificate(certificate.crt) purchased which i've added to the Java keystore using Import Java. I've then included
secure("keystore.jks", "somepassword", null, null);
The output after running the code is:
[Thread-0] INFO org.eclipse.jetty.util.log - Logging initialized @898ms
[Thread-0] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-0] INFO spark.webserver.JettySparkServer - >> Listening on
0.0.0.0:443[Thread-0] INFO org.eclipse.jetty.server.Server - jetty-9.3.z-SNAPSHOT
[Thread-0] INFO org.eclipse.jetty.util.ssl.SslContextFactory - x509={} wild={} alias=null for SslContextFactory@5cee0391(file:///root/keystore.jks,null)
[Thread-0] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@59c326cc{SSL,[ssl, http/1.1]}{
0.0.0.0:443}
[Thread-0] INFO org.eclipse.jetty.server.Server - Started @1717ms
On posting to my webservice, i get the error:
The response status was 0. HelpOn Wednesday, August