Skip to content

Commit b3cb6e3

Browse files
authored
validOnly
1 parent 12d0b1f commit b3cb6e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/app-service/configure-ssl-certificate-in-code.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ using System.Linq;
5858
using System.Security.Cryptography.X509Certificates;
5959

6060
string certThumbprint = "E661583E8FABEF4C0BEF694CBC41C28FB81CD870";
61+
bool validOnly = false;
6162

6263
using (X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser))
6364
{
@@ -67,7 +68,7 @@ using (X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUs
6768
X509FindType.FindByThumbprint,
6869
// Replace below with your certificate's thumbprint
6970
certThumbprint,
70-
false);
71+
validOnly);
7172
// Get the first cert with the thumbprint
7273
X509Certificate2 cert = certCollection.OfType<X509Certificate>().FirstOrDefault();
7374

0 commit comments

Comments
 (0)