PeerCredential.SetCertificate 方法

定义

设置证书。

重载

SetCertificate(String, StoreLocation, StoreName)

设置证书。

SetCertificate(StoreLocation, StoreName, X509FindType, Object)

用特定的搜索条件设置证书。

SetCertificate(String, StoreLocation, StoreName)

设置证书。

public:
 void SetCertificate(System::String ^ subjectName, System::Security::Cryptography::X509Certificates::StoreLocation storeLocation, System::Security::Cryptography::X509Certificates::StoreName storeName);
public void SetCertificate (string subjectName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, System.Security.Cryptography.X509Certificates.StoreName storeName);
member this.SetCertificate : string * System.Security.Cryptography.X509Certificates.StoreLocation * System.Security.Cryptography.X509Certificates.StoreName -> unit
Public Sub SetCertificate (subjectName As String, storeLocation As StoreLocation, storeName As StoreName)

参数

subjectName
String

证书的主题名称。

storeLocation
StoreLocation

证书存储区的位置。

storeName
StoreName

证书存储区名称。

注解

此重载用于指定对等方的证书凭据。 它以快捷方式的形式提供,用于从用户有权访问的某个可用证书存储区中加载证书。

适用于

SetCertificate(StoreLocation, StoreName, X509FindType, Object)

用特定的搜索条件设置证书。

public:
 void SetCertificate(System::Security::Cryptography::X509Certificates::StoreLocation storeLocation, System::Security::Cryptography::X509Certificates::StoreName storeName, System::Security::Cryptography::X509Certificates::X509FindType findType, System::Object ^ findValue);
public void SetCertificate (System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, System.Security.Cryptography.X509Certificates.StoreName storeName, System.Security.Cryptography.X509Certificates.X509FindType findType, object findValue);
member this.SetCertificate : System.Security.Cryptography.X509Certificates.StoreLocation * System.Security.Cryptography.X509Certificates.StoreName * System.Security.Cryptography.X509Certificates.X509FindType * obj -> unit
Public Sub SetCertificate (storeLocation As StoreLocation, storeName As StoreName, findType As X509FindType, findValue As Object)

参数

storeLocation
StoreLocation

证书存储区的位置。

storeName
StoreName

证书存储区名称。

findType
X509FindType

搜索条件。

findValue
Object

搜索的值。

适用于