未验证 提交 29496089 编写于 作者: K Kevin Jones 提交者: GitHub

Add SupportedOSPlatform to X509Certificate2 members.

Archived and FriendlyName's setters are only supported on Windows.
上级 375fec27
......@@ -238,9 +238,9 @@ public partial class X509Certificate2 : System.Security.Cryptography.X509Certifi
public X509Certificate2(string fileName, System.Security.SecureString? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) { }
public X509Certificate2(string fileName, string? password) { }
public X509Certificate2(string fileName, string? password, System.Security.Cryptography.X509Certificates.X509KeyStorageFlags keyStorageFlags) { }
public bool Archived { get { throw null; } set { } }
public bool Archived { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection Extensions { get { throw null; } }
public string FriendlyName { get { throw null; } set { } }
public string FriendlyName { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
public bool HasPrivateKey { get { throw null; } }
public System.Security.Cryptography.X509Certificates.X500DistinguishedName IssuerName { get { throw null; } }
public System.DateTime NotAfter { get { throw null; } }
......
......@@ -8,6 +8,7 @@
using System.Formats.Asn1;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography.X509Certificates.Asn1;
using System.Text;
......@@ -170,6 +171,7 @@ public bool Archived
return Pal.Archived;
}
[SupportedOSPlatform("windows")]
set
{
ThrowIfInvalid();
......@@ -216,6 +218,7 @@ public string FriendlyName
return Pal.FriendlyName;
}
[SupportedOSPlatform("windows")]
set
{
ThrowIfInvalid();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册