IX509PrivateKey::put_SecurityDescriptor method (certenroll.h)
The SecurityDescriptor property specifies or retrieves the security descriptor for the private key.
This property is read/write.
Syntax
HRESULT put_SecurityDescriptor(
BSTR Value
);
Parameters
Value
Return value
None
Remarks
To use the security descriptor, you must call the ConvertStringSecurityDescriptorToSecurityDescriptor function included with the Microsoft Authorization API and specify the string returned by the GetDefaultSecurityDescriptor method.
The security descriptor is used to define access to private keys for the computer and user in the following manner:
- By default, only local administrators and services running under the LocalSystem account can access private keys associated with the computer account.
- When a CSP stores the private key of a user in an encrypted file in the user profile, it uses a security descriptor to set access permissions to the file.
If the key is not open when you specify a descriptor, the property value will be set when the key is opened.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | certenroll.h |
DLL | CertEnroll.dll |