Updated on 2024-07-08 GMT+08:00

Configuring an HTTPS Certificate

Background

CDN supports HTTPS acceleration. You can configure an HTTPS certificate for an acceleration domain name on the CDN console. Then clients can use HTTPS to access CDN PoPs. The differences between HTTP and HTTPS are as follows:

  • 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.

Constraints

  • CDN supports your own certificates. The format of your own certificates must meet the requirements described in HTTPS Certificate Requirements.
  • 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.

Precautions

  • 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
  • Certificate settings will be automatically deleted once HTTPS acceleration is disabled. To enable HTTPS acceleration again, you need to re-configure the certificate.
  • If your certificate has changed, update certificate information on the CDN console in a timely manner.
  • To use HTTPS for all links, the origin protocol should be HTTPS (and the origin server must support HTTPS). For details, see Origin Protocol.

Configuring an HTTPS Certificate

  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 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 Cloud Certificate Manager (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.
  8. (Optional) To set another certificate, click Add 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 an 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, 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.

Disabling a Certificate

  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. Click Edit next to HTTPS Settings.

    The Configure HTTPS Secure Acceleration dialog box is displayed.

  6. Disable the Status switch and click OK.
    • Disable QUIC before disabling the certificate.

Certificate Expiration Time

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