How Do I Convert a Certificate into the PEM Format?
Certificate formats can be converted mutually.
It is recommended that OpenSSL be used to convert certificates in other formats into the PEM format. The following examples illustrate some popular conversion methods.
Converting the Certificate Format to PEM
Format |
Conversion Method (Using OpenSSL) |
---|---|
CER/CRT |
Rename the cert.crt certificate file to cert.pem. |
PFX |
|
P7B |
|
DER |
|
PKCS8 Certificate Encoding Format
As Huawei Cloud WAF, ELB, and CDN do not support the PKCS8 format, an error will occur if you upload a certificate in PKCS8 format to SCM and then deploy it on WAF, ELB, or CDN.
- If the private key file of a certificate starts with -----BEGIN PRIVATE KEY-----, the certificate is in PKCS8 format.
- If the private key file of a certificate starts with -----BEGIN RSA PRIVATE KEY-----, the certificate is in PKCS1 format.
If your public or private key is in PKCS8 format, perform the following operations to use the PKCS8 certificate to WAF and CDN services:
- Check whether the certificate is in PEM format.
- If yes, go to 2.
- If no, convert the certificate format to PEM by referring to Converting the Certificate Format to PEM and then go to 2.
- Run the following commands to convert format from PKCS8 to PKCS1:
- Upload the converted certificate to SCM. For more details, see Uploading an External Certificate.
- Deploy the uploaded certificate on other Huawei Cloud product. For more details, see Deploying an SSL Certificate to Other Cloud Products.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot