C# 在C中禁用客户端证书信任#
是否有一种编程方式可以禁用客户端应用程序在C#中的证书信任?您可以使用 也许 榜样C# 在C中禁用客户端证书信任#,c#,web-services,ssl-certificate,C#,Web Services,Ssl Certificate,是否有一种编程方式可以禁用客户端应用程序在C#中的证书信任?您可以使用 也许 榜样 using System; using System.Security.Cryptography.X509Certificates; public class X509 { public static void Main() { // The path to the certificate. string Certificate = "Certificat
using System;
using System.Security.Cryptography.X509Certificates;
public class X509
{
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);
}
}
你可以用
也许
榜样
using System;
using System.Security.Cryptography.X509Certificates;
public class X509
{
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);
}
}
感谢您的输入,这在数据传输中是否适用于PFX证书?感谢您的输入,这在数据传输中是否适用于PFX证书?