Jarsigner Errors and Solutions

Certificate Chain Not Found Error

Error Message
jarsigner: Certificate chain not found for: <Certificate Alias>.  <Certificate Alias> CA must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

Problem

This error message appears when the Certificate Alias provided is incorrect or the certificate corresponding to the alias has been deleted in the Windows Key Storage.

Solution

Check if the certificate alias name provided in the command is the same as the one generated in the README or Rerun the SIGN+_Installer to install the required certificates and retrigger the command.

Signer’s certificate chain is invalid warning when signing and verifying a jar

Error Message
Warning:
The signer's certificate chain is invalid. Reason: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Problem

This error message appears when using a private trust for generating the certificate used in the sign operation and the root and intermediate certificates are not imported into JDK cacerts KeyStore.

Solution

Solve this error by using a public trust or importing the private trust root CA certificate and intermediate issuing CA certificate into JDK cacerts KeyStore.

Jarsigner: Not a Private Key

Error Message
jarsigner: key associated with <Certificate Alias> not a private key

Problem

This error message appears when the AppViewX CSP Library or its dependent library files have been deleted.

Solution

Re-run the SIGN+_Installer in the downloaded SIGN+_Package to install and copy the required library files and retrigger the signing command.

Java: ProviderException

Error Message

Jarsigner with PKCS#11 Windows
jarsigner error: java.security.ProviderException: Library C:\Windows\System32\AVXPKCS11V1.dll does not exist
Jarsigner with PKCS#11 Linux
jarsigner error: java.lang.reflect.InvocationTargetException
JSign and APKSigner with PKCS#11
java.security.ProviderException: Failed to create a SunPKCS11 provider from the configuration <Path to AVXPKCS11V1.cfg>

Problem

This error message appears when the AppViewX PKCS#11 Library or its dependent library files have been deleted or its location has been modified after installation.

Solution

Re-run the SIGN+_Installer in the downloaded SIGN+_Package to install and copy the required library files and retrigger the signing command.