Skip to content

Commit 5f204a6

Browse files
author
Mackinnon Buck
committed
Skip MLDsa if not supported
1 parent 0ec2fec commit 5f204a6

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/Servers/Kestrel/Kestrel/test/KestrelConfigurationLoaderTests.cs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -686,21 +686,25 @@ public void ConfigureEndpoint_ThrowsWhen_The_KeyIsPublic()
686686
public static TheoryData<string, string, string> GetPemCertificateTestData()
687687
{
688688
var data = new TheoryData<string, string, string>();
689-
var algorithms = new List<string>
690-
{
689+
List<string> algorithms = [
691690
"RSA",
692691
"ECDsa",
693692
"DSA",
694-
"MLDsa44",
695-
"MLDsa65",
696-
"MLDsa87"
697-
};
693+
];
698694

699695
#pragma warning disable SYSLIB5006
696+
if (MLDsa.IsSupported)
697+
{
698+
algorithms.AddRange([
699+
"MLDsa44",
700+
"MLDsa65",
701+
"MLDsa87",
702+
]);
703+
}
704+
700705
if (SlhDsa.IsSupported)
701706
{
702-
algorithms.AddRange(
703-
[
707+
algorithms.AddRange([
704708
"SlhDsaSha2_128s",
705709
"SlhDsaSha2_128f",
706710
"SlhDsaSha2_192s",

0 commit comments

Comments
 (0)