我想生成与私钥任何帮助Java 6的密钥工具的证书?
1. Generate private key, public key and keystore to store the keys.
/usr/local/packages/jdk16/bin/keytool -genkeypair -keyalg RSA -validity 300 -alias sslcert -keystore weblogic.jks
2. Create self signed certificate
/usr/local/packages/jdk16/bin/keytool -selfcert -keyalg RSA -alias sslcert -keystore weblogic.jks
3. Export the self signed certificate to a file
$ `/usr/local/packages/jdk16/bin/keytool -export -alias sslcert -rfc -file ohs.crt -keystore weblogic.jks`
Enter keystore password:
Certificate stored in file <ohs.crt>
当我尝试导入它说证书
Error in installing the server certificate.
No private key found.
导出的证书不包含的私钥。私钥保留在密钥库。你似乎可以用一个长手的方式来复制密钥库。只要密钥库复制到服务器。事实上,它应该已经在服务器,否则必须泄漏私钥的风险。