|
2 | 2 | title: Use a TLS/SSL certificate in code
|
3 | 3 | description: Learn how to use client certificates in your code. Authenticate with remote resources with a client certificate, or run cryptographic tasks with them.
|
4 | 4 | ms.topic: article
|
5 |
| -ms.date: 09/22/2020 |
| 5 | +ms.date: 02/15/2023 |
6 | 6 | ms.reviewer: yutlin
|
7 | 7 | ms.custom: seodec18
|
8 | 8 |
|
@@ -44,7 +44,7 @@ az webapp config appsettings set --name <app-name> --resource-group <resource-gr
|
44 | 44 | To make all your certificates accessible, set the value to `*`.
|
45 | 45 |
|
46 | 46 | > [!NOTE]
|
47 |
| -> If your are using `*` for the App Setting, you will need to restart your web app after adding a new certificate to your web app to ensure that new certificate becomes accessible to your app. |
| 47 | +> When `WEBSITE_LOAD_CERTIFICATES` is set `*`, all previously added certificates are accessible to application code. If you add a certificate to your app later, restart the app to make the new certificate accessible to your app. For more information, see [When updating (renewing) a certificate](#when-updating-renewing-a-certificate). |
48 | 48 |
|
49 | 49 | ## Load certificate in Windows apps
|
50 | 50 |
|
@@ -178,6 +178,20 @@ var cert = new X509Certificate2(bytes);
|
178 | 178 |
|
179 | 179 | To see how to load a TLS/SSL certificate from a file in Node.js, PHP, Python, Java, or Ruby, see the documentation for the respective language or web platform.
|
180 | 180 |
|
| 181 | +## When updating (renewing) a certificate |
| 182 | + |
| 183 | +When you renew a certificate and add it to your app, it gets a new thumbprint, which also needs to be [made accessible](#make-the-certificate-accessible). How it works depends on your certificate type. |
| 184 | + |
| 185 | +If you manually upload the [public](configure-ssl-certificate.md#upload-a-public-certificate) or [private](configure-ssl-certificate.md#upload-a-private-certificate) certificate: |
| 186 | + |
| 187 | +- If you list thumbprints explicitly in `WEBSITE_LOAD_CERTIFICATES`, add the new thumbprint to the app setting. |
| 188 | +- If `WEBSITE_LOAD_CERTIFICATES` is set to `*`, restart the app to make the new certificate accessible. |
| 189 | + |
| 190 | +If you renew a certificate [in Key Vault](configure-ssl-certificate.md#renew-a-certificate-imported-from-key-vault), such as with an [App Service certificate](configure-ssl-certificate.md#renew-app-service-certificate), the daily sync from Key Vault makes the necessary update automatically when synchronizing your app with the renewed certificate. |
| 191 | + |
| 192 | +- If `WEBSITE_LOAD_CERTIFICATES` contains the old thumbprint of your renewed certificate, the daily sync updates the old thumbprint to the new thumbprint automatically. |
| 193 | +- If `WEBSITE_LOAD_CERTIFICATES` is set to `*`, the daily sync makes the new certificate accessible automatically. |
| 194 | + |
181 | 195 | ## More resources
|
182 | 196 |
|
183 | 197 | * [Secure a custom DNS name with a TLS/SSL binding in Azure App Service](configure-ssl-bindings.md)
|
|
0 commit comments