Updated on 2024-12-24 GMT+08:00

Uploading a Certificate

If the origin server type is IP address and the forwarding protocol is HTTPS, you need to bind a certificate to the protected domain name. Before binding a certificate, you can upload the required certificate on the certificate management page.

Uploading a Certificate

  1. Log in to the management console.
  2. Select a region in the upper part of the page, click in the upper left corner of the page, and choose Security & Compliance > Anti-DDoS Service. The Anti-DDoS Service Center page is displayed.
  3. In the navigation pane on the left, choose Advanced Anti-DDoS > Domain Name Access. The Domain Name Access page is displayed.

    Figure 1 Domain name access

  4. Choose Certificates. The certificate list is displayed.

    Figure 2 Viewing the certificate

  5. Click Upload Certificate.
  6. Enter the certificate name and paste the certificate and private key text content. Currently, only PEM certificates are supported. For details about how to convert non-PEM certificates to PEM certificates, see Table 1.

    Figure 3 Uploading a certificate
    Table 1 Certificate format conversion commands

    Format

    Conversion Method

    CER/CRT

    Rename the cert.crt certificate file to cert.pem.

    PFX

    Use OpenSSL to convert the certificate.

    Obtain a private key. For example, run the following command to convert cert.pfx into cert.key:

    openssl pkcs12 -in cert.pfx -nocerts -out cert.key -nodes

    Obtain a certificate. For example, run the following command to convert cert.pfx into cert.pem:

    openssl pkcs12 -in cert.pfx -nokeys -out cert.pem

    P7B

    Use OpenSSL to convert the certificate.

    1. Run the following command to convert the certificate: openssl pkcs7 -print_certs -in incertificat.p7b -out cert.cer
    2. Obtain the certificate content in cert.cer.
    3. Save the content in .pem format.

    DER

    Use OpenSSL to convert the certificate.

    1. Obtain a private key. For example, run the following command to convert privatekey.der into privatekey.pem:

      openssl rsa -inform DER -outform PEM -in privatekey.der -out privatekey.pem

    2. Obtain a certificate. For example, run the following command to convert cert.cer into cert.pem:

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

    Before running the openssl command in Windows, ensure that the OpenSSL tool has been installed.

  7. Click OK. The certificate is uploaded.