keytool命令来替换现有的SSL证书?


12

我有一台运行glassfish 3.1.2应用服务器的linux centos服务器。来自GlassFish安装的端口4848和8181的默认证书为1024位。我需要将它们替换为2048位版本。寻找帮助来创建执行此操作的keytool命令行代码。

我在这里找到证书:

# keytool -list -keystore keystore.jks
   Keystore type: JKS
   Keystore provider: SUN
   Your keystore contains 2 entries
   glassfish-instance, Feb 7, 2012, PrivateKeyEntry, 
   Certificate fingerprint (SHA1): 40:...:46
   s1as, Feb 7, 2012, PrivateKeyEntry, 
   Certificate fingerprint (SHA1): 3C:...:FC

Answers:


17

在这里,您总是将本页标记为“最常见的Java Keytool密钥库命令”作为参考。

因此,您需要先删除证书,然后才能重新添加证书。从上一页:

从Java Keytool密钥库中删除证书

  • keytool-删除-alias mydomain -keystore keystore.jks

2
没有替换选项-多么令人失望。无论如何,谢谢你的提示。
马丁
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.