共用方式為


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

要進行搜尋的值。

適用於