共用方式為


CertificateLoader.LoadFromStoreCert 方法

定義

從憑證存放區載入憑證。

public:
 static System::Security::Cryptography::X509Certificates::X509Certificate2 ^ LoadFromStoreCert(System::String ^ subject, System::String ^ storeName, System::Security::Cryptography::X509Certificates::StoreLocation storeLocation, bool allowInvalid);
public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadFromStoreCert (string subject, string storeName, System.Security.Cryptography.X509Certificates.StoreLocation storeLocation, bool allowInvalid);
static member LoadFromStoreCert : string * string * System.Security.Cryptography.X509Certificates.StoreLocation * bool -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Shared Function LoadFromStoreCert (subject As String, storeName As String, storeLocation As StoreLocation, allowInvalid As Boolean) As X509Certificate2

參數

subject
String

憑證主體。

storeName
String

憑證存放區名稱。

storeLocation
StoreLocation

憑證存放區位置。

allowInvalid
Boolean

是否要載入被視為不正確憑證。

傳回

載入的憑證。

備註

如果存在,則會載入完全主體比對,否則最適合具有包含所提供主體的主體名稱的憑證。 主體比較不區分大小寫。

適用於