|
1 | 1 | --- |
2 | 2 | title: Manage custom certificates |
3 | 3 | pcx_content_type: how-to |
| 4 | +description: Learn how to manage custom certificates for your Cloudflare for SaaS custom hostnames. |
4 | 5 | sidebar: |
5 | 6 | order: 6 |
6 | 7 | head: |
7 | 8 | - tag: title |
8 | | - content: Manage custom certificates — Cloudflare for SaaS |
| 9 | + content: Manage custom certificates |
9 | 10 |
|
10 | 11 | --- |
11 | 12 |
|
12 | | -import { Render } from "~/components" |
| 13 | +import { Render, TabItem, Tabs } from "~/components" |
13 | 14 |
|
14 | | -For use cases and limitations, refer to [custom certificates](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/custom-certificates/). |
| 15 | +Learn how to manage custom certificates for your Cloudflare for SaaS custom hostnames. For use cases and limitations, refer to [custom certificates](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/custom-certificates/). |
15 | 16 |
|
16 | | -:::caution |
| 17 | +## Upload certificates |
17 | 18 |
|
18 | | -You can only use one of the different [supported types](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/custom-certificates/#limitations). For example, you cannot upload an `SHA256WithRSA` + `ECDSAWithSHA256` certificate. |
19 | | -::: |
| 19 | +This section describes the general process for uploading a custom certificate corresponding to one of the [supported types](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/custom-certificates/#limitations). |
20 | 20 |
|
21 | | -## Upload certificates |
| 21 | +:::note |
| 22 | +If you must support both RSA and ECDSA refer to [certificate packs](#use-certificate-packs-rsa-and-ecdsa) below. |
| 23 | +::: |
22 | 24 |
|
23 | | -### With the dashboard |
| 25 | +<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard"> |
24 | 26 |
|
25 | | -To upload a custom certificate in the dashboard, follow the steps for [issuing new certificates](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/issue-and-validate/issue-certificates/), but change the **Certificate type** to **Custom certificate**. |
| 27 | +To upload a custom certificate in the dashboard, select **Custom certificate** while [creating your custom hostname](/cloudflare-for-platforms/cloudflare-for-saas/domain-support/create-custom-hostnames/). |
26 | 28 |
|
27 | | -For more details on bundle method, refer to [Bundle Methodologies](/ssl/edge-certificates/custom-certificates/bundling-methodologies/) |
| 29 | +For information about the **bundle method** options, refer to the [Cloudflare SSL/TLS documentation](/ssl/edge-certificates/custom-certificates/bundling-methodologies/). |
28 | 30 |
|
29 | | -### With the API |
| 31 | +</TabItem> <TabItem label="API"> |
30 | 32 |
|
31 | 33 | The call below will upload a certificate for use with `app.example.com`. |
32 | 34 |
|
33 | 35 | Note that if you are using an ECC key generated by OpenSSL, you will need to first remove the `-----BEGIN EC PARAMETERS-----...-----END EC PARAMETERS-----` section of the file. |
34 | 36 |
|
35 | | -#### 1. Update the file and build the payload |
| 37 | +1. Update the file and build the payload |
36 | 38 |
|
37 | 39 | <Render file="custom-cert-file-example" product="ssl" /> |
38 | 40 |
|
|
52 | 54 | )) |
53 | 55 | ``` |
54 | 56 |
|
55 | | -#### 2. Upload your certificate and key |
56 | | - |
57 | | -Use a [POST request](/api/resources/custom_hostnames/methods/create/) to upload your certificate and key. |
| 57 | +2. Use a [`POST` request](/api/resources/custom_hostnames/methods/create/) to upload your certificate and key. |
58 | 58 |
|
| 59 | +:::note |
59 | 60 | The serial number returned is unique to the issuer, but not globally unique. Additionally, it is returned as a string, not an integer. |
| 61 | +::: |
| 62 | + |
| 63 | +</TabItem> </Tabs> |
| 64 | + |
| 65 | +## Use certificate packs: RSA and ECDSA |
| 66 | + |
| 67 | +A certificate pack allows you to upload up to one RSA and one ECDSA custom certificates to a custom hostname. This process is currently only supported via API. |
| 68 | + |
| 69 | +To upload an RSA and ECDSA certificate to a custom hostname, set the `bundle_method` to `force` and define the `custom_cert_bundle` property when [creating a custom hostname via API](/api/resources/custom_hostnames/methods/create/). |
| 70 | + |
| 71 | +You can also use `"bundle_method": "force"` and `custom_cert_bundle` with a `PATCH` request to the [Edit Custom Hostname](/api/resources/custom_hostnames/methods/edit/) endpoint. |
| 72 | + |
| 73 | +### Delete a custom certificate and private key |
| 74 | + |
| 75 | +Use the [Delete Single Certificate And Key For Custom Hostname](/api/resources/custom_hostnames/subresources/certificate_pack/subresources/certificates/methods/delete/) endpoint to remove one of the custom certificates and corresponding key from a certificate pack. |
| 76 | + |
| 77 | +You cannot delete a certificate if it is the only remaining certificate in the pack. |
| 78 | + |
| 79 | +### Replace a custom certificate and private key |
| 80 | + |
| 81 | +To replace a single custom certificate within a certificate pack that contains two bundled certificates, use the [Replace Custom Certificate And Custom Key In Custom Hostname](/api/resources/custom_hostnames/subresources/certificate_pack/subresources/certificates/methods/update/) endpoint. |
| 82 | + |
| 83 | +You can only replace an RSA certificate with another RSA certificate, or an ECDSA certificate with another ECDSA certificate. |
60 | 84 |
|
61 | 85 | *** |
62 | 86 |
|
63 | 87 | ## Move to a Cloudflare certificate |
64 | 88 |
|
65 | 89 | If you want to switch from maintaining a custom certificate to using one issued by Cloudflare, you can migrate that certificate with zero downtime. |
66 | 90 |
|
67 | | -Send a [PATCH request](/api/resources/custom_hostnames/methods/edit/) to your custom hostname with a value for the DCV `method`. As soon as the [certificate is validated](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/issue-and-validate/) and the [hostname is validated](/cloudflare-for-platforms/cloudflare-for-saas/domain-support/hostname-validation/), Cloudflare will remove the old custom certificate and begin serving the new one. |
| 91 | +Send a [`PATCH` request](/api/resources/custom_hostnames/methods/edit/) to your custom hostname with a value for the DCV `method`. As soon as the [certificate is validated](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/issue-and-validate/) and the [hostname is validated](/cloudflare-for-platforms/cloudflare-for-saas/domain-support/hostname-validation/), Cloudflare will remove the old custom certificate and begin serving the new one. |
0 commit comments