您的位置:首页 > 编程语言 > C#

C# 使用 X.509 v.3 证书的方法。

2015-06-24 14:49 330 查看
C# 使用 X.509 v.3 证书的方法。

public static void Main()
{

// The path to the certificate.
string Certificate = "Certificate.cer";

// Load the certificate into an X509Certificate object.
X509Certificate cert = new X509Certificate(Certificate);

// Get the value.
string resultsTrue = cert.ToString(true);

// Display the value to the console.
Console.WriteLine(resultsTrue);

// Get the value.
string resultsFalse = cert.ToString(false);

// Display the value to the console.
Console.WriteLine(resultsFalse);

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: