diff options
Diffstat (limited to 'src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES')
2 files changed, 8 insertions, 1 deletions
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs index 27ee7aec3c8..8bf77c7e73b 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesCipherTests.cs @@ -34,6 +34,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests } [Fact] + [SkipOnPlatform(TestPlatforms.Browser, "AES-192 is not supported on Browser")] public static void RandomKeyRoundtrip_192() { using (Aes aes = AesFactory.Create()) @@ -485,6 +486,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests } [Fact] + [SkipOnPlatform(TestPlatforms.Browser, "AES-192 is not supported on Browser")] public static void VerifyKnownTransform_CBC192_NoPadding() { TestAesTransformDirectKey( @@ -525,6 +527,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests } [Fact] + [SkipOnPlatform(TestPlatforms.Browser, "AES-192 is not supported on Browser")] public static void VerifyKnownTransform_CBC192_NoPadding_2() { TestAesTransformDirectKey( diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs index f2a63a2cbb2..dc8940d6b38 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs @@ -55,7 +55,10 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests Assert.Equal(128, keySizeLimits.MinSize); Assert.Equal(256, keySizeLimits.MaxSize); - Assert.Equal(64, keySizeLimits.SkipSize); + + // Browser's SubtleCrypto doesn't support AES-192 + int expectedKeySkipSize = PlatformDetection.IsBrowser ? 128 : 64; + Assert.Equal(expectedKeySkipSize, keySizeLimits.SkipSize); } } @@ -214,6 +217,7 @@ namespace System.Security.Cryptography.Encryption.Aes.Tests } [Fact] + [SkipOnPlatform(TestPlatforms.Browser, "AES-192 is not supported on Browser")] public static void VerifyKeyGeneration_192() { using (Aes aes = AesFactory.Create()) |