將.crt、.cer、.pfx、.p7b、.der的ssl證書(shū)轉(zhuǎn)換成.pem格式 | 您所在的位置:網(wǎng)站首頁(yè) › 屬豬人2022年十二月份運(yùn)勢(shì)及運(yùn)程 › 將.crt、.cer、.pfx、.p7b、.der的ssl證書(shū)轉(zhuǎn)換成.pem格式 |
一、CER/CRT 轉(zhuǎn)換為 PEM
這兩種格式的證書(shū)可通過(guò)直接修改證書(shū)文件擴(kuò)展名的方式轉(zhuǎn)換,如將”server.crt”直接重命名為”server.pem”即可 二、PFX 轉(zhuǎn)換為 PEMPFX 格式一般出現(xiàn)在 windows server 中,可通過(guò) openssl 命令轉(zhuǎn)換。 提取私鑰: openssl pkcs12 -in certname.pfx -nocerts -out key.pem -nodes 提取證書(shū):openssl pkcs12 -in certname.pfx -nokeys -out cert.pem 三、P7B 轉(zhuǎn)換為 PEMP7B 格式一般出現(xiàn)在 windows server 和 tomcat 中,可通過(guò) openssl 命令轉(zhuǎn)換。 證書(shū)轉(zhuǎn)化:openssl pkcs7 -print_certs -in incertificat.p7b -out outcertificate.cer 獲取 outcertificat.cer 里面[-----BEGIN CERTIFICATE-----, -----END CERTIFICATE-----]的內(nèi)容,保存為 pem 格式作為證書(shū)上傳。 私鑰轉(zhuǎn)化:無(wú)私鑰 四、DER 轉(zhuǎn)換為 PEMDER 格式一般出現(xiàn)在 java 平臺(tái)中。 證書(shū)轉(zhuǎn)化:openssl x509 -inform der -in certificate.cer -out certificate.pem 私鑰轉(zhuǎn)化:openssl rsa -inform DER -outform PEM -in privatekey.der -out privatekey.pem |
CopyRight 2018-2019 實(shí)驗(yàn)室設(shè)備網(wǎng) 版權(quán)所有 |