CertificateEnrollmentManager.ImportPfxDataAsync 方法

定義

多載

ImportPfxDataAsync(String, String, PfxImportParameters)

使用匯入參數,以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。

ImportPfxDataAsync(String, String, ExportOption, KeyProtectionLevel, InstallOptions, String)

以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。

ImportPfxDataAsync(String, String, ExportOption, KeyProtectionLevel, InstallOptions, String, String)

使用指定的金鑰儲存提供者,以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。

ImportPfxDataAsync(String, String, PfxImportParameters)

使用匯入參數,以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。

public:
 static IAsyncAction ^ ImportPfxDataAsync(Platform::String ^ pfxData, Platform::String ^ password, PfxImportParameters ^ pfxImportParameters);
/// [Windows.Foundation.Metadata.Overload("ImportPfxDataToKspWithParametersAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncAction ImportPfxDataAsync(winrt::hstring const& pfxData, winrt::hstring const& password, PfxImportParameters const& pfxImportParameters);
[Windows.Foundation.Metadata.Overload("ImportPfxDataToKspWithParametersAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction ImportPfxDataAsync(string pfxData, string password, PfxImportParameters pfxImportParameters);
function importPfxDataAsync(pfxData, password, pfxImportParameters)
Public Shared Function ImportPfxDataAsync (pfxData As String, password As String, pfxImportParameters As PfxImportParameters) As IAsyncAction

參數

pfxData
String

Platform::String

winrt::hstring

Base64 編碼的 PFX 訊息。

password
String

Platform::String

winrt::hstring

用來解密和驗證 PFX 封包的密碼。 密碼必須與用來加密封包的密碼完全相同。

pfxImportParameters
PfxImportParameters

PFX 匯入參數。

傳回

這個方法不會傳回值。

屬性

另請參閱

適用於

ImportPfxDataAsync(String, String, ExportOption, KeyProtectionLevel, InstallOptions, String)

以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。

public:
 static IAsyncAction ^ ImportPfxDataAsync(Platform::String ^ pfxData, Platform::String ^ password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, Platform::String ^ friendlyName);
/// [Windows.Foundation.Metadata.Overload("ImportPfxDataAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncAction ImportPfxDataAsync(winrt::hstring const& pfxData, winrt::hstring const& password, ExportOption const& exportable, KeyProtectionLevel const& keyProtectionLevel, InstallOptions const& installOption, winrt::hstring const& friendlyName);
[Windows.Foundation.Metadata.Overload("ImportPfxDataAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction ImportPfxDataAsync(string pfxData, string password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, string friendlyName);
function importPfxDataAsync(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName)
Public Shared Function ImportPfxDataAsync (pfxData As String, password As String, exportable As ExportOption, keyProtectionLevel As KeyProtectionLevel, installOption As InstallOptions, friendlyName As String) As IAsyncAction

參數

pfxData
String

Platform::String

winrt::hstring

Base64 編碼的 PFX 訊息。

password
String

Platform::String

winrt::hstring

用來解密和驗證 PFX 封包的密碼。 密碼必須與用來加密封包的密碼完全相同。

exportable
ExportOption

ExportOption列舉的值,指定是否可以匯出索引鍵。

keyProtectionLevel
KeyProtectionLevel

指定金鑰保護強度的 KeyProtectionLevel 列舉值。 預設值為 NoConsent

installOption
InstallOptions

InstallOptions列舉值,指定憑證安裝選項。

friendlyName
String

Platform::String

winrt::hstring

註冊憑證的顯示名稱。 此值會覆寫 PFX 訊息內的 FriendlyName 屬性。

傳回

這個方法不會傳回值。

屬性

備註

這個方法會將憑證鏈結匯入應用程式容器。

  • 若要匯入發行的憑證,不需要在匯入電腦上產生憑證要求。
  • 回應中包含的憑證不需要鏈結至匯入電腦上的受信任根憑證。
  • 憑證會安裝在應用程式容器 MY 存放區中。
  • 憑證授權單位單位 和根憑證會安裝在應用程式容器中繼 憑證授權單位單位 存放區中。
  • 匯入憑證的金鑰容器名稱和金鑰規格取決於 PFXImportCertStore 的一節中所述,但例外狀況是如果 AttributeId 1.3.6.1.4.1.311.17.1,一律會使用MS_KEY_STORAGE_PROVIDER做為提供者名稱。

另請參閱

適用於

ImportPfxDataAsync(String, String, ExportOption, KeyProtectionLevel, InstallOptions, String, String)

使用指定的金鑰儲存提供者,以非同步方式從個人資訊交換 (PFX) 訊息匯入憑證。

public:
 static IAsyncAction ^ ImportPfxDataAsync(Platform::String ^ pfxData, Platform::String ^ password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, Platform::String ^ friendlyName, Platform::String ^ keyStorageProvider);
/// [Windows.Foundation.Metadata.Overload("ImportPfxDataToKspAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncAction ImportPfxDataAsync(winrt::hstring const& pfxData, winrt::hstring const& password, ExportOption const& exportable, KeyProtectionLevel const& keyProtectionLevel, InstallOptions const& installOption, winrt::hstring const& friendlyName, winrt::hstring const& keyStorageProvider);
[Windows.Foundation.Metadata.Overload("ImportPfxDataToKspAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction ImportPfxDataAsync(string pfxData, string password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, string friendlyName, string keyStorageProvider);
function importPfxDataAsync(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName, keyStorageProvider)
Public Shared Function ImportPfxDataAsync (pfxData As String, password As String, exportable As ExportOption, keyProtectionLevel As KeyProtectionLevel, installOption As InstallOptions, friendlyName As String, keyStorageProvider As String) As IAsyncAction

參數

pfxData
String

Platform::String

winrt::hstring

Base64 編碼的 PFX 訊息。

password
String

Platform::String

winrt::hstring

用來解密和驗證 PFX 封包的密碼。 密碼必須與用來加密封包的密碼完全相同。

exportable
ExportOption

ExportOption列舉的值,指定是否可以匯出索引鍵。

keyProtectionLevel
KeyProtectionLevel

指定金鑰保護強度的 KeyProtectionLevel 列舉值。 預設值為 NoConsent

installOption
InstallOptions

InstallOptions列舉值,指定憑證安裝選項。

friendlyName
String

Platform::String

winrt::hstring

註冊憑證的顯示名稱。 此值會覆寫 PFX 訊息內的 FriendlyName 屬性。

keyStorageProvider
String

Platform::String

winrt::hstring

匯入憑證時要使用的金鑰儲存提供者名稱。

傳回

這個方法不會傳回值。

屬性

備註

這個方法會將憑證鏈結匯入應用程式容器。

  • 若要匯入發行的憑證,不需要在匯入電腦上產生憑證要求。
  • 回應中包含的憑證不需要鏈結至匯入電腦上的受信任根憑證。
  • 憑證會安裝在應用程式容器 MY 存放區中。
  • 憑證授權單位單位 和根憑證會安裝在應用程式容器中繼 憑證授權單位單位 存放區中。
  • 匯入憑證的金鑰容器名稱和金鑰規格取決於 PFXImportCertStore 的一節中所述,但例外狀況是如果 AttributeId 1.3.6.1.4.1.311.17.1,一律會使用MS_KEY_STORAGE_PROVIDER做為提供者名稱。

另請參閱

適用於