CertificateEnrollmentManager 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示憑證註冊管理員。
public ref class CertificateEnrollmentManager abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CertificateEnrollmentManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class CertificateEnrollmentManager
Public Class CertificateEnrollmentManager
- 繼承
- 屬性
Windows 需求
裝置系列 |
Windows 10 (已於 10.0.10240.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)
|
範例
using Windows.Security.Cryptography.Certificates;
using System.Threading.Tasks;
namespace SampleCertificateEnrollmentManager
{
sealed partial class CertEnrollMgrApp : Application
{
public CertEnrollMgrApp()
{
// Initialize the application.
this.InitializeComponent();
// Create a certificate request.
this.GetCertificateRequest();
}
public async void GetCertificateRequest()
{
// Create a certificate request asynchronously.
String certificateRequest = await this.SampleCreateRequest();
}
public async Task<String>SampleCreateRequest()
{
// Create a CertificateRequestProperties object.
CertificateRequestProperties requestProp = new CertificateRequestProperties();
// Assign a subject name to the properties object.
requestProp.Subject = "SampleRequest";
// Create a certificate request.
String strRequest = await CertificateEnrollmentManager.CreateRequestAsync(requestProp);
// Return the request string.
return strRequest;
}
}
}
備註
呼叫 CreateRequestAsync 方法來建立 CertificateEnrollmentManager 物件的實例。
這個類別只包含靜態屬性。 您不需要建立 類別的實例,即可擷取屬性。 請改用類別名稱,後面接著點運算子 (.) ,後面接著屬性名稱。
屬性
UserCertificateEnrollmentManager |
取得相關聯的 UserCertificateEnrollmentManager。 |
方法
CreateRequestAsync(CertificateRequestProperties) |
根據 CertificateRequestProperties 物件中指定的屬性,以非同步方式建立 PKCS #10 憑證要求。 |
ImportPfxDataAsync(String, String, ExportOption, KeyProtectionLevel, InstallOptions, String) |
以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。 |
ImportPfxDataAsync(String, String, ExportOption, KeyProtectionLevel, InstallOptions, String, String) |
使用指定的金鑰儲存提供者,以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。 |
ImportPfxDataAsync(String, String, PfxImportParameters) |
使用匯入參數,以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。 |
InstallCertificateAsync(String, InstallOptions) |
以非同步方式將憑證鏈結安裝到本機電腦上的應用程式容器中。 |