UserCertificateEnrollmentManager.ImportPfxDataAsync UserCertificateEnrollmentManager.ImportPfxDataAsync UserCertificateEnrollmentManager.ImportPfxDataAsync UserCertificateEnrollmentManager.ImportPfxDataAsync UserCertificateEnrollmentManager.ImportPfxDataAsync Method

Definition

Overloads

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

Asynchronously imports a user certificate from a Personal Information Exchange (PFX) message.

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

Asynchronously imports a certificate from a Personal Information Exchange (PFX) message using the specified key storage provider.

ImportPfxDataAsync(String, String, PfxImportParameters) ImportPfxDataAsync(String, String, PfxImportParameters) ImportPfxDataAsync(String, String, PfxImportParameters) ImportPfxDataAsync(String, String, PfxImportParameters) ImportPfxDataAsync(String, String, PfxImportParameters)

Asynchronously imports a certificate from a Personal Information Exchange (PFX) message using the specified import parameters.

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

Asynchronously imports a user certificate from a Personal Information Exchange (PFX) message.

public : IAsyncAction ImportPfxDataAsync(Platform::String pfxData, Platform::String password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, Platform::String friendlyName)
IAsyncAction ImportPfxDataAsync(winrt::hstring pfxData, winrt::hstring password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, winrt::hstring friendlyName) const;
public IAsyncAction ImportPfxDataAsync(String pfxData, String password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, String friendlyName)
Public Function ImportPfxDataAsync(pfxData As String, password As String, exportable As ExportOption, keyProtectionLevel As KeyProtectionLevel, installOption As InstallOptions, friendlyName As String) As IAsyncAction
Windows.Security.Cryptography.Certificates.UserCertificateEnrollmentManager.importPfxDataAsync(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName).done( /* Your success and error handlers */ );

Parameters

pfxData
String String String

Base64-encoded PFX message.

password
String String String

The password used to decrypt and verify the PFX packet. The password must be exactly the same as the password that was used to encrypt the packet.

exportable
ExportOption ExportOption ExportOption

A value of the ExportOption enumeration that specifies whether the key can be exported.

keyProtectionLevel
KeyProtectionLevel KeyProtectionLevel KeyProtectionLevel

A value of the KeyProtectionLevel enumeration that specifies the strength of the key protection. The default is NoConsent.

installOption
InstallOptions InstallOptions InstallOptions

An InstallOptions enumeration value that specifies the certificate installation option.

friendlyName
String String String

The display name of the enrolled certificate. This value overwrites the FriendlyName property inside the PFX message.

Returns

This method does not return a value.

Examples

The following code imports a pfx-based certificate into the user's "My" store and protects the certificate's private key using the devices Trusted Platform Module (TPM). Note that apps require the sharedUserCertificates capability to import PFX files or use certificates from the user's "MY" certificate store.

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

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

Asynchronously imports a certificate from a Personal Information Exchange (PFX) message using the specified key storage provider.

public : IAsyncAction ImportPfxDataAsync(Platform::String pfxData, Platform::String password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, Platform::String friendlyName, Platform::String keyStorageProvider)
IAsyncAction ImportPfxDataAsync(winrt::hstring pfxData, winrt::hstring password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, winrt::hstring friendlyName, winrt::hstring keyStorageProvider) const;
public IAsyncAction ImportPfxDataAsync(String pfxData, String password, ExportOption exportable, KeyProtectionLevel keyProtectionLevel, InstallOptions installOption, String friendlyName, String 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
Windows.Security.Cryptography.Certificates.UserCertificateEnrollmentManager.importPfxDataAsync(pfxData, password, exportable, keyProtectionLevel, installOption, friendlyName, keyStorageProvider).done( /* Your success and error handlers */ );

Parameters

pfxData
String String String

Base64-encoded PFX message.

password
String String String

The password used to decrypt and verify the PFX packet. The password must be exactly the same as the password that was used to encrypt the packet.

exportable
ExportOption ExportOption ExportOption

A value of the ExportOption enumeration that specifies whether the key can be exported.

keyProtectionLevel
KeyProtectionLevel KeyProtectionLevel KeyProtectionLevel

A value of the KeyProtectionLevel enumeration that specifies the strength of the key protection. The default is NoConsent.

installOption
InstallOptions InstallOptions InstallOptions

An InstallOptions enumeration value that specifies the certificate installation option.

friendlyName
String String String

The display name of the enrolled certificate. This value overwrites the FriendlyName property inside the PFX message.

keyStorageProvider
String String String

The name of the key storage provider to use when importing the certificate.

Returns

This method does not return a value.

Examples

The following code imports a pfx-based certificate into the user's "My" store and protects the certificate's private key using the devices Trusted Platform Module (TPM). Note that apps require the sharedUserCertificates capability to import PFX files or use certificates from the user's "MY" certificate store.

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

ImportPfxDataAsync(String, String, PfxImportParameters) ImportPfxDataAsync(String, String, PfxImportParameters) ImportPfxDataAsync(String, String, PfxImportParameters) ImportPfxDataAsync(String, String, PfxImportParameters) ImportPfxDataAsync(String, String, PfxImportParameters)

Asynchronously imports a certificate from a Personal Information Exchange (PFX) message using the specified import parameters.

public : IAsyncAction ImportPfxDataAsync(Platform::String pfxData, Platform::String password, PfxImportParameters pfxImportParameters)
IAsyncAction ImportPfxDataAsync(winrt::hstring pfxData, winrt::hstring password, PfxImportParameters pfxImportParameters) const;
public IAsyncAction ImportPfxDataAsync(String pfxData, String password, PfxImportParameters pfxImportParameters)
Public Function ImportPfxDataAsync(pfxData As String, password As String, pfxImportParameters As PfxImportParameters) As IAsyncAction
Windows.Security.Cryptography.Certificates.UserCertificateEnrollmentManager.importPfxDataAsync(pfxData, password, pfxImportParameters).done( /* Your success and error handlers */ );

Parameters

pfxData
String String String

Base64-encoded PFX message.

password
String String String

he password used to decrypt and verify the PFX packet. The password must be exactly the same as the password that was used to encrypt the packet.

pfxImportParameters
PfxImportParameters PfxImportParameters PfxImportParameters

The import parameters.

Returns

This method does not return a value.

See also