Skip to content

Commit 9ad9817

Browse files
Copilotgewarren
andcommitted
Fix undefined serverCertificate variable in chain elements ordering example
Co-authored-by: gewarren <[email protected]>
1 parent e9473ea commit 9ad9817

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

snippets/csharp/System.Security.Cryptography.X509Certificates/X509Chain/Overview/chainelements-ordering.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
public class ChainElementsOrdering
55
{
6-
public static void DemonstrateChainElementsOrdering()
6+
public static void DemonstrateChainElementsOrdering(X509Certificate2 certificate)
77
{
88
//<SNIPPET6>
99
using var chain = new X509Chain();
10-
chain.Build(serverCertificate);
10+
chain.Build(certificate);
1111

1212
// chain.ChainElements[0] is the leaf (end-entity) certificate
1313
// chain.ChainElements[^1] is the root (trust anchor) certificate

0 commit comments

Comments
 (0)