For debugging when I start java add like mentioned:
-Djavax.net.debug=ssl
then you can see that the browser tried to use TLSv1 and Jetty 9.1.3 was talking TLSv1.2 so they were not communicating. That's Firefox. Chrome wanted SSLv3 so I added that also.
sslContextFactory.setIncludeProtocols( "TLSv1", "SSLv3" ); <-- Fix
sslContextFactory.setRenegotiationAllowed(true); <-- added don't know if helps anything.
I did not do most of the other stuff the orig poster did:
// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[] {
or this answer:
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory
.getDefaultAlgorithm());
or
.setEnabledCipherSuites
I created one self signed cert like this: (but I added .jks to filename) and read that in my jetty java code. http://www.eclipse.org/jetty/documentation/current/configuring-ssl.html
keytool -keystore keystore.jks -alias jetty -genkey -keyalg RSA
first & lastname *.mywebdomain.com