简体   繁体   English

密钥工具错误:java.lang.Exception:别名<ima>不存在</ima>

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

I am trying to create a Certificate Signing Request (CSR) from a public RSA key in the earlier generated keystore using the Java Keytool utility:我正在尝试使用 Java Keytool 实用程序从早期生成的密钥库中的公共 RSA 密钥创建证书签名请求 (CSR):

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

It raises this error:它引发了这个错误:

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

How can I fix this?我怎样才能解决这个问题? Please help!请帮忙!

First you should convert csr file to crt with key.首先,您应该使用密钥将 csr 文件转换为 crt。 And then import crt to jks keystore.然后将 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" 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 KeyTool 错误:java.lang.Exception:别名不存在 - KeyTool error : java.lang.Exception : Alias does not exist keytool 错误:java.lang.Exception:密钥库文件不存在:React Native 中的 debug.keystore - keytool error: java.lang.Exception: Keystore file does not exist: debug.keystore in React Native keytool 错误:java.lang.Exception:必须指定 -keyalg - keytool error: java.lang.Exception: The -keyalg must be specified keytool error:java.lang.Exception:密钥库文件存在,但为空 - keytool error: java.lang.Exception: Keystore file exists, but is empty keytool keytool 错误:java.lang.Exception:输入的不是 X.509 证书 - keytool keytool error: java.lang.Exception: Input not an X.509 certificate openssl / keytool错误:java.lang.Exception:输入的不是X.509证书 - openssl/keytool error: java.lang.Exception: Input not an X.509 certificate keytool 错误:java.lang.Exception:证书回复和密钥库中的证书相同 - keytool error: java.lang.Exception: Certificate reply and certificate in keystore are identical 如何解决 keytool 错误:java.lang.Exception: Input not an X.509 certificate - How to resolve keytool error: java.lang.Exception: Input not an X.509 certificate javax.servlet.error.exception 属性是否总是强制转换为 java.lang.Exception 类型? - Does javax.servlet.error.exception attribute always cast to java.lang.Exception type? 升级到jdk1.7.0_79和80(仅Linux)后,获取java.lang.Exception:输入的不是X.509证书:keytool错误 - After upgrading to jdk1.7.0_79 and 80 (linux only) getting java.lang.Exception: Input not an X.509 certificate :keytool error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM