Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] keystore

I've downloaded jetty 9.2.13 (yes, we will move on to something better soon).

I made one small change to jetty-https.xml replacing 433 with 8443 for the secure port.  I create a small test webapp:

webapps/test/index.html
<html>
Hello World!
</html>

I launch this vanilla and otherwise unadulterated jetty thus:

> java -jar start.jar -Dorg.eclipse.jetty.LEVEL=DEBUG

Using my FF browser I visit https://myhost:8443/test/ and after adding an exception for an "Insecure Connection" I see: Hello World!

Great.

Now comes the part I don't understand (somewhat naive ssl user here). 

I have a keystore and password that is working fine for an embedded jetty (also 9.2.13) in another application.  Works fine for https with the same "Insecure Connection" due to self-signed cert.

I take the keystore from my application and put in into /etc of the vanilla jetty 9.2.13. And I take the password from my application and put in into jetty-ssl.xml thus:

<Set name="KeyStorePassword"><Property name="jetty.keystore.password" default="my-password"/></Set>
<Set name="TrustStorePassword"><Property name="jetty.truststore.password" default="my-password"/></Set>

When I launch the jetty server the same way:

> java -jar start.jar -Dorg.eclipse.jetty.LEVEL=DEBUG

I get:

2018-03-10 09:12:19.794:WARN:oejuc.AbstractLifeCycle:main: FAILED SslContextFactory@2a3046da(/home/degenaro/test/jetty-distribution-9.2.13.v20150730/etc/keystore,/home/degenaro/test/jetty-distribution-9.2.13.v20150730/etc/keystore): java.io.IOException: Keystore was tampered with, or password was incorrect
java.io.IOException: Keystore was tampered with, or password was incorrect
    at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:780)
    at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
    at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
    at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
    at java.security.KeyStore.load(KeyStore.java:1445)

Certainly user error, but what have I done wrong??

Thanks.

Lou.

Back to the top