【问题标题】:keytool error: java.lang.Exception: Alias <ima> does not existkeytool 错误:java.lang.Exception:别名 <ima> 不存在
【发布时间】:2022-09-28 16:25:45
【问题描述】:

我正在尝试使用 Java Keytool 实用程序从先前生成的密钥库中的公共 RSA 密钥创建证书签名请求 (CSR):

keytool -certreq -alias ima -file \\
example_cert_req.csr -keystore example_keystore.jks \\
-storepass example_password

它引发了这个错误:

keytool error: java.lang.Exception: Alias <ima> does not exist

我怎样才能解决这个问题?请帮忙!

    标签: java alias keytool jks java.lang


    【解决方案1】:

    首先,您应该使用密钥将 csr 文件转换为 crt。然后将 crt 导入 jks 密钥库。

    openssl x509 -req -in example_cert_req.csr -signkey privateKey.key -out certificate.crt
    keytool -importcert -file certificate.cer -keystore example_keystore.jks -alias "ima" 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-16
      • 1970-01-01
      • 2013-09-25
      • 2013-01-31
      • 1970-01-01
      • 2014-08-16
      相关资源
      最近更新 更多