gpt4 book ai didi

ssl - 无法将 CA 证书 [crt] 作为 PrivateKeyEntry 添加到 JKS

转载 作者:太空宇宙 更新时间:2023-11-03 14:31:55 27 4
gpt4 key购买 nike

下面是我现在的JKS

bash-3.2$ keytool -list -keystore /web/myfolder/maincert.jks
Enter keystore password:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 4 entries

root, Aug 1, 2017, trustedCertEntry,
Certificate fingerprint (SHA1): 02:FA:F3:E2:91:43:54:68:60:78:57:69:4D:F5:E4:5B:68:85:18:68
maincert, Aug 1, 2017, PrivateKeyEntry,
Certificate fingerprint (SHA1): A0:BF:8A:61:D7:AE:82:A6:EE:4B:EB:E0:22:19:73:2E:FC:85:F8:AC
intermediate2, Aug 1, 2017, trustedCertEntry,
Certificate fingerprint (SHA1): 70:60:8B:40:D0:B7:76:17:4A:4E:D8:54:16:58:27:70:B3:07:B9:05
intermediate1, Aug 1, 2017, trustedCertEntry,
Certificate fingerprint (SHA1): EA:B0:40:68:9A:0D:80:5B:5D:6F:D6:54:FC:16:8C:FF:00:B7:8B:E3

然后我使用这个命令删除了“maincert”

keytool -delete -alias maincert -keystore /web/myfolder/maincert.jks

然后我添加了 CA 签名的新证书 [maincert.crt_2018],具有相同的旧别名,如下所示:

keytool -import -file /web/myfolder/maincert.crt_2018 -alias maincert -keystore /web/myfolder/maincert.jks

但新证书现在在 JKS 中显示为可信条目,而不是像以前那样显示为 PrivateKeyEntry。请看下面:

bash-3.2$ keytool -list -keystore /web/myfolder/maincert.jks
Enter keystore password:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 4 entries

root, Aug 1, 2017, trustedCertEntry,
Certificate fingerprint (SHA1): 02:FA:F3:E2:91:43:54:68:60:78:57:69:4D:F5:E4:5B:68:85:18:68
maincert, Aug 28, 2018, trustedCertEntry,
Certificate fingerprint (SHA1): D2:7F:D0:86:79:0D:F3:06:66:C4:09:2E:29:A0:8F:8A:F3:E2:09:10
intermediate2, Aug 1, 2017, trustedCertEntry,
Certificate fingerprint (SHA1): 70:60:8B:40:D0:B7:76:17:4A:4E:D8:54:16:58:27:70:B3:07:B9:05
intermediate1, Aug 1, 2017, trustedCertEntry,
Certificate fingerprint (SHA1): EA:B0:40:68:9A:0D:80:5B:5D:6F:D6:54:FC:16:8C:FF:00:B7:8B:E3

你能建议这里的问题是什么吗?

最佳答案

问题是 crt 证书文件已损坏。

使用正确的 crt,我不必从 JKS 中删除任何内容...只需添加 crt 即可,现在它显示 PrivateKeyEntry

关于ssl - 无法将 CA 证书 [crt] 作为 PrivateKeyEntry 添加到 JKS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52060632/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com