CertificateEnrollmentManager class

Applies to Windows and Windows Phone

Represents a certificate enrollment manager.

Syntax


/* For information about creating or accessing this object, see Remarks. */

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Members

The CertificateEnrollmentManager class has these types of members:

Methods

The CertificateEnrollmentManager class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
CreateRequestAsync Asynchronously creates a PKCS #10 certificate request based on properties specified in a CertificateRequestProperties object.
ImportPfxDataAsync(String, String, ExportOption, KeyProtectionLevel, InstallOptions, String) Asynchronously imports a certificate from a Personal Information Exchange (PFX) message.
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.
InstallCertificateAsync Asynchronously Installs a certificate chain into the app container on the local computer.

 

Properties

The CertificateEnrollmentManager class has these properties.

PropertyAccess typeDescription

UserCertificateEnrollmentManager

Read-onlyGets the associated UserCertificateEnrollmentManager.

 

Remarks

Call the CreateRequestAsync method to create an instance of the CertificateEnrollmentManager object.

This class contains only static properties. You do not have to create an instance of the class to retrieve the properties. Instead, use the class name followed by the dot operator (.), followed by the property name.

Examples


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;
        }
    }
}


Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Security.Cryptography.Certificates
Windows::Security::Cryptography::Certificates [C++]

Metadata

Windows.winmd

See also

Windows.Security.Cryptography.Certificates

 

 

Show:
© 2014 Microsoft