You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/configure-ssl-certificate-in-code.md
+60-2Lines changed: 60 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ 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
5
ms.custom: linux-related-content
6
-
ms.date: 02/15/2023
6
+
ms.date: 05/01/2024
7
7
ms.reviewer: yutlin
8
8
ms.author: msangapu
9
9
author: msangapu-msft
@@ -148,7 +148,9 @@ The certificate file names are the certificate thumbprints.
148
148
> App Service inject the certificate paths into Windows containers as the following environment variables `WEBSITE_PRIVATE_CERTS_PATH`, `WEBSITE_INTERMEDIATE_CERTS_PATH`, `WEBSITE_PUBLIC_CERTS_PATH`, and `WEBSITE_ROOT_CERTS_PATH`. It's better to reference the certificate path with the environment variables instead of hardcoding the certificate path, in case the certificate paths change in the future.
149
149
>
150
150
151
-
In addition, [Windows Server Core containers](configure-custom-container.md#supported-parent-images) load the certificates into the certificate store automatically, in **LocalMachine\My**. To load the certificates, follow the same pattern as [Load certificate in Windows apps](#load-certificate-in-windows-apps). For Windows Nano based containers, use these file paths [Load the certificate directly from file](#load-certificate-from-file).
151
+
In addition, [Windows Server Core and Windows Nano Server containers](configure-custom-container.md#supported-parent-images) load the certificates into the certificate store automatically, in **LocalMachine\My**. To load the certificates, follow the same pattern as [Load certificate in Windows apps](#load-certificate-in-windows-apps). For Windows Nano based containers, use these file paths [Load the certificate directly from file](#load-certificate-from-file).
152
+
153
+
### [Linux](#tab/linux)
152
154
153
155
The following C# code shows how to load a public certificate in a Linux app.
154
156
@@ -177,6 +179,62 @@ var cert = new X509Certificate2(bytes);
177
179
// Use the loaded certificate
178
180
```
179
181
182
+
### [Windows](#tab/windows)
183
+
184
+
The following C# example shows how to load a public certificate in a .NET Framework app in a Windows Server Core Container.
To see how to load a TLS/SSL certificate from a file in Node.js, PHP, Python, or Java, see the documentation for the respective language or web platform.
0 commit comments