我想用证书签署我的jar文件。我遵循了以下步骤。 C:\ Program Files \ Java \ jdk-10.0.2 \ bin> keytool -genkey -alias testals -keystore testks
C:\ Program Files \ Java \ jdk-10.0.2 \ bin> keytool -export -keystore testks -alias testals -file testcer.cer
证书存储在文件中
C:\ Program Files \ Java \ jdk-10.0.2 \ bin> keytool -import -alias testals -file testcer.cer -keystore testks
但导入异常时,证书回复和密钥库中的证书是相同的。
请帮帮我怎么做?
导入时使用不同的别名,请勿使用用于导出的别名。它会工作。
这是因为您要导入root的自签名证书,而不是服务器证书。