markdown OPENSSL证书转换

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown OPENSSL证书转换相关的知识,希望对你有一定的参考价值。

# Certificate Formats

Most Certificate Authorities (CAs) issue certificates in PEM format. 
PEM certificates typically have extensions like `.pem`, `.crt`, `.cer`, and .`key`.

The PEM format uses the header and footer lines `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.

Other certificate formats include the `DER/Binary`, `P7B/PKCS#7`, and `PFX/PKCS#12` formats. 

Converting Your Existing Certificate To PEM Format

If your certificate is not in PEM format, you can convert it to the PEM format using the following OpenSSL commands:

### Convert DER to PEM

    openssl x509 -inform der -in certificate.cer -out certificate.pem

### Convert P7B to PEM

    openssl pkcs7 -print_certs -in certificate.p7b -out certificate.pem

### Convert PFX to PEM

    openssl pkcs12 -in certificate.pfx -out certificate.pem -nodes

### Removing Passphrase From Existing Private Key File

If you try to upload a passphrase-protected private key file, you will get a "key is invalid" error message. To fix this you will need to remove the passphrase from your private key file and upload the passphrase-free private key file to your appliance. You can remove the passphrase as follows:

 1. Run `openssl rsa -in example.key -out example.nocrypt.key`

 1. Enter your passphrase.

以上是关于markdown OPENSSL证书转换的主要内容,如果未能解决你的问题,请参考以下文章

markdown 使用OpenSSL下载PEM证书并导入Java TrustStore

openssl pem证书 转换为p12类型证书

sh [OpenSSL pfx转换]将.pfx证书转换为SSL证书和未加密的私钥#openssl #pfx #certificate #ssl #private #key #encr

[证书] OPENSSL将PFX证书转换为PEM格式

使用 OpenSSL 实现私钥和证书的转换

openssl生成https证书转换证书格式的各种相关操作