5.3. 在 IdM Web UI 中转换外部证书以加载到 IdM 用户帐户
您可以将外部证书转换为 PEM
格式,并在 IdM Web UI 中将其添加到 IdM 用户帐户中。
流程
使用
CLI
,将证书转换为PEM
格式:-
如果您的证书为
DER
格式:
openssl x509 -in cert.crt -inform der -outform pem -out cert.pem
$ openssl x509 -in cert.crt -inform der -outform pem -out cert.pem
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 如果您的文件是
PKCS #12
格式,其通用文件扩展名为.pfx
和.p12
,并且包含证书、私钥和其他数据,请使用openssl pkcs12
工具提取证书。提示时,输入保护存储在文件中私钥的密码:openssl pkcs12 -in cert_and_key.p12 -clcerts -nokeys -out cert.pem
$ openssl pkcs12 -in cert_and_key.p12 -clcerts -nokeys -out cert.pem Enter Import Password:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
如果您的证书为
-
在编辑器中打开证书,并复制内容。您可以包含 "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" 页眉和页脚行,但不必这样做,因为
PEM
和base64
格式已被 IdM Web UI 接受了。 - 在 IdM Web UI 中,以安全官员身份登录。
-
前往 Identity
Users <user_name>
。 - 单击 Certificates 旁边的 Add。
- 将证书的 PEM 格式内容粘贴到打开的窗口中。
点击 Add。
如果证书被系统接受,您可以在用户配置文件中看到它列在 Certificates 中。