This topic has not yet been rated - Rate this topic

CertificateRequestProperties.KeyUsages | keyUsages property

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

Syntax

Public Property KeyUsages As EnrollKeyUsages
   Get
   Set

Property value

Type: EnrollKeyUsages

Private key usage.

Remarks

The default key usage value is Signing.

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


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.Security.Cryptography.Certificates
Windows::Security::Cryptography::Certificates [C++]

Metadata

Windows.winmd

See also

CertificateRequestProperties

 

 

Build date: 12/4/2012

© 2013 Microsoft. All rights reserved.