user2692100
user2692100

Reputation: 61

jarsigner error: keystore load: Invalid keystore format

I used original keystore and try to sign it using Maven jar signer plugin. Getting exception as jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format

<configuration>
<archiveDirectory>target/encrypte.jar</archiveDirectory>
<excludes>
<exclude>**/S*.jar</exclude>
</excludes>
<includes>
<include>**/*.jar</include>
</includes>
<keystore>src/main/resources/Cert.pfx</keystore>
<alias>*****</alias>
<storepass>****</storepass>
</configuration>

Upvotes: 1

Views: 6175

Answers (1)

mszalbach
mszalbach

Reputation: 11490

I guess you need to specify the keystore format because the default is normally jks. Please try to add

<storetype>pkcs12</storetype>

to your maven configuration.

If this did not help try to have look into your cert with:

keytool -list -v -storetype pkcs12 -storepass **** -keystore src/main/resources/Cert.pfx

If this did not work maybe something is wrong with the certificate like strange special chars.

Upvotes: 3

Related Questions