上一主题: 将 CA Identity Manager 证书替换成 SHA-2 签署的 SSL 证书


有用命令

OpenSSL 程序是使用 OpenSSL 的库的各种加密功能的命令行工具。 此工具是与 IMPS 一起提供的,位于[配给服务器安装目录]/bin。

下表显示 OpenSSL 程序的几个有用的命令,可以执行与管理证书有关的各种命令:

命令

说明

openssl x509 –in cert.pem –text –noout

打印 .pem 证书的内容。

openssl.exe pkcs12 -in my.pkcs12 –info

打印 .p12 文件的内容。

openssl.exe pkcs12 -export -chain –inkey key.pem –in cert.pem -CAfile cacert.pem -out my.p12

将 .pem 证书/密钥对转换为 .p12。

keytool –list –v  -keystore my.keystore

打印 java 密钥库的内容。

keytool –list –v –alias myalias –keystore my.keystore

打印 java 密钥库中特定别名的内容

keytool –delete –alias myalias –keystore my.keystore

从 java 密钥库中删除别名

keytool –importkeystore –destkeystore my.keystore –srckeystore src.p12 –srcstoretype PKCS12 –srcalias 1 –destalias myalias

将 .p12 导入 java 密钥库。

keytool -import -trustcacerts -alias myrootca -file rootcacert.pem -keystore my.keystore

将 .pem 根 CA 证书导入 java 密钥库。