我想让我的 Liberty 应用程序将 Bluemix Secure Gateway 的目的地与 TLS Mutual Auth 连接起来。我尝试创建一个密钥库并通过 keytool 将证书和密钥导入密钥库,但我不知道密钥的密钥别名。我无法执行将密钥导入密钥库的命令。(证书和密钥由 Bluemix Secure Gateway 的目的地通过 TLS Mutual Auth(*) 提供)
*Bluemix 安全网关
https://www.ng.bluemix.net/docs/services/SecureGateway/index.html
你能教我如何知道密钥的密钥别名吗?或者你能通过keytool(不是java代码)教我任何其他方式来创建密钥库并导入密钥和证书,但是下面的过程?
[Bluemix Secure Gateway 的目的地提供的文件]
destination_id _key.pem
destination_id _cert.pem
[过程]
1. 创建一个密钥库,并立即将证书导入密钥库
# keytool -import -file *destination_id*_cert.pem -keystore myKeyStore.jks -storepass password -alias mutual_cert
2. 将密钥 n 导入密钥库
# keytool -importseckey -keyalias XXXXX -keystore myKeyStore.jks -storepass password -storetype jks -importfile *destination_id*_cert.pem