WS_CERTIFICATE_VALIDATION_CALLBACK callback function (webservices.h)
The WS_CERTIFICATE_VALIDATION_CALLBACK callback is invoked to validate a certificate when a connection to an HTTP server has been established and headers sent.
Syntax
WS_CERTIFICATE_VALIDATION_CALLBACK WsCertificateValidationCallback;
HRESULT WsCertificateValidationCallback(
[in] PCCERT_CONTEXT certContext,
[in, optional] void *state
)
{...}
Parameters
[in] certContext
A pointer to a CERT_CONTEXT structure that is associated with the connection. Applications must free this structure using CertFreeCertificateContext.
[in, optional] state
A pointer to application specific state information. This parameter corresponds to the state member of the WS_CERTIFICATE_VALIDATION_CALLBACK_CONTEXT structure.
Return value
This callback function can return one of these values.
Return code | Description |
---|---|
|
The certificate validated successfully. |
|
This function may return other errors not listed above. |
Remarks
If WS_CERTIFICATE_VALIDATION_CALLBACK returns any value other than S_OK, the channel will be aborted. The service proxy will also be aborted if this property was passed to WsCreateServiceProxy.
The callback implementation must avoid long computation times or long blocking calls so that it returns to the caller quickly.
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 | webservices.h |