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

Commit 1e1b6f7

Browse files
committed
Merge pull request #2080 from bartonjs/fix-x509tests-xlang
Change TestByExtension_FriendlyName to look up the FriendlyName by OID.
2 parents bb05410 + 5e6b9d7 commit 1e1b6f7

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)