UserCertificateEnrollmentManager.CreateRequestAsync(CertificateRequestProperties) UserCertificateEnrollmentManager.CreateRequestAsync(CertificateRequestProperties) UserCertificateEnrollmentManager.CreateRequestAsync(CertificateRequestProperties) UserCertificateEnrollmentManager.CreateRequestAsync(CertificateRequestProperties) UserCertificateEnrollmentManager.CreateRequestAsync(CertificateRequestProperties) Method

Definition

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

public : IAsyncOperation<Platform::String> CreateRequestAsync(CertificateRequestProperties request)
IAsyncOperation<winrt::hstring> CreateRequestAsync(CertificateRequestProperties request) const;
public IAsyncOperation<string> CreateRequestAsync(CertificateRequestProperties request)
Public Function CreateRequestAsync(request As CertificateRequestProperties) As IAsyncOperation(Of string)
Windows.Security.Cryptography.Certificates.UserCertificateEnrollmentManager.createRequestAsync(request).done( /* Your success and error handlers */ );

Parameters

request
CertificateRequestProperties CertificateRequestProperties CertificateRequestProperties

A CertificateRequestProperties object that contains the property values used to create the certificate request.

Returns

An asynchronous operation to retrieve the base64 encoded PKCS #10 certificate request.

Remarks

Certificate enrollment can be performed in an app container. We recommend that you use the following request objects to submit the request:

PropertyDefault value
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.Subject?text=Subject Empty string
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.KeyAlgorithmName?text=KeyAlgorithmName RSA
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.KeySize?text=KeySize 2048 bits
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.FriendlyName?text=FriendlyName Empty String
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.HashAlgorithmName?text=HashAlgorithmName SHA256
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.Exportable?text=Exportable Not Exportable
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.KeyUsages?text=KeyUsages Signing
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.KeyProtectionLevel?text=KeyProtectionLevel NoConsent
@Windows.Security.Cryptography.Certificates.CertificateRequestProperties.KeyStorageProviderName?text=KeyStorageProviderName Microsoft Software Key Storage Provider

While the CreateRequestAsync method creates the certificate request, you will need to submit the request to an http enrollment end point. You can then take the response from the http enrollment end point and then call the InstallCertificateAsync method to install the response.

Note

You must include the Signing value in the KeyUsages property in anyCertificateRequestProperties CertificateRequestProperties object that you use in a call to CreateRequestAsync. If you wish to set KeyUsages to Decryption or KeyAgreement, you must also OR in Signing. Otherwise, the call to CreateRequestAsync will fail.

See also