In the previous articles on the replacement certificate for VMware products, different OpenSSL configuration commands are used depending on the scenario, and are summarized as follows:
#建立私钥
OpenSSL Genrsa 2048 > Rui.key
#转换格式为pfx
OpenSSL pkcs12-export-in rui.crt-inkey rui.key-name rui-passout pass:testpassword-out
#重启vc服务
Vpxd-p
# Create a certificate request:
OpenSSL Req–new–key rui.key > SITE.CSR
OpenSSL req-new-x509-days 3650-key server.key-out server.crt-subj "/c=cn/st=mykey/l=mykey/o=mykey/ou=mykey/cn=domai N1/cn=domain2/cn=domain3 "
# get key file from PFX file:
OpenSSL pkcs12-in site.pfx-nocerts-nodes-out Site.key
# Get CRT files from PFX file:
OpenSSL pkcs12-in site.pfx-clcerts-nokeys-out site.crt
# Merge CRT and key for PFX:
OpenSSL pkcs12–export–in site.crt–inkey site.key–name site–passout pass:testpassword–out
# Convert certificates into PKCS12 format
OpenSSL pkcs12-export-in Server.cer-inkey server.key-out server.p12
# Convert certificate format to JKS format
Keytool-importkeystore-srcstoretype Pkcs12-srckeystore Server.p12-destkeystore Server.jks
# Conversion of pkcs#12 to PEM
OpenSSL pkcs12-in yourcert.pfx-out youcert.pem–nodes
# PEM to pkcs#12 conversion,
OpenSSL pkcs12-export-in cert.pem-out Cert.p12-inkey Key.pem
# turn a PFX without a password
OpenSSL pkcs12-export-in vcops.cer-inkey vcops.key-name vcops-out vcops.pfx
# PFX pack PEM with no password
OpenSSL pkcs12-in Vcops.pfx-inkey vcops.key-out vcops.pem-nodes
This article is from the "VirtualBox" blog, please be sure to keep this source http://virtualbox.blog.51cto.com/531002/1104431