IX509EnrollmentPolicyServer::Initialize method (certenroll.h)
The Initialize method initializes an IX509EnrollmentPolicyServer object.
Syntax
HRESULT Initialize(
[in] BSTR bstrPolicyServerUrl,
[in] BSTR bstrPolicyServerId,
[in] X509EnrollmentAuthFlags authFlags,
[in] VARIANT_BOOL fIsUnTrusted,
[in] X509CertificateEnrollmentContext context
);
Parameters
[in] bstrPolicyServerUrl
A BSTR variable that contains the URL for the certificate enrollment policy server.
[in] bstrPolicyServerId
A BSTR variable that contains a unique ID for the certificate enrollment policy server. If this value is not NULL, it must match the ID string returned by the CEP response.
[in] authFlags
An X509EnrollmentAuthFlags enumeration value that specifies the client authentication type. This can be one of the following values.
[in] fIsUnTrusted
A Boolean value that specifies whether to allow an untrusted certification authority certificates.
[in] context
An X509CertificateEnrollmentContext enumeration value that specifies the nature of the end entity for which certificate enrollment is intended. This can be one of the following values.
Return value
If the function succeeds, the function returns S_OK.
If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.
Return code | Description |
---|---|
|
The bstrPolicyServerUrl parameter cannot be an empty string and must represent an HTTPS URL. |
|
There was not sufficient memory available for the strings specified in the bstrPolicyServerUrl or bstrPolicyServerId parameters. |
|
The IX509EnrollmentPolicyServer object has already been initialized. |
|
The value specified in the bstrPolicyServerId parameter is not NULL and does not equal the existing CEP ID value on the CEP server. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | certenroll.h |