Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 5e6b9d7

Browse files
committed
Change TestByExtension_FriendlyName to look up the FriendlyName by OID.
Since the extension friendly name is localized, this test only worked on English locales.
1 parent bb05410 commit 5e6b9d7

File tree

1 file changed

+3
-1
lines changed
  • src/System.Security.Cryptography.X509Certificates/tests

1 file changed

+3
-1
lines changed

src/System.Security.Cryptography.X509Certificates/tests/FindTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ public static void TestBySerialNumber_NoMatch()
334334
[ActiveIssue(1993, PlatformID.AnyUnix)]
335335
public static void TestByExtension_FriendlyName()
336336
{
337-
RunSingleMatchTest_MsCer(X509FindType.FindByExtension, "Enhanced Key Usage");
337+
// Cannot just say "Enhanced Key Usage" here because the extension name is localized.
338+
// Instead, look it up via the OID.
339+
RunSingleMatchTest_MsCer(X509FindType.FindByExtension, new Oid("2.5.29.37").FriendlyName);
338340
}
339341

340342
[Fact]

0 commit comments

Comments
 (0)