Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 10 SSL Problem

Hi,

On Wed, Jun 28, 2023 at 4:45 PM Timo Brunn <timo@xxxxxxxxxxxxx> wrote:
>
> Hi,
>
> Im currently having trouble supplying an self-signed SSL Certificate to jetty:
>
> Im generating the self-signed certificate and keystore using:
>
> keytool -genkeypair -alias jetty -validity 365 -keyalg RSA -keysize 2048 -keystore jetty.p12 -storetype pkcs12
>
> My SSLContext looks like this now:
>
> jetty.sslContext.keyStorePath=jetty.p12
> jetty.sslContext.trustStorePath=jetty.p12
>
>
> jetty.sslContext.keyStoreType=PKCS12
> jetty.sslContext.trustStoreType=PKCS12
>
> jetty.sslContext.keyStorePassword=changeit
> jetty.sslContext.trustStorePassword=changeit
> jetty.sslContext.keyManagerPassword=changeit
>
> Starting jetty i get the following error:
>
> Exception in thread "main" java.io.IOException: keystore password was incorrect
>         at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2159)
>
> I double and triple checked the keystore password and it is correct. Keytool is able to open the store

Check that you don't have white space after "changeit".

Why did you specify the keyManagerPassword?
Is it the same as the keyStore?

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top