UserCertificateEnrollmentManager.ImportPfxDataAsync Methode

Definition

Überlädt

ImportPfxDataAsync(String, String, PfxImportParameters)

Importiert asynchron ein Zertifikat aus einer PFX-Nachricht (Personal Information Exchange) mithilfe der angegebenen Importparameter.

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

Importiert asynchron ein Benutzerzertifikat aus einer PFX-Nachricht (Personal Information Exchange).

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

Importiert asynchron ein Zertifikat aus einer PFX-Nachricht (Personal Information Exchange) mithilfe des angegebenen Schlüsselspeicheranbieters.

ImportPfxDataAsync(String, String, PfxImportParameters)

Importiert asynchron ein Zertifikat aus einer PFX-Nachricht (Personal Information Exchange) mithilfe der angegebenen Importparameter.

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

Parameter

pfxData
String

Platform::String

winrt::hstring

Base64-codierte PFX-Nachricht.

password
String

Platform::String

winrt::hstring

das Kennwort, das zum Entschlüsseln und Überprüfen des PFX-Pakets verwendet wird. Das Kennwort muss genau mit dem Kennwort identisch sein, das zum Verschlüsseln des Pakets verwendet wurde.

pfxImportParameters
PfxImportParameters

Die Importparameter.

Gibt zurück

Diese Methode gibt keinen Wert zurück.

Attribute

Weitere Informationen

Gilt für:

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

Importiert asynchron ein Benutzerzertifikat aus einer PFX-Nachricht (Personal Information Exchange).

public:
 virtual IAsyncAction ^ ImportPfxDataAsync(Platform::String ^ pfxData, Platform::String ^ password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, Platform::String ^ friendlyName) = ImportPfxDataAsync;
/// [Windows.Foundation.Metadata.Overload("ImportPfxDataAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
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 IAsyncAction ImportPfxDataAsync(string pfxData, string password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, string friendlyName);
function importPfxDataAsync(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName)
Public Function ImportPfxDataAsync (pfxData As String, password As String, exportable As ExportOption, keyProtectionLevel As KeyProtectionLevel, installOption As InstallOptions, friendlyName As String) As IAsyncAction

Parameter

pfxData
String

Platform::String

winrt::hstring

Base64-codierte PFX-Nachricht.

password
String

Platform::String

winrt::hstring

Das Kennwort, das zum Entschlüsseln und Überprüfen des PFX-Pakets verwendet wird. Das Kennwort muss genau mit dem Kennwort identisch sein, das zum Verschlüsseln des Pakets verwendet wurde.

exportable
ExportOption

Ein Wert der ExportOption-Enumeration , der angibt, ob der Schlüssel exportiert werden kann.

keyProtectionLevel
KeyProtectionLevel

Ein Wert der KeyProtectionLevel-Enumeration , der die Stärke des Schlüsselschutzes angibt. Der Standardwert ist NoConsent.

installOption
InstallOptions

Ein InstallOptions-Enumerationswert , der die Zertifikatinstallationsoption angibt.

friendlyName
String

Platform::String

winrt::hstring

Der Anzeigename des eingeschriebenen Zertifikats. Dieser Wert überschreibt die FriendlyName-Eigenschaft innerhalb der PFX-Nachricht.

Gibt zurück

Diese Methode gibt keinen Wert zurück.

Attribute

Beispiele

Der folgende Code importiert ein pfx-basiertes Zertifikat in den Speicher "My" des Benutzers und schützt den privaten Schlüssel des Zertifikats mithilfe des Trusted Platform Module (TPM) der Geräte. Beachten Sie, dass Apps die sharedUserCertificates Möglichkeit benötigen, PFX-Dateien zu importieren oder Zertifikate aus dem Zertifikatspeicher "MY" des Benutzers zu verwenden.

CertificateEnrollmentManager.UserCertificateEnrollmentManager.ImportPfxDataAsync(
    pfxData,
    password,
    ExportOption.NotExportable,
    KeyProtectionLevel.NoConsent,
    InstallOptions.DeleteExpired,
    strFriendlyName,
    KeyStorageProviderNames.PlatformKeyStorageProvider);

Weitere Informationen

Gilt für:

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

Importiert asynchron ein Zertifikat aus einer PFX-Nachricht (Personal Information Exchange) mithilfe des angegebenen Schlüsselspeicheranbieters.

public:
 virtual IAsyncAction ^ ImportPfxDataAsync(Platform::String ^ pfxData, Platform::String ^ password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, Platform::String ^ friendlyName, Platform::String ^ keyStorageProvider) = ImportPfxDataAsync;
/// [Windows.Foundation.Metadata.Overload("ImportPfxDataToKspAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
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 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 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

Parameter

pfxData
String

Platform::String

winrt::hstring

Base64-codierte PFX-Nachricht.

password
String

Platform::String

winrt::hstring

Das Kennwort, das zum Entschlüsseln und Überprüfen des PFX-Pakets verwendet wird. Das Kennwort muss genau mit dem Kennwort identisch sein, das zum Verschlüsseln des Pakets verwendet wurde.

exportable
ExportOption

Ein Wert der ExportOption-Enumeration , der angibt, ob der Schlüssel exportiert werden kann.

keyProtectionLevel
KeyProtectionLevel

Ein Wert der KeyProtectionLevel-Enumeration , der die Stärke des Schlüsselschutzes angibt. Der Standardwert ist NoConsent.

installOption
InstallOptions

Ein InstallOptions-Enumerationswert , der die Zertifikatinstallationsoption angibt.

friendlyName
String

Platform::String

winrt::hstring

Der Anzeigename des eingeschriebenen Zertifikats. Dieser Wert überschreibt die FriendlyName-Eigenschaft innerhalb der PFX-Nachricht.

keyStorageProvider
String

Platform::String

winrt::hstring

Der Name des Schlüsselspeicheranbieters, der beim Importieren des Zertifikats verwendet werden soll.

Gibt zurück

Diese Methode gibt keinen Wert zurück.

Attribute

Beispiele

Der folgende Code importiert ein pfx-basiertes Zertifikat in den Speicher "My" des Benutzers und schützt den privaten Schlüssel des Zertifikats mithilfe des Trusted Platform Module (TPM) der Geräte. Beachten Sie, dass Apps die sharedUserCertificates Möglichkeit benötigen, PFX-Dateien zu importieren oder Zertifikate aus dem Zertifikatspeicher "MY" des Benutzers zu verwenden.

CertificateEnrollmentManager.UserCertificateEnrollmentManager.ImportPfxDataAsync(
    pfxData,
    password,
    ExportOption.NotExportable,
    KeyProtectionLevel.NoConsent,
    InstallOptions.DeleteExpired,
    strFriendlyName,
    KeyStorageProviderNames.PlatformKeyStorageProvider);

Weitere Informationen

Gilt für: