Compartir a través de


CertificateRequestProperties.KeyUsages Propiedad

Definición

Obtiene o establece la operación que puede realizar la clave privada creada para esta solicitud de certificado. El valor predeterminado es Signing.

public:
 property EnrollKeyUsages KeyUsages { EnrollKeyUsages get(); void set(EnrollKeyUsages value); };
EnrollKeyUsages KeyUsages();

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

Valor de propiedad

Uso de claves privadas.

Ejemplos

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

Comentarios

El valor de uso de clave predeterminado es Firma.

Se aplica a