开发者

certificate chain not found

开发者 https://www.devze.com 2023-02-15 19:51 出处:网络
I am signing the jar file. The certificate provided by VeriSign. It provide 2 certificates: aplha-pr开发者_运维技巧imary.cer and aplha-secoandary.cer

I am signing the jar file. The certificate provided by VeriSign.

It provide 2 certificates: aplha-pr开发者_运维技巧imary.cer and aplha-secoandary.cer

I generate the keystore file using the following commands:

keytool -importcert -v -alias -primary -keystore keystore/keystore.jks -file aplha-primary.cer

and

keytool -importcert -v -alias -secoandary -keystore keystore/keystore.jks -file aplha-secoandary.cer

It is exported to keystore file.

when I tried to sign the jar file it's giving the exception like

  [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.


I think that you are missing the private keys. For signing of jars is used asymmetrical encryption. Certificate contains only public key.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号