证书链未找到

dha*_*dra 6 java certificate keytool

我正在签署jar文件.VeriSign提供的证书.

它提供2个证书:aplha-primary.ceraplha-secoandary.cer

我使用以下命令生成密钥库文件:

keytool -importcert -v -alias -primary -keystore keystore/keystore.jks -file aplha-primary.cer
Run Code Online (Sandbox Code Playgroud)

keytool -importcert -v -alias -secoandary -keystore keystore/keystore.jks -file aplha-secoandary.cer
Run Code Online (Sandbox Code Playgroud)

它被导出到密钥库文件.

当我试图签署jar文件时,它会给出例外情况

  [signjar] jarsigner: Certificate chain not found for: must
 reference a valid KeyStore key entry containing a private key and corresponding
 public key certificate chain.


jarsigner -keystore keystore.jks -storepass **** -keypass ****** Uploader.jar alpha-primary
jarsigner: Certificate chain not found for: alpha-primary.  alpha-primary must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

小智 2

我认为您丢失了私钥。使用非对称加密对 jar 进行签名。证书仅包含公钥。