Skip to content

Commit c663d2a

Browse files
committed
Fix tests on Mac Catalyst
1 parent fdc95f2 commit c663d2a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/libraries/System.Security.Cryptography.Xml/tests/KeyInfoTest.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System.Linq;
1414
using System.Security.Cryptography.X509Certificates;
1515
using System.Xml;
16+
using Test.Cryptography;
1617
using Xunit;
1718

1819
namespace System.Security.Cryptography.Xml.Tests
@@ -69,7 +70,7 @@ public void KeyInfoNode()
6970
private static string xmlDSA = "<DSAKeyValue><P>" + dsaP + "</P><Q>" + dsaQ + "</Q><G>" + dsaG + "</G><Y>" + dsaY + "</Y></DSAKeyValue>";
7071

7172
[Fact]
72-
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "Not supported on iOS or tvOS.")]
73+
[SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "DSA is not available")]
7374
public void DSAKeyValue()
7475
{
7576
using (DSA key = DSA.Create())
@@ -148,7 +149,7 @@ public void X509Data()
148149
}
149150

150151
[Fact]
151-
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "Not supported on iOS or tvOS.")]
152+
[SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "DSA is not available")]
152153
public void Complex()
153154
{
154155
KeyInfoName name = new KeyInfoName();
@@ -199,7 +200,7 @@ public void Complex()
199200
}
200201

201202
[Fact]
202-
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "Not supported on iOS or tvOS.")]
203+
[SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "DSA is not available")]
203204
public void ImportKeyNode()
204205
{
205206
string keyName = "Mono::";

src/libraries/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public void AsymmetricRSAMixedCaseAttributesVerifyWindows()
289289

290290
[Fact]
291291
[ActiveIssue("https://github.com/dotnet/runtime/issues/20575", TestPlatforms.OSX)]
292-
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "Not supported on iOS or tvOS.")]
292+
[SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "DSA is not available")]
293293
public void AsymmetricDSASignature()
294294
{
295295
SignedXml signedXml = MSDNSample();
@@ -389,7 +389,7 @@ public void AsymmetricRSAVerify()
389389
// Using empty constructor
390390
// The two other constructors don't seems to apply in verifying signatures
391391
[Fact]
392-
[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "Not supported on iOS or tvOS.")]
392+
[SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "DSA is not available")]
393393
public void AsymmetricDSAVerify()
394394
{
395395
string value = "<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\" /><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#dsa-sha1\" /><Reference URI=\"#MyObjectId\"><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\" /><DigestValue>/Vvq6sXEVbtZC8GwNtLQnGOy/VI=</DigestValue></Reference></SignedInfo><SignatureValue>BYz/qRGjGsN1yMFPxWa3awUZm1y4I/IxOQroMxkOteRGgk1HIwhRYw==</SignatureValue><KeyInfo><KeyValue xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><DSAKeyValue><P>iglVaZ+LsSL8Y0aDXmFMBwva3xHqIypr3l/LtqBH9ziV2Sh1M4JVasAiKqytWIWt/s/Uk8Ckf2tO2Ww1vsNi1NL+Kg9T7FE52sn380/rF0miwGkZeidzm74OWhykb3J+wCTXaIwOzAWI1yN7FoeoN7wzF12jjlSXAXeqPMlViqk=</P><Q>u4sowiJMHilNRojtdmIuQY2YnB8=</Q><G>SdnN7d+wn1n+HH4Hr8MIryIRYgcXdbZ5TH7jAnuWc1koqRc1AZfcYAZ6RDf+orx6Lzn055FTFiN+1NHQfGUtXJCWW0zz0FVV1NJux7WRj8vGTldjJ5ef0oCenkpwDjcIxWsZgVobve4GPoyN1sAc1scnkJB59oupibklmF4y72A=</G><Y>XejzS8Z51yfl0zbYnxSYYbHqreSLjNCoGPB/KjM1TOyV5sMjz0StKtGrFWryTWc7EgvFY7kUth4e04VKf9HbK8z/FifHTXj8+Tszbjzw8GfInnBwLN+vJgbpnjtypmiI5Bm2nLiRbfkdAHP+OrKtr/EauM9GQfYuaxm3/Vj8B84=</Y><J>vGwGg9wqwwWP9xsoPoXu6kHArJtadiNKe9azBiUx5Ob883gd5wlKfEcGuKkBmBySGbgwxyOsIBovd9Kk48hF01ymfQzAAuHR0EdJECSsTsTTKVTLQNBU32O+PRbLYpv4E8kt6rNL83JLJCBY</J><Seed>sqzn8J6fd2gtEyq6YOqiUSHgPE8=</Seed><PgenCounter>sQ==</PgenCounter></DSAKeyValue></KeyValue></KeyInfo><Object Id=\"MyObjectId\"><MyElement xmlns=\"samples\">This is some text</MyElement></Object></Signature>";

0 commit comments

Comments
 (0)