CertificateLoader.LoadFromStoreCert 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从证书存储加载证书。
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
是否加载被视为无效的证书。
返回
加载的证书。
注解
如果存在,则会加载确切的使用者匹配项,否则最好使用包含提供的使用者的使用者名称匹配证书。 主题比较不区分大小写。