CertificateRequestProperties.KeyUsages 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定可由為此憑證要求建立的私密金鑰所執行的作業。 預設值為 [簽署]。
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
屬性值
私密金鑰使用方式。
範例
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;
}
備註
預設金鑰使用值是 [簽署]。