未找到证书链

发布于 2024-10-21 08:34:03 字数 926 浏览 3 评论 0原文

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

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

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

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

并将

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

其导出到密钥库文件。

当我尝试签署 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.

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

It provide 2 certificates: aplha-primary.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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

七堇年 2024-10-28 08:34:03

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文