diff --git a/src/libraries/System.Net.Security/ref/System.Net.Security.cs b/src/libraries/System.Net.Security/ref/System.Net.Security.cs index e5f4f462d5526774065709c7ec3a881f8276e1df..455bdb09d01ba78600bdfd114bab04789d460800 100644 --- a/src/libraries/System.Net.Security/ref/System.Net.Security.cs +++ b/src/libraries/System.Net.Security/ref/System.Net.Security.cs @@ -139,7 +139,6 @@ public sealed partial class SslCertificateTrust public static SslCertificateTrust CreateForX509Store( System.Security.Cryptography.X509Certificates.X509Store store, bool sendTrustInHandshake = false) { throw null; } - [System.Runtime.Versioning.UnsupportedOSPlatform("windows")] public static SslCertificateTrust CreateForX509Collection( System.Security.Cryptography.X509Certificates.X509Certificate2Collection trustList, bool sendTrustInHandshake = false) { throw null; } diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/SslCertificateTrust.cs b/src/libraries/System.Net.Security/src/System/Net/Security/SslCertificateTrust.cs index b141a33f264be029016e5769da6c13f125ff961e..db6e1cb6d1813660c8e09b23985b08a0ed2df5e8 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/SslCertificateTrust.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/SslCertificateTrust.cs @@ -20,7 +20,7 @@ public static SslCertificateTrust CreateForX509Store(X509Store store, bool sendT { throw new PlatformNotSupportedException(SR.net_ssl_trust_store); } -#else +#endif if (sendTrustInHandshake && !System.OperatingSystem.IsLinux() && !System.OperatingSystem.IsMacOS() && // Necessary functions are available only on win 8 onwards !OperatingSystem.IsWindowsVersionAtLeast(6, 2)) @@ -28,7 +28,6 @@ public static SslCertificateTrust CreateForX509Store(X509Store store, bool sendT // to be removed when implemented. throw new PlatformNotSupportedException(SR.net_ssl_trust_handshake); } -#endif if (!store.IsOpen) { store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly); @@ -40,13 +39,20 @@ public static SslCertificateTrust CreateForX509Store(X509Store store, bool sendT return trust; } - [UnsupportedOSPlatform("windows")] public static SslCertificateTrust CreateForX509Collection(X509Certificate2Collection trustList, bool sendTrustInHandshake = false) { + +#if TARGET_WINDOWS + if (sendTrustInHandshake) + { + throw new PlatformNotSupportedException(SR.net_ssl_trust_collection); + } +#else if (sendTrustInHandshake && !System.OperatingSystem.IsLinux() && !System.OperatingSystem.IsMacOS()) { throw new PlatformNotSupportedException(SR.net_ssl_trust_handshake); } +#endif var trust = new SslCertificateTrust(); trust._trustList = trustList; diff --git a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt index a49a465752eedbcbc99fab106ccc02bbcd9988d1..c00a7b08e06e07ff8ebb3371e4a2552db7b29e5d 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt +++ b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.txt @@ -89,6 +89,8 @@ CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatfo Compat issues with assembly System.Diagnostics.Process: CannotChangeAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' on 'System.Diagnostics.Process.MaxWorkingSet.set(System.IntPtr)' changed from '[SupportedOSPlatformAttribute("freebsd")]' in the contract to '[SupportedOSPlatformAttribute("freebsd")]' in the implementation. CannotChangeAttribute : Attribute 'System.Runtime.Versioning.SupportedOSPlatformAttribute' on 'System.Diagnostics.Process.MinWorkingSet.set(System.IntPtr)' changed from '[SupportedOSPlatformAttribute("freebsd")]' in the contract to '[SupportedOSPlatformAttribute("freebsd")]' in the implementation. +Compat issues with assembly System.Net.Security: +CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Net.Security.SslCertificateTrust.CreateForX509Collection(System.Security.Cryptography.X509Certificates.X509Certificate2Collection, System.Boolean)' in the contract but not the implementation. Compat issues with assembly System.Numerics.Vectors: CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Numerics.Vector.CopyTo(System.Span)' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Numerics.Vector.CopyTo(System.Span)' in the contract but not the implementation. @@ -142,4 +144,4 @@ CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatfo CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Security.Cryptography.TripleDES' in the contract but not the implementation. Compat issues with assembly System.Security.Cryptography.X509Certificates: CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Security.Cryptography.X509Certificates.PublicKey.GetDSAPublicKey()' changed from '[UnsupportedOSPlatformAttribute("ios")]' in the contract to '[UnsupportedOSPlatformAttribute("browser")]' in the implementation. -Total Issues: 135 +Total Issues: 136