java.io.IOException: Invalid Keystore format

前端 未结 10 1492

Does anyone know how to solve this? I tried many things, but none of them worked.

And when I click more details I get this:

at sun.security.provider.         


        
相关标签:
10条回答
  • 2020-12-10 01:10

    I think the keystore file you want to use has a different or unsupported format in respect to your Java version. Could you post some more info of your task?

    In general, to solve this issue you might need to recreate the whole keystore (using some other JDK version for example). In export-import the keys between the old and the new one - if you manage to open the old one somewhere else.

    If it is simply an unsupported version, try the BouncyCastle crypto provider for example (although I'm not sure If it adds support to Java for more keystore types?).

    Edit: I looked at the feature spec of BC.

    0 讨论(0)
  • 2020-12-10 01:13

    go to build clean the project then rebuild your project it worked for me.

    0 讨论(0)
  • 2020-12-10 01:17

    Same issue here, I have Oracle JDK installed and my keystore was created using that, but in the jceks format

    keytool -importkeystore -destkeystore client.keystore \
        -srckeystore redislabs_user.p12 -srcstoretype pkcs12 \
        -deststoretype jceks -alias client-cert
    

    I deleted the -deststoretype jceks option and it worked fine :)

    0 讨论(0)
  • 2020-12-10 01:22

    I had the same issue with

    C:\Program Files\Java\jdk1.8.0_51\bin\keytool

    but the same keystore file worked fine with

    "C:\Program Files\Java\jre1.8.0_201\bin\keytool"

    I knw it is an old thread but hav lost lot of hours figuring this out... :D

    0 讨论(0)
  • 2020-12-10 01:25

    I ran into the problem with openJDK on ubuntu, had to install Oracle JDK to get it working.

    You can follow this guide on google sites to do that.

    0 讨论(0)
  • 2020-12-10 01:26

    Maybe maven encoding you KeyStore, you can set filtering=false to fix this problem.

    <build>
        ...
        <resources>
            <resource>
                ...
                <!-- set filtering=false to fix -->
                <filtering>false</filtering>
                ...
            </resource>
        </resources>
    </build>
    
    0 讨论(0)
提交回复
热议问题