PeerCredential.SetCertificate 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定證書。
多載
| 名稱 | Description |
|---|---|
| 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
值得搜尋的價值。