Jaa


CertificateEnrollmentManager Class

Definition

Represents a certificate enrollment manager.

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
Inheritance
Object Platform::Object IInspectable CertificateEnrollmentManager
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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

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.

Properties

UserCertificateEnrollmentManager

Gets the associated UserCertificateEnrollmentManager.

Methods

CreateRequestAsync(CertificateRequestProperties)

Asynchronously creates a PKCS #10 certificate request based on properties specified in a CertificateRequestProperties object.

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, ExportOption, KeyProtectionLevel, InstallOptions, String)

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

ImportPfxDataAsync(String, String, PfxImportParameters)

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

InstallCertificateAsync(String, InstallOptions)

Asynchronously Installs a certificate chain into the app container on the local computer.

Applies to

See also