gpt4 book ai didi

java - KeyTool 错误 : java. lang.Exception:别名不存在

转载 作者:太空宇宙 更新时间:2023-11-03 12:44:35 41 4
gpt4 key购买 nike

我已通过以下命令成功导入证书:

keytool -import -alias "alias-name" -file 
"C:\somepath\Certificate\portal.cer
-keystore C:\Program Files\Java\jdk1.7.0_79\jre\lib\cacerts"

现在我正在尝试使用

删除导入的证书
keytool -delete -alias "alias-name" -keystore 
"C:\Program Files\Java\jdk1.7.0_79\jre\lib\cacerts" -storepass changeit

但我以下面的错误信息结束:

KeyTool error : java.lang.Exception : Alias does not exist

最佳答案

对于 Ubuntu/Linux
使用相应的别名列出 keystore 中的所有条目

keytool -list -v -keystore "myKeyStore.jks" -storepass myPassword

为了查看别名,详细选项“-v”很重要

示例输出:

Keystore type: PKCS12
Keystore provider: SUN

Your keystore contains 2 entries

Alias name: 1
Creation date: Dec 4, 2019
Entry type: PrivateKeyEntry
Certificate chain length: 2
Certificate[1]:
Owner: CN=yourname.com, O=Your Name, C=XX
Issuer: CN=Issuer CA, O=Issuer Name, C=XX
Serial number: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Valid from: Mon Feb 25 10:04:56 GMT 2019 until: Wed Feb 24 10:04:56 GMT 2021
Certificate fingerprints:
SHA1: 9F:35:31:B1:A9:C2:37:8D:61:2F:9B:ED:82:3F:45:26:E1:D9:18:83
SHA256: 34:65:C8:B6:4D:24:9D:20:3C:24:7B:B7:7B:F5:6B:F3:BE:79:11:BE:4F:8C:21:D2:9E:86:CC:AD:17:84:01:C4
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
Extensions:
...

关于java - KeyTool 错误 : java. lang.Exception:别名不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42394260/

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