Updated on 2024-03-29 GMT+08:00

HTTPS

You can configure an HTTPS certificate for an acceleration domain name on the CDN console to enable HTTPS acceleration.

Background

  • HTTP

    HTTP transfers content in plaintext without any data encryption. If an attacker intercepts packets transmitted between browsers and website servers, the transmitted content can be read directly.

  • HTTPS

    Based on HTTP, HTTPS uses Secure Sockets Layer (SSL) to encrypt data transmission. With SSL, servers are authenticated using certificates, and communications between browsers and servers are encrypted.

Prerequisites

CDN supports your own certificates or SCM certificates. The format of your own certificates must meet the requirements described in HTTPS Certificate Requirements.

Precautions

  • Only certificates and private keys in PEM format are supported. If a certificate is not in PEM format, convert the certificate by referring to HTTPS Certificate Requirements.
  • An acceleration domain name has its associated certificate. They must match. If your domain name is a wildcard domain, configure a certificate for it by referring to How Do I Configure a Certificate If My Domain Name Is a Wildcard Domain?
  • Certificate settings will be automatically deleted once HTTPS secure acceleration is disabled. You need to re-configure the certificate if HTTPS secure acceleration is enabled again.
  • If your certificate has changed, update certificate information on the CDN console in a timely manner.
  • If two certificates are set for a domain name, the certificate standards must be different. That is, if you have added an international certificate for a domain name, you can only add a Chinese (SM2) certificate.

Configuring HTTPS Certificates

  1. Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.

    The CDN console is displayed.

  2. In the navigation pane, choose Domains.
  3. In the domain list, click the target domain name or click Configure in the Operation column.
  4. Click the HTTPS Settings tab.
  5. On the HTTPS Settings tab page, click Edit. The Configure HTTPS Secure Acceleration dialog box is displayed.
    Figure 1 Configuring HTTPS secure acceleration

  6. Switch on Status to enable this configuration item.
  7. Set related parameters.
    Table 1 Parameters of an international certificate

    Parameter

    Description

    Certificate Standard

    International: SSL certificate that complies with international standards.

    Certificate Source

    Select My certificate or SCM certificate.

    Certificate Name

    • My certificate: Enter the certificate name containing 3 to 64 characters.
    • SCM certificate: CDN automatically obtains SSL certificates uploaded to the CCM console. You only need to select the desired one from the drop-down list.

    Certificate Body

    • My certificate: Use a local text editor to open the certificate and copy the content to the text box.
    • SCM certificate: The certificate body is automatically filled in.
    NOTE:

    The certificate body cannot contain spaces or blank lines. Otherwise, a message is displayed indicating that certificate parameters are incorrect.

    Private Key

    • My certificate: Use a local text editor to open the private key and copy the content to the text box.
    • SCM certificate: The private key is automatically filled in.
    Table 2 Parameters of a Chinese SM series cryptographic certificate

    Parameter

    Description

    Certificate Standard

    Chinese (SM2)

    Certificate Source

    Select My certificate or SCM certificate.

    Certificate Name

    • If you select My certificate, enter the certificate name containing 3 to 64 characters.
    • If you select SCM certificate, CDN automatically obtains SSL certificates uploaded to the CCM console. You only need to select the desired one from the drop-down list.

    Signature Certificate

    Open the PEM file in the signature certificate to be uploaded as a text file and copy the certificate content in the file to this text box.

    Note that you need to upload a combined certificate file that contains both the server certificate content and certificate chain content into this field. The content of the certificate chain should be pasted right below the content of the server certificate.

    Signature Private Key

    Open the KEY file in the signature certificate to be uploaded as a text file and copy the private key in the file to this text box.

    Encryption Certificate

    Open the PEM file in the encryption certificate to be uploaded as a text file and copy the certificate content in the file to this text box.

    You do not need to upload the certificate chain here.

    Encryption Private Key

    Open the KEY file in the encryption certificate to be uploaded as a text file and copy the private key in the file to this text box.

  8. (Optional) To set another certificate, click Add Certificate at the bottom and set related parameters.
    • Standards of the two certificates must be different. For example, if you have set an international certificate, you can add a Chinese (SM2) certificate.
  9. Click OK.
  10. Check whether the HTTPS certificate has taken effect.

    If the certificate has taken effect, you can access website resources of the acceleration domain name through HTTPS and view the website authentication information by clicking the lock icon in the address box of the browser.

Updating the HTTPS Certificate

If your domain name certificate is updated, you need to update the certificate details in the HTTPS configuration item.

  1. Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.

    The CDN console is displayed.

  2. In the navigation pane, choose Domains.
  3. In the domain list, click the target domain name or click Configure in the Operation column.
  4. Click the HTTPS Settings tab.
  5. On the HTTPS Settings tab page, click Edit. The Configure HTTPS Secure Acceleration dialog box is displayed.
    Figure 2 Updating a certificate

  6. Click Update to update the configured certificate and private key. It takes approximately 5 to 10 minutes for the update to take effect.

Viewing HTTPS Certificate Information

On the HTTPS certificate configuration page, you can view details about the HTTPS certificate configured for the acceleration domain names.

  1. Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.

    The CDN console is displayed.

  2. In the navigation pane, choose Domains.
  3. In the domain list, click the target domain name or click Configure in the Operation column.
  4. Click the HTTPS Settings tab.
  5. On the page displayed, you can view details about the HTTPS certificate configured for the domain name, such as the certificate expiration time. You can also view the certificate content. However, the private key content cannot be viewed, for security reasons.

Certificate Expiration Time

The expiration time of a certificate chain is the same as that of the certificate that first expires in the chain.