0

我在 Tomcat 6.x 中使用 https。它目前似乎按预期工作。但是,auth 链中使用的证书即将到期。我假设我需要更新我的密钥库,以便我的主机证书将继续像现在一样工作。我的主机证书没有过期,根也没有。中间证书即将到期,我正在寻求更换它的帮助。

第一次在我的密钥库中安装证书时,我必须完成身份验证链并将所有中间证书放在密钥库中。

在我看来,我认为我应该能够使用相同的别名从密钥库中删除中间证书并放入新证书。但是,我不知道如何重新创建身份验证链,而且我担心我可能会无意中使主机的证书无效。

所有证书都是 .cer 文件(base64 ascii 文本文件)。我读过其他格式,但只在我的服务器上使用带有 java 和 tomcat 版本的 .cer 文件类型取得了成功。

如何在不破坏主机和/或其密钥库的当前有效证书的情况下执行此操作。

如果我没有清楚地表达这些;我不想提交新的 .csr。

涉及证书:

  • 根证书
  • 中级A <--这个即将到期
  • 中级乙
  • 主机证书

我的 keytool 的 list 命令的输出近似值:

keytool -v -list -keystore mykeystore.kdb

Keystore type: jks
Keystore provider: SUN
 
Your keystore contains 4 entries 
 
Alias name: HostCert
Entry type: keyEntry
Certificate chain length: 4
Certificate[1]:
/** Omitted for brevity: this is the HostCert**/
Certificate[2]:
/** Omitted for brevity: this is the IntermediateB**/
Certificate[3]:
/** Omitted for brevity: this is the IntermediateA**/
Certificate[4]:
/** Ommitted for Brevity this is RootCert **/
 
*******************************************
*******************************************
  
Alias name: IntermediateB
Entry type: trustedCertEntry
 
/** Ommitted for Brevity **/
 
*******************************************
*******************************************
 
Alias name: IntermediateA
Entry type: trustedCertEntry
 
/** Ommitted for Brevity **/
 
*******************************************
*******************************************
 
Alias name: RootCert
Entry type: trustedCertEntry
/** Ommitted for Brevity **/
 
*******************************************
*******************************************
4

1 回答 1

1

keytool您可以通过在命令中指定别名再次导入证书来做到这一点

于 2014-01-04T07:59:30.770 回答