2010-07-15 34 views
19

我已經證書導入私人~/.keystore文件:的jarsigner:證書鏈沒有找到

keytool -list 
Enter keystore password: 

Keystore type: JKS 
Keystore provider: SUN 

Your keystore contains 1 entry 

mylyn-mantis, Jul 15, 2010, trustedCertEntry 

,我試圖簽署一個罐子用它,但我得到錯誤「未找到證書鏈」。

jarsigner -verbose /home/robert/file.jar mylyn-mantis 
jarsigner: Certificate chain not found for: mylyn-mantis. mylyn-mantis must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain. 

我該如何解決這個問題?

回答

14

看來你的密鑰庫只包含證書(公鑰),你需要一個完整的鍵盤輸入,用私有密鑰,整個證書鏈才能夠簽署任何

+1

感謝。我從CA獲得了這個證書。我怎樣才能生成一個私鑰去? – 2010-07-15 13:35:47

+3

這必須事先完成:您必須使用自簽名證書生成密鑰對,然後向您的CA申請您的證書的簽名。 – 2010-07-15 13:39:46

+0

如何使用CA提供的通配符證書?在這種情況下沒有當地的私人。 – 2013-08-05 18:22:54