Export (0) Print
Expand All

Create an Exportable User Request Using a Specific CSP

Published: July 9, 2009

Applies To: Windows Server 2008

To make an exportable request, the private key export policy needs to be set to allow export of the private key as follows:

C#:
request.PrivateKey.ExportPolicy = X509PrivateKeyExportFlags.XCN_NCRYPT_ALLOW_EXPORT_FLAG;

The ExportPolicy can also be set to one of the following values.

 

Flag Value Description

XCN_NCRYPT_ALLOW_ARCHIVING_FLAG

4

Allows newly generated keys to be exported upon creation for archiving or key recovery.

XCN_NCRYPT_ALLOW_EXPORT_FLAG

1

Allows keys to be exported.

XCN_NCRYPT_ALLOW_EXPORT_NONE

0

Prevents keys from being exported (default).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft