Keystore not working on Java 9

I converted the JKS keystore to P12 format using portecle, but probably not the case. The keystore works with Java 8 (various versions), but with Java 9 (OpenJDK 64-Bit Server VM (built-in 9-internal + 0-2016-04-14-195246.buildd.src, mixed mode), I get

java.io.IOException: Invalid keystore format
        at sun.security.provider.JavaKeyStore.engineLoad(java.base@9-internal/JavaKeyStore.java:659)
        at sun.security.util.KeyStoreDelegator.engineLoad(java.base@9-internal/KeyStoreDelegator.java:219)
        at java.security.KeyStore.load(java.base@9-internal/KeyStore.java:1466)
        at org.eclipse.jetty.util.security.CertificateUtils.getKeyStore(CertificateUtils.java:52)
        at org.eclipse.jetty.util.ssl.SslContextFactory.loadKeyStore(SslContextFactory.java:998)
        at org.eclipse.jetty.util.ssl.SslContextFactory.load(SslContextFactory.java:252)
        at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(SslContextFactory.java:219)

The funny thing is that Java 8 keytool shows

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 5 entries
... entries listed

while one of Java 9 shows

Keystore type: PKCS12
Keystore provider: SUN

Your keystore contains 5 entries
... entries listed

I know JEP 229 and I read related problems, but I don't see any related problem.

+4
source share
1 answer

The keytool JDK utility can convert a JKS keystore to a PKCS12 keystore. For example, using JDK 9,

$ keytool -importkeystore -srckeystore ks.jks -destkeystore ks.p12

, 2016 , JDK 9, . http://jdk.java.net/9/

+3

Source: https://habr.com/ru/post/1681209/


All Articles