Share via


CertificateRequestProperties.Exportable Property

Definition

Gets or sets a value that specifies whether the private key created for the request can be exported.

public:
 property ExportOption Exportable { ExportOption get(); void set(ExportOption value); };
ExportOption Exportable();

void Exportable(ExportOption value);
public ExportOption Exportable { get; set; }
var exportOption = certificateRequestProperties.exportable;
certificateRequestProperties.exportable = exportOption;
Public Property Exportable As ExportOption

Property Value

Specifies whether the key can be exported.

Examples

public ExportOption GetSetExportable(ExportOption inputOption)
{
    // Create a new CertificateRequestProperties object.
    CertificateRequestProperties reqProperties = new CertificateRequestProperties();
    
    // The default value is ExportOption.NotExportable
    ExportOption defaultOption = reqProperties.Exportable;

    // If the input option does not equal the default option, reset the property value.
    if (inputOption != defaultOption)
    {
        reqProperties.Exportable = inputOption;
    }

    // Return the option value.
    return reqProperties.Exportable;
}

Remarks

By default, the private key is not exportable.

Applies to