Skip to content

Commit aaa805d

Browse files
committed
[wasi] Run Microsoft.Bcl.Cryptography.Tests on WASI
Drop the dotnet#99126 exclusion. The suite's remaining failures were expectations that only recognized browser as the reduced-crypto platform, so the shared crypto test helpers now treat WASI the same way: skip the X.509, AES/TripleDES password-based-encryption and threading tests on WASI as they are on browser, expect RSA, DSA and AES-GCM to be unsupported, and don't probe for OpenSSL. Co-authored-by: Copilot App <[email protected]>
1 parent 42a700f commit aaa805d

16 files changed

Lines changed: 47 additions & 49 deletions

‎src/libraries/Common/tests/System/Security/Cryptography/AesGcmTests.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ public static void CtorThrowsPNSEIfNotSupported()
10541054
[Fact]
10551055
public static void CheckIsSupported()
10561056
{
1057-
bool expectedIsSupported = !PlatformDetection.IsBrowser;
1057+
bool expectedIsSupported = !PlatformDetection.IsWasm;
10581058

10591059
Assert.Equal(expectedIsSupported, AesGcm.IsSupported);
10601060
}

‎src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLDsa/CompositeMLDsaFactoryTests.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ public static void Import_WrongAsnType()
543543
public static void ImportSubjectPublicKeyInfo_AlgorithmErrorsInAsn()
544544
{
545545
#if !NETFRAMEWORK // Does not support exporting RSA SPKI
546-
if (!OperatingSystem.IsBrowser())
546+
if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi())
547547
{
548548
// RSA key
549549
using RSA rsa = RSA.Create();
@@ -599,7 +599,7 @@ public static void ImportSubjectPublicKeyInfo_SupportedButHasUnsupportedAlgorith
599599
public static void ImportPkcs8PrivateKey_AlgorithmErrorsInAsn()
600600
{
601601
#if !NETFRAMEWORK // Does not support exporting RSA PKCS#8 private key
602-
if (!OperatingSystem.IsBrowser())
602+
if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi())
603603
{
604604
// RSA key isn't valid for ML-DSA
605605
using RSA rsa = RSA.Create();

‎src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLKem/CompositeMLKemContractTests.cs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public static void ExportEncryptedPkcs8PrivateKey_PbeAlgorithmUnknown(CompositeM
115115
}
116116

117117
[Theory]
118-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires TripleDES, which is not supported on Browser.")]
118+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires TripleDES, which is not supported on Browser.")]
119119
[MemberData(nameof(CompositeMLKemTestData.AllAlgorithmsTestData), MemberType = typeof(CompositeMLKemTestData))]
120120
public static void ExportEncryptedPkcs8PrivateKey_Pkcs12HashInvalid(CompositeMLKemAlgorithm algorithm)
121121
{
@@ -127,7 +127,7 @@ public static void ExportEncryptedPkcs8PrivateKey_Pkcs12HashInvalid(CompositeMLK
127127
}
128128

129129
[Theory]
130-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires TripleDES, which is not supported on Browser.")]
130+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires TripleDES, which is not supported on Browser.")]
131131
[MemberData(nameof(CompositeMLKemTestData.AllAlgorithmsTestData), MemberType = typeof(CompositeMLKemTestData))]
132132
public static void ExportEncryptedPkcs8PrivateKey_BytePasswordRejectsPkcs12Kdf(CompositeMLKemAlgorithm algorithm)
133133
{
@@ -939,7 +939,7 @@ public static void TryExportSubjectPublicKeyInfo_DestinationTooSmall(CompositeML
939939
}
940940

941941
[Theory]
942-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
942+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
943943
[MemberData(nameof(CompositeMLKemTestData.AllAlgorithmsTestData), MemberType = typeof(CompositeMLKemTestData))]
944944
public static void ExportEncryptedPkcs8PrivateKey_ProducesEncryptedPrivateKeyInfo(CompositeMLKemAlgorithm algorithm)
945945
{
@@ -965,7 +965,7 @@ public static void ExportEncryptedPkcs8PrivateKey_ProducesEncryptedPrivateKeyInf
965965
}
966966

967967
[Theory]
968-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
968+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
969969
[MemberData(nameof(CompositeMLKemTestData.AllAlgorithmsTestData), MemberType = typeof(CompositeMLKemTestData))]
970970
public static void ExportEncryptedPkcs8PrivateKey_CoreCryptographicException_Propagates(CompositeMLKemAlgorithm algorithm)
971971
{
@@ -985,7 +985,7 @@ public static void ExportEncryptedPkcs8PrivateKey_CoreCryptographicException_Pro
985985
}
986986

987987
[Theory]
988-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
988+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
989989
[MemberData(nameof(CompositeMLKemTestData.AllAlgorithmsTestData), MemberType = typeof(CompositeMLKemTestData))]
990990
public static void TryExportEncryptedPkcs8PrivateKey_DestinationTooSmall(CompositeMLKemAlgorithm algorithm)
991991
{

‎src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/CompositeMLKem/CompositeMLKemFactoryTests.cs‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public static void ImportPkcs8PrivateKey_AllowsBerEncoding(CompositeMLKemTestVec
279279
}
280280

281281
[Fact]
282-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
282+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
283283
public static void ImportEncryptedPkcs8PrivateKey_TrailingData()
284284
{
285285
byte[] encryptedPkcs8 = CompositeMLKemTestHelpers.CreateEncryptedPkcs8PrivateKey(
@@ -291,7 +291,7 @@ public static void ImportEncryptedPkcs8PrivateKey_TrailingData()
291291
}
292292

293293
[Fact]
294-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
294+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
295295
public static void ImportEncryptedPkcs8PrivateKey_Truncated()
296296
{
297297
byte[] encryptedPkcs8 = CompositeMLKemTestHelpers.CreateEncryptedPkcs8PrivateKey(
@@ -303,7 +303,7 @@ public static void ImportEncryptedPkcs8PrivateKey_Truncated()
303303
}
304304

305305
[Fact]
306-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
306+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
307307
public static void ImportEncryptedPkcs8PrivateKey_WrongPassword()
308308
{
309309
byte[] encryptedPkcs8 = CompositeMLKemTestHelpers.CreateEncryptedPkcs8PrivateKey(
@@ -316,7 +316,7 @@ public static void ImportEncryptedPkcs8PrivateKey_WrongPassword()
316316
}
317317

318318
[Fact]
319-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
319+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
320320
public static void ImportEncryptedPkcs8PrivateKey_NotCompositeMLKemKey()
321321
{
322322
byte[] encryptedPkcs8 = CompositeMLKemTestHelpers.CreateEncryptedPkcs8PrivateKey(
@@ -334,7 +334,7 @@ public static void ImportEncryptedPkcs8PrivateKey_NotCompositeMLKemKey()
334334
}
335335

336336
[Fact]
337-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires TripleDES, which is not supported on Browser.")]
337+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires TripleDES, which is not supported on Browser.")]
338338
public static void ImportEncryptedPkcs8PrivateKey_BytePassword_RejectsPkcs12Kdf()
339339
{
340340
byte[] encryptedPkcs8 = CompositeMLKemTestHelpers.CreateEncryptedPkcs8PrivateKey(
@@ -348,7 +348,7 @@ public static void ImportEncryptedPkcs8PrivateKey_BytePassword_RejectsPkcs12Kdf(
348348
}
349349

350350
[Theory]
351-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
351+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
352352
[MemberData(nameof(CompositeMLKemTestData.SupportedAlgorithmIetfVectorsTestData), MemberType = typeof(CompositeMLKemTestData))]
353353
public static void ImportEncryptedPkcs8PrivateKey_BytePassword_Success(CompositeMLKemTestVector vector)
354354
{
@@ -372,7 +372,7 @@ public static void ImportEncryptedPkcs8PrivateKey_BytePassword_Success(Composite
372372
}
373373

374374
[Theory]
375-
[SkipOnPlatform(TestPlatforms.Browser, "Password-based encryption requires AES, which is not supported on Browser.")]
375+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Password-based encryption requires AES, which is not supported on Browser.")]
376376
[MemberData(nameof(CompositeMLKemTestData.SupportedAlgorithmIetfVectorsTestData), MemberType = typeof(CompositeMLKemTestData))]
377377
public static void ImportEncryptedPkcs8PrivateKey_CharPassword_Success(CompositeMLKemTestVector vector)
378378
{

‎src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaImplementationTests.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public static void ImportPkcs8_WrongTypeInAsn()
220220
public static void ImportSubjectPublicKeyInfo_AlgorithmErrorsInAsn()
221221
{
222222
#if !NETFRAMEWORK // Does not support exporting RSA SPKI
223-
if (!OperatingSystem.IsBrowser())
223+
if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi())
224224
{
225225
// RSA key
226226
using RSA rsa = RSA.Create();
@@ -258,7 +258,7 @@ public static void ImportSubjectPublicKeyInfo_AlgorithmErrorsInAsn()
258258
public static void ImportPkcs8PrivateKey_AlgorithmErrorsInAsn()
259259
{
260260
#if !NETFRAMEWORK // Does not support exporting RSA PKCS#8 private key
261-
if (!OperatingSystem.IsBrowser())
261+
if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi())
262262
{
263263
// RSA key isn't valid for ML-DSA
264264
using RSA rsa = RSA.Create();

‎src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/SlhDsa/SlhDsaFactoryTests.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static void ImportPkcs8_WrongTypeInAsn()
123123
public static void ImportSubjectPublicKeyInfo_AlgorithmErrorsInAsn()
124124
{
125125
#if !NETFRAMEWORK // Does not support exporting RSA SPKI
126-
if (!OperatingSystem.IsBrowser())
126+
if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi())
127127
{
128128
// RSA key
129129
using RSA rsa = RSA.Create();
@@ -161,7 +161,7 @@ public static void ImportSubjectPublicKeyInfo_AlgorithmErrorsInAsn()
161161
public static void ImportPkcs8PrivateKey_AlgorithmErrorsInAsn()
162162
{
163163
#if !NETFRAMEWORK // Does not support exporting RSA PKCS#8 private key
164-
if (!OperatingSystem.IsBrowser())
164+
if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi())
165165
{
166166
// RSA key isn't valid for SLH-DSA
167167
using RSA rsa = RSA.Create();

‎src/libraries/Common/tests/System/Security/Cryptography/MLKemContractTests.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ public static void ExportEncryptedPkcs8PrivateKey_Disposed()
764764
[InlineData(TryExportPkcs8PasswordKind.StringPassword)]
765765
[InlineData(TryExportPkcs8PasswordKind.SpanOfBytesPassword)]
766766
[InlineData(TryExportPkcs8PasswordKind.SpanOfCharsPassword)]
767-
[SkipOnPlatform(TestPlatforms.Browser, "Browser does not support symmetric encryption")]
767+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Browser does not support symmetric encryption")]
768768
public static void TryExportEncryptedPkcs8PrivateKey_ExportsPkcs8(TryExportPkcs8PasswordKind kind)
769769
{
770770
using MLKemContract kem = new(MLKemAlgorithm.MLKem512)
@@ -794,7 +794,7 @@ public static void TryExportEncryptedPkcs8PrivateKey_ExportsPkcs8(TryExportPkcs8
794794
[InlineData(TryExportPkcs8PasswordKind.StringPassword)]
795795
[InlineData(TryExportPkcs8PasswordKind.SpanOfBytesPassword)]
796796
[InlineData(TryExportPkcs8PasswordKind.SpanOfCharsPassword)]
797-
[SkipOnPlatform(TestPlatforms.Browser, "Browser does not support symmetric encryption")]
797+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Browser does not support symmetric encryption")]
798798
public static void TryExportEncryptedPkcs8PrivateKey_InnerBuffer_LargePkcs8(TryExportPkcs8PasswordKind kind)
799799
{
800800
using MLKemContract kem = new(MLKemAlgorithm.MLKem512);
@@ -827,7 +827,7 @@ public static void TryExportEncryptedPkcs8PrivateKey_InnerBuffer_LargePkcs8(TryE
827827
[InlineData(TryExportPkcs8PasswordKind.StringPassword)]
828828
[InlineData(TryExportPkcs8PasswordKind.SpanOfBytesPassword)]
829829
[InlineData(TryExportPkcs8PasswordKind.SpanOfCharsPassword)]
830-
[SkipOnPlatform(TestPlatforms.Browser, "Browser does not support symmetric encryption")]
830+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Browser does not support symmetric encryption")]
831831
public static void TryExportEncryptedPkcs8PrivateKey_DestinationTooSmall(TryExportPkcs8PasswordKind kind)
832832
{
833833
using MLKemContract kem = new(MLKemAlgorithm.MLKem512)
@@ -951,7 +951,7 @@ public static void ExportEncryptedPkcs8PrivateKeyPem_Disposed()
951951
}
952952

953953
[Fact]
954-
[SkipOnPlatform(TestPlatforms.Browser, "Browser does not support symmetric encryption")]
954+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Browser does not support symmetric encryption")]
955955
public static void ExportEncryptedPkcs8PrivateKeyPem()
956956
{
957957
using MLKemContract kem = new(MLKemAlgorithm.MLKem512)

‎src/libraries/Common/tests/System/Security/Cryptography/PlatformSupport.cs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ private static bool CheckIfVbsAvailable()
190190

191191
private static bool CheckIfRsaPssSupported()
192192
{
193-
if (PlatformDetection.IsBrowser)
193+
if (PlatformDetection.IsWasm)
194194
{
195-
// Browser doesn't support PSS or RSA at all.
195+
// Browser and WASI don't support PSS or RSA at all.
196196
return false;
197197
}
198198

@@ -215,13 +215,13 @@ private static bool CheckIfRsaPssSupported()
215215
internal const TestPlatforms AppleCrypto = TestPlatforms.OSX | TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst;
216216
internal const TestPlatforms MobileAppleCrypto = TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst;
217217

218-
// Platforms that support OpenSSL - all Unix except OSX/iOS/tvOS/MacCatalyst, Android, and Browser
219-
internal const TestPlatforms OpenSSL = TestPlatforms.AnyUnix & ~(AppleCrypto | TestPlatforms.Android | TestPlatforms.Browser);
218+
// Platforms that support OpenSSL - all Unix except OSX/iOS/tvOS/MacCatalyst, Android, Browser, and WASI
219+
internal const TestPlatforms OpenSSL = TestPlatforms.AnyUnix & ~(AppleCrypto | TestPlatforms.Android | TestPlatforms.Browser | TestPlatforms.Wasi);
220220

221221
// Whether or not the current platform supports RC2
222222
internal static bool IsRC2Supported => s_lazyIsRC2Supported.Value;
223223

224-
internal static bool IsDSASupported => !PlatformDetection.IsApplePlatform && !PlatformDetection.IsBrowser;
224+
internal static bool IsDSASupported => !PlatformDetection.IsApplePlatform && !PlatformDetection.IsWasm;
225225
internal static bool IsDSANotSupported => !IsDSASupported;
226226

227227
internal static bool IsRSA384Supported => s_lazyIsRSA384Supported.Value;

‎src/libraries/Common/tests/System/Security/Cryptography/SP800108HmacCounterKdfTests.ThreadSafety.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace System.Security.Cryptography.Tests
99
public static partial class SP800108HmacCounterKdfTests
1010
{
1111
[Fact]
12-
[ActiveIssue("https://github.com/dotnet/runtime/issues/68162", TestPlatforms.Browser)] // wasm threading support
12+
[ActiveIssue("https://github.com/dotnet/runtime/issues/68162", TestPlatforms.Browser | TestPlatforms.Wasi)] // wasm threading support
1313
public static void Race_ReusingOneInstance_Allocating()
1414
{
1515
using (SP800108HmacCounterKdf kdf = new("kdf"u8, HashAlgorithmName.SHA256))
@@ -54,7 +54,7 @@ public static void Race_ReusingOneInstance_Allocating()
5454
}
5555

5656
[Fact]
57-
[ActiveIssue("https://github.com/dotnet/runtime/issues/68162", TestPlatforms.Browser)] // wasm threading support
57+
[ActiveIssue("https://github.com/dotnet/runtime/issues/68162", TestPlatforms.Browser | TestPlatforms.Wasi)] // wasm threading support
5858
public static void Race_ReusingOneInstance_Buffering()
5959
{
6060
using (SP800108HmacCounterKdf kdf = new("kdf"u8, HashAlgorithmName.SHA256))
@@ -127,7 +127,7 @@ public static void Race_ReusingOneInstance_Buffering()
127127
}
128128

129129
[Fact]
130-
[ActiveIssue("https://github.com/dotnet/runtime/issues/68162", TestPlatforms.Browser)] // wasm threading support
130+
[ActiveIssue("https://github.com/dotnet/runtime/issues/68162", TestPlatforms.Browser | TestPlatforms.Wasi)] // wasm threading support
131131
public static void Race_UseAndDisposeOneInstance_Allocating()
132132
{
133133
SP800108HmacCounterKdf kdf;

‎src/libraries/Common/tests/System/Security/Cryptography/X25519DiffieHellmanContractTests.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ public static void ExportEncryptedPkcs8PrivateKey_Disposed()
648648
[InlineData(TryExportPkcs8PasswordKind.StringPassword)]
649649
[InlineData(TryExportPkcs8PasswordKind.SpanOfBytesPassword)]
650650
[InlineData(TryExportPkcs8PasswordKind.SpanOfCharsPassword)]
651-
[SkipOnPlatform(TestPlatforms.Browser, "Browser does not support symmetric encryption")]
651+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Browser does not support symmetric encryption")]
652652
public static void TryExportEncryptedPkcs8PrivateKey_ExportsPkcs8(TryExportPkcs8PasswordKind kind)
653653
{
654654
using X25519DiffieHellmanContract xdh = new()
@@ -678,7 +678,7 @@ public static void TryExportEncryptedPkcs8PrivateKey_ExportsPkcs8(TryExportPkcs8
678678
[InlineData(TryExportPkcs8PasswordKind.StringPassword)]
679679
[InlineData(TryExportPkcs8PasswordKind.SpanOfBytesPassword)]
680680
[InlineData(TryExportPkcs8PasswordKind.SpanOfCharsPassword)]
681-
[SkipOnPlatform(TestPlatforms.Browser, "Browser does not support symmetric encryption")]
681+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Browser does not support symmetric encryption")]
682682
public static void TryExportEncryptedPkcs8PrivateKey_InnerBuffer_LargePkcs8(TryExportPkcs8PasswordKind kind)
683683
{
684684
using X25519DiffieHellmanContract xdh = new();
@@ -711,7 +711,7 @@ public static void TryExportEncryptedPkcs8PrivateKey_InnerBuffer_LargePkcs8(TryE
711711
[InlineData(TryExportPkcs8PasswordKind.StringPassword)]
712712
[InlineData(TryExportPkcs8PasswordKind.SpanOfBytesPassword)]
713713
[InlineData(TryExportPkcs8PasswordKind.SpanOfCharsPassword)]
714-
[SkipOnPlatform(TestPlatforms.Browser, "Browser does not support symmetric encryption")]
714+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Browser does not support symmetric encryption")]
715715
public static void TryExportEncryptedPkcs8PrivateKey_DestinationTooSmall(TryExportPkcs8PasswordKind kind)
716716
{
717717
using X25519DiffieHellmanContract xdh = new()
@@ -817,7 +817,7 @@ public static void ExportEncryptedPkcs8PrivateKeyPem_Disposed()
817817
}
818818

819819
[Fact]
820-
[SkipOnPlatform(TestPlatforms.Browser, "Browser does not support symmetric encryption")]
820+
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.Wasi, "Browser does not support symmetric encryption")]
821821
public static void ExportEncryptedPkcs8PrivateKeyPem_Works()
822822
{
823823
using X25519DiffieHellmanContract xdh = new()

0 commit comments

Comments
 (0)