CertificateRequestProperties.KeyUsages CertificateRequestProperties.KeyUsages CertificateRequestProperties.KeyUsages CertificateRequestProperties.KeyUsages CertificateRequestProperties.KeyUsages Property

Definition

Gets or sets the operation that can be performed by the private key created for this certificate request. The default value is Signing.

public : EnrollKeyUsages KeyUsages { get; set; }
EnrollKeyUsages KeyUsages();

void KeyUsages(EnrollKeyUsages keyusages);
public EnrollKeyUsages KeyUsages { get; set; }
Public ReadWrite Property KeyUsages As EnrollKeyUsages
var enrollKeyUsages = certificateRequestProperties.keyUsages;
certificateRequestProperties.keyUsages = enrollKeyUsages;

Property Value

Examples

public EnrollKeyUsages GetSetKeyUsage(EnrollKeyUsages keyUseIn)
{
    // Create a new CertificateRequestProperties object.
    CertificateRequestProperties reqProperties = new CertificateRequestProperties();

    // The default value is signing.
    EnrollKeyUsages defaultKeyUse = reqProperties.KeyUsages;

    // If the input option does not equal the default option, reset the property value.
    if (keyUseIn != defaultKeyUse)
    {
        reqProperties.KeyUsages = keyUseIn;
    }

    // Return the value.
    return reqProperties.KeyUsages;
}

Remarks

The default key usage value is Signing.