Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate some APIs in System.Security.Cryptography.* as unsupported on iOS/tvOS #52755

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ public abstract partial class AsymmetricSignatureFormatter
{
protected AsymmetricSignatureFormatter() { }
public abstract byte[] CreateSignature(byte[] rgbHash);
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public virtual byte[] CreateSignature(System.Security.Cryptography.HashAlgorithm hash) { throw null; }
public abstract void SetHashAlgorithm(string strName);
public abstract void SetKey(System.Security.Cryptography.AsymmetricAlgorithm key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ protected AsymmetricSignatureFormatter() { }
public abstract void SetKey(AsymmetricAlgorithm key);
public abstract void SetHashAlgorithm(string strName);

[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public virtual byte[] CreateSignature(HashAlgorithm hash)
{
if (hash == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public partial class DSAKeyValue : System.Security.Cryptography.Xml.KeyInfoClaus
public DSAKeyValue() { }
public DSAKeyValue(System.Security.Cryptography.DSA key) { }
public System.Security.Cryptography.DSA Key { get { throw null; } set { } }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public override System.Xml.XmlElement GetXml() { throw null; }
public override void LoadXml(System.Xml.XmlElement value) { }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.Versioning;
using System.Xml;

#pragma warning disable CA5384 // Do Not Use Digital Signature Algorithm (DSA)
Expand Down Expand Up @@ -48,6 +49,8 @@ public DSA Key
/// <returns>
/// An <see cref="XmlElement"/> containing the XML representation.
/// </returns>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public override XmlElement GetXml()
{
XmlDocument xmlDocument = new XmlDocument();
Expand Down