VERIFYSERVERCERT callback function
VERIFYSERVERCERT is a callback function that allows a client to evaluate the certificate chain of the server to which it is connected.
The session handle.
A pointer to a pointer to a session handle, represented by CERT_CONTEXT.
If the function succeeds (the client approves the server certificate), the return value is TRUE.
If the function fails; the return value is FALSE and the secure connection is torn down.
The VERIFYSERVERCERT callback function allows the client to verify the certificate of the server. The client registers a callback which is invoked after the secure connection is set up. The server certificate context is presented to the callback function, where it can be verified as acceptable or not. To register this callback, call ldap_set_optionwhere CertRoutine is the address of your callback function.
The server calls VERIFYSERVERCERT after the secure connection has been established. The server's certificate context is supplied for examination by the client.
An application should use the ppServerCert parameter as:
PCCERT_CONTEXT* ppServerCert = (PCCERT_CONTEXT*)pServerCert;
Even though VERIFYSERVERCERT is declared as receiving a PCCERT_CONTEXT, it in fact receives a PCCERT_CONTEXT*. The ppServerCert can be used to verify the certificate. CertFreeCertificateContext should be called before this function returns. The call to this function should be made as follows:
Or, alternatively, as:
Minimum supported client
|Windows 2000 Professional [desktop apps only]|
Minimum supported server
|Windows 2000 Server [desktop apps only]|
Build date: 10/26/2012